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

Restore should report more about errors when copying the restore file

XMLWordPrintable

    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide

      I don't know how to trigger this error condition (you could just hack $fileinfo->copy_to_pathname to return false).

      However, I was seeing this failure at the OU, and decided it would be good to improve the error handling here.

      I guess the main thing is to test that this does not introduce a regression. That is, you need to restore a .mbz file but uploading it, and you can complete the process.

      Show
      I don't know how to trigger this error condition (you could just hack $fileinfo->copy_to_pathname to return false). However, I was seeing this failure at the OU, and decided it would be good to improve the error handling here. I guess the main thing is to test that this does not introduce a regression. That is, you need to restore a .mbz file but uploading it, and you can complete the process.

      If you restore by uploading a file, then when the file is copied to the temp folder at the start of the process, no check is done on the return code of the copy.

      Therefore, if the copy fails, you just get an error message after the redirect that does not seem to make any sense. Reporting the error as soon as it is detected shold make debugging easier.

      Sadly, there is no way to know what caused the error, since the API just returns true/false, rather than throwing an informative exception.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Russell Smith Russell Smith
            Dan Poltawski Dan Poltawski
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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