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

Duplicate error when changing the case on existing course shortname and idnumber

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.6, 2.6.1, 2.6.2
    • None
    • Course
    • None
    • MOODLE_26_STABLE

    Description

      If you edit a course and change the shortname or idnumber to a string that is identical except changing the case on some letters then Moodle will display an error to the user saying the name or idnumber is already in use.

      1. Create a new course
      a. Full name - "My Course"
      b. Short name - "My course"
      2. Complete creating the course
      3. Edit the course
      4. Change the course short name to "my Course"
      5. Save the changes
      6. You should get the following error

      Short name is already used for another course (my Course)

      More information about this error
      Debug info:
      Error code: shortnametaken
      Stack trace:

      line 2588 of /course/lib.php: moodle_exception thrown
      line 152 of /course/edit.php: call to update_course()

      7. Repeat for idnumber

      Since the course with the duplicate name or number is the course you are trying to update I'd expect this to complete.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              trendells Simon Trendell
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: