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

Asynchronous course restore webservices

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Backup, Web Services
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      MDL-28505 will introduce asynchronous backup and restore functionality.

      Currently there is no way to trigger asynchronous restores via webservices.  Using an external system to backup / restore and duplicate courses in Moodle is a common pattern,  so having these webservices in core will remove the reliance on plugins and custom integrations.

      The following webservices are proposed:

      • core_course_restore_async
        • Asynchronously restore a course
        • Params
          • categoryid (int) Category to restore course into - Required
          • localfile(object) Moodle internal backup file details returned from webservice/upload.php
            • contextid (int) context id of backup file
            • filecontextid (int)
            • itemid (id)
          • Options (list of objects) Duplication options - Optional
            • activities (int) Include course activites (default to 1 that is equal to yes)
            • blocks (int) Include course blocks (default to 1 that is equal to yes)
            • filters (int) Include course filters (default to 1 that is equal to yes)
            • users (int) Include users (default to 0 that is equal to no)
            • enrolments (int) Include enrolment methods (default to 1 - restore only with users)
            • role_assignments (int) Include role assignments (default to 0 that is equal to no)
            • comments (int) Include user comments (default to 0 that is equal to no)
            • userscompletion (int) Include user course completion information (default to 0 that is equal to no),
            • logs (int) Include course logs (default to 0 that is equal to no)
            • grade_histories (int) Include histories (default to 0 that is equal to no)
        • Returns
          • restoreid (string) The unique ID of the restore process
      • Core_course_restore_async_get_status
        • Get the status of a pending/ inprogress asynchronous course restore
        • Params
          • restoreid (string) The unique ID of the restore process  - Required
        • Returns
          • status (int) The status of the restore
          • progress (float) The progress of the restore

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mattp@catalyst-au.net Matt Porritt
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias, Juan Leyva, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: