-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.2, 2.8.2, 2.9
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MDL-47761-master -
Steps to reproduce:
1. Create a course C
2. Disable guest access, enable self enrolment
3. Configure Self enrolment with "max enrolled users" = 1
4. Login as student A
5. Enrol into course C, enrolment should suceedd
6. Login as student B
7. Enrol into course C, enrolment shouldn't be possible.
Actual result:
Student B is shown the error message "You can not enrol yourself in this course" (string 'notenrollable | core_enrol')
Expected result:
Student B should be shown the error message "Maximum number of users allowed to access was already reached" (string 'maxenrolledreached | enrol_self')
--------------------------------
As this has already worked in previous Moodle versions, I think this is a regression.
Hints for finding the bug:
In /enrol/self/lib.php, can_self_enrol() returns the appropriate strings, but enrol_page_hook which calls can_self_enrol() doesn't process these strings and doesn't hand them over to /enrol/index.php. So /enrol/index.php simply displays the "notenrollable" string.
- caused a regression
-
MDL-49232 Enrolment options screen: continue button missing 2.7.5
- Closed
-
MDL-50332 Unclear message when the maximum number of users is reached in one of the enrolment instances.
- Closed
- has been marked as being related by
-
MDL-51578 Improve error message for self enrolment when user tries to enrol before or after the enrolment time frame
- Closed
- will help resolve
-
MDL-44043 Enrolment not yet started and enrolment already over notification not helpful
- Closed