-
New Feature
-
Resolution: Fixed
-
Minor
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-71165-master-v03 -
-
Moppies Kanban, Moppies Kanban, Moppies Kanban
Create an ajax webservice to be the course edition base for the new course editor in Moodle 4.0.
This web service should be able to execute both core and format plugin edition functions and it will be invoked as a Ajax request by the new course UI components.
The minimum arguments for this webservice are:
- action (string): to identify which update must be performed. This string is used to identify the method to call internally.
- courseid (int): the course where the action takes place.
- ids (array) an array of section or cm ids (depending on the action)
- (optional) targetsectionid(int): in case the action require a target section. For example "cm_moveto", "cm_copyto", "section_moveto" and "section_copyto" actions can require it.
- (optional) targetcmid(int): in case the action requires a target course-module. For example "cm_moveto", "cm_copyto", "section_moveto" and "section_copyto" can require it.
This webservice will delegate any action to core_course\stateactions class, or to format_xxx\course\stateactions if provided.
There's a sample implementation of this plugin here: https://github.com/ferranrecio/moodle/blob/coursecreatetest02/course/classes/external/course_edit.php
The return structure of any action will a be a "stateupdates" object. A stateupdates is a list of changes that must be executed at a frontend level in order to keep the UI updated. A sample code of the stateupdates class can be found here: https://github.com/ferranrecio/moodle/blob/coursecreatetest02/course/classes/stateupdates.php
For now, phpunit test should fake a course format because no state actions will be provided yet.
More information about this approach with the general architecture and how this external method will be used can be found in the section "External Interface Requirements" of the course creation document.
- blocks
-
MDL-71209 Create the new course index list. View mode with no edit options.
-
- Closed
-
-
MDL-71863 Create core_courseformat subsystem
-
- Closed
-
- has a non-specific relationship to
-
MDL-71169 Default name for the method implementing the external function
-
- Closed
-
- is blocked by
-
MDL-71135 Create core_course_get_state webservice
-
- Closed
-