Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9, 1.9.1, 1.9.2
-
Fix Version/s: 1.9.4
-
Component/s: Course, Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
When you first create a course, you have the opportunity to rename the roles. Any entries you make are ignored. New role names are only applied when you update an existing course.
Steps to reproduce:
1. Go to /course/edit.php and create a new course
2. Rename some of the roles
3. Submit the form
Expected result:
Redirect to /admin/roles/assign.php, which lists the roles with their new names, and the old names in brackets.
Actual result:
Redirect to /admin/roles/assign.php with only the default role names displayed.
This is because create_course() in /course/lib.php lacks the code to handle role renaming. It does exist in update_course(), so I copied it from there (with some minor modifications). Please see the attached patch.
I just spotted this, and am going to fix it (but without copying and pasting code!)