Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When token not mandatory and none given, problems occur when there are courses with self-enrolment and empty tokens #97

Open
JorritDeKlerk opened this issue Mar 24, 2022 · 2 comments

Comments

@JorritDeKlerk
Copy link

I was just wondering if this is by design:

  • Have some courses with self-enrolment but WITHOUT tokens.
  • In the settings for enrolkey:
  • Set 'Require enrolment key for validation' to No
  • Set 'Require email confirmation' to Yes
  • Create a new user but keep the field for the token empty
  • Two "problems" now:
  • User is enrolled in the first course that has an empty token with self-enrolment.
  • For all other courses with empty token an error is shown (to the user)
  • Because of these errors, the email confirmation is not send AND the user is also automatically logged in (!)

I think it is more logical to ignore empty tokens.

A very dirty quick hack to show how to 'fix' it:

auth.txt

@JorritDeKlerk JorritDeKlerk changed the title No token required generates error and problems when courses with self-enrolment without token exist When token not mandatory and none given, problems occur when there are courses with self-enrolment and empty tokens Mar 24, 2022
@brendanheywood
Copy link
Contributor

@JorritDeKlerk are you able to submit that as a github pull request rather than static patch file please? It will make it far easier for us to merge it as well as giving you the commit kudos

@SYoung3000
Copy link

SYoung3000 commented Jul 19, 2023

To add to this, I think it happens if the course has group enrolment keys and any of these are left blank. The user doesn't seem to get added to the group, at least not immediately, but they do get enrolled in the course which seems unintuitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants