Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1.1
-
MOODLE_31_STABLE
-
MOODLE_32_STABLE
-
MDL-55415-master -
Description
After discussing it much (with Dani and Eloy) we think that the new WS names should be:
- core_course_get_user_administration_options($courseids)
- core_course_get_user_navigation_options($courseids)
The new APIs at course/lib.php will be:
- course_get_user_administration_options($context)
- course_get_user_navigation_options($context)
Why we need this new WS?
Because in the Mobile app we don't have currently a way to know wich options in a course (administration or navigation level) are available for a user.
The only way to know if something is available for a user is doing a pre-fetch call to the WS and check if is returning errors or not (for example, retrieve the list of participants, the user grade book, the user notes) etc..
This is causing serious performance and data consumption issues in the app when the user is enrolled in several courses, for 12 courses we are doing like 70 WS calls that we will be able to save with this new web services
Required core changes
We'll be refactoring the navigationlib to use this new functions to avoid code duplication (it will be basically moving $CFG and capabilities check to those functions)
Attachments
Issue Links
- caused a regression
-
MDL-57256 Administration block displays link to Legacy course files when it should not
-
- Closed
-
- will help resolve
-
MOBILE-1862 Speed-up the my courses page options loading
-
- Closed
-