-
Improvement
-
Resolution: Deferred
-
Minor
-
None
-
3.7
-
None
-
MOODLE_37_STABLE
-
master_
MDL-64914_Asynchronous_course_backup_webservices -
MDL-28505 will introduce asynchronous backup and restore functionality.
Currently there is no way to trigger asynchronous backups 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_backup_async
- Asynchronously backup a course. Course backup file will be stored in course backup area
- Params
- id (int): ID of the course to backup - 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
- backupid (string) The unique ID of the backup process
- Returns
- core_course_backup_async_get_status
- Get the status of a pending/ inprogress asynchronous course backup
- Params
- backupid (string) The unique ID of the backup process - Required
- Returns
- status (int) The status of the backup
- progress (float) The progress of the backup
- core_course_backup_list_backups
- List the available backups for a given course.
- Params
- id (int): ID of the course to get the list of backups - Required
- Returns
- Backups (list of objects)
- filename (string) Name of the file
- filesize (int) size of the file in bytes
- download (url) URL to download the backup file
- Backups (list of objects)
- has a non-specific relationship to
-
MDL-64915 Asynchronous course restore webservices
-
- Closed
-
-
MDL-64916 Asynchronous duplicate webservices
-
- Closed
-
- has been marked as being related by
-
MDL-64915 Asynchronous course restore webservices
-
- Closed
-
-
MDL-64916 Asynchronous duplicate webservices
-
- Closed
-
- has to be done after
-
MDL-28505 Asynchronous course backup / restore
-
- Closed
-