Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16327

Roles are not renamed when a course is first created

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9, 1.9.1, 1.9.2
    • 1.9.4
    • Course, Roles / Access
    • None
    • MOODLE_19_STABLE
    • 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.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            chrisf Chris Fryer
            Helen Foster Helen Foster
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Jan/09