-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
MDL-32233-core_course_duplicate_course-usersdata -
This web service function will duplicate a course creating a new one.
It will perform a backup of an existing course and a restore to a new one
Parameters:
----------
course id - int The course id to duplicate
fullname - string The new course (duplicated) fullname
shortname - string The new course shortname
category id - int The category id of the new course - Optional, default to Miscellaneous
backup settings - struct of backup settings:
'users' => 'Default to true',
'role_assignments' => 'Default to true',
'user_files' => 'Default to true',
'activities' => 'Default to true',
'blocks' => 'Default to true',
'filters' => 'Default to true',
'comments' => 'Default to true',
'completion_information' => 'Default to true',
'logs' => 'Default to true',
'histories' => 'Default to true'
Return value:
-----------
The new course created
struct{
course struct [id, fullname, shortname, timemodified]
}
Note:
I don't know who is the core_course maintainer (moodle.com ?)
This functionality is currently not present in Moodle, the most similar is duplicate activity at course level
- is duplicated by
-
MDL-14674 Need a Copy_Course function, or a Templating mechanism
-
- Closed
-