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

Moodle assumes course and section are omitted when starting in MoodleNet, but these can be sent empty too [master and 37/38].

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.8.3, 3.9
    • Fix Version/s: None
    • Component/s: Other
    • Testing Instructions:
      Hide
      1. Pull the current version of the MoodleNet test client (this now sends empty fields for course and section when not required)

        git pull https://github.com/snake/moodle.git moodlenet_test_client 

      2. Visit YOURSITE/testclient.php
      3. Try the first import example - the cat.png without course and section (this sends course and section empty)
      4. Confirm there are no problems importing the file into your Moodle site
      5. Go back to the test client and select the mbx without course or section example (this sends no course or section params)
      6. Confirm that you're presented with the restore process. You can stop here as the validation code has been tested properly at this stage.
      Show
      Pull the current version of the MoodleNet test client (this now sends empty fields for course and section when not required) git pull https: //github.com/snake/moodle.git moodlenet_test_client Visit YOURSITE/testclient.php Try the first import example - the cat.png without course and section (this sends course and section empty) Confirm there are no problems importing the file into your Moodle site Go back to the test client and select the mbx without course or section example (this sends no course or section params) Confirm that you're presented with the restore process. You can stop here as the validation code has been tested properly at this stage.
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-68807-master
    • Story Points:
      1
    • Sprint:
      Path to glory

      Description

      Identified on the prototype site, this comes down to the handling and validation of the course and section params in import.php. The fix should be small, but we should probably consider validating these properly (clean_param) - that seems to have been overlooked in my work on MDL-68698.

      To replicate this one:
      1. Take the new test client (see link in testing instructions) and start an import of the first item there - the cat.png without course and section
      2. Notice that you'll see an SQL error, complaining about courseid being empty.

        Attachments

          Activity

            People

            Assignee:
            jaked Jake Dallimore
            Reporter:
            jaked Jake Dallimore
            Peer reviewer:
            Peter Dias
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m