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

tool_uploadcourse: Invalid restore files are not well handled

XMLWordPrintable

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-41347-master
    • Hide
      1. Create a CSV file containing the following keys:
        • shortname
        • fullname
        • category (set to 1)
        • backupfile (full path to a .mbz file)
        • templatecourse (shortname of an existing course)
      2. Create 4 different courses, they must not exist.
        • 1 with a valid backupfile, leave templatecourse empty
        • 1 with an invalid backupfile (file does not exist), leave templatecourse empty
        • 1 with a valid templatecourse, leave backupfile empty
        • 1 with an invalid templatecourse, leave backupfile empty
      3. Use the CSV in tool_uploadcourse
      4. Make sure you can go through the entire process
      5. Make sure the 2 courses with valid data are created and the content of backupfile or templatecourse has been imported in them
      6. Make sure the 2 invalid entries, and marked as invalid with the reason why
      Show
      Create a CSV file containing the following keys: shortname fullname category (set to 1) backupfile (full path to a .mbz file) templatecourse (shortname of an existing course) Create 4 different courses, they must not exist. 1 with a valid backupfile, leave templatecourse empty 1 with an invalid backupfile (file does not exist), leave templatecourse empty 1 with a valid templatecourse, leave backupfile empty 1 with an invalid templatecourse, leave backupfile empty Use the CSV in tool_uploadcourse Make sure you can go through the entire process Make sure the 2 courses with valid data are created and the content of backupfile or templatecourse has been imported in them Make sure the 2 invalid entries, and marked as invalid with the reason why
    • 3

      If there are invalid restore files (or courses to restore from), the prepare() method does not return false, even though it logs the errors. This causes the proceed() method to be called, which raises an exception because it should not happen.

      The course method to get the content restore dir should return whether it was successful or not, in order to return false during the prepare method.

            fred Frédéric Massart
            fred Frédéric Massart
            Dan Poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.