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

core_course_create_courses allows creation of courses with blank course fullname

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3, 3.7.6, 3.8.3, 3.8.4, 3.9.1, 3.10
    • Fix Version/s: 3.8.5, 3.9.2
    • Component/s: Course, Web Services
    • Labels:

      Description

      Using the Moodle Web services, it is possible to create courses without the required “fullname” attribute containing any value:

      http://moodle.instance/webservice/rest/server.php?wstoken=xxxxxxxxxx&wsfunction=core_course_create_courses&moodlewsrestformat=json&courses[0][fullname]=&courses[0][shortname]=ws001&courses[0][categoryid]=3 

      This creates a course with the desired shortname, but the fullname field is empty. This is not something that would usually be allowed to be done in the UI.

      If the fullname parameter is removed from the request entirely, then a parameter missing exception is returned.

        Attachments

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            minhtam Minh-Tam Nguyen
            Peer reviewer:
            Mihail Geshoski
            Integrator:
            Andrew Nicols
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Sep/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 35 minutes
                1h 35m