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

Asynchronous duplicate webservices



    • Improvement
    • Resolution: Deferred
    • Minor
    • None
    • 3.7
    • Backup, Web Services
    • None


      MDL-28505 will introduce asynchronous backup and restore functionality.

      Currently there is no way to trigger asynchronous course duplication 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_async_duplicate_course
        • Asynchronously duplicate a course
        • Params
          • id (int): ID of the course to duplicate - Required
          • fullname (string): Fullname of duplicated course - Required
          • shortname (string) Shortname of duplicated course - Required
          • categoryid (int) Category to duplicate course into - Required
          • 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
          • duplicateid (string) The unique ID of the duplication process
      • Core_course_async_duplicate_course_get_status
        • Get the status of a pending/ completed async course duplication process
        • Params
          • duplicateid (string) The unique ID of the backup process - Required
        • Returns
          • phase (int) The phase the duplication is in. Backup or restore
          • status (int) The status of the current phase
          • progress (float) The overall progress of the duplication


        Issue Links



              Unassigned Unassigned
              mattp@catalyst-au.net Matt Porritt
              0 Vote for this issue
              2 Start watching this issue




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