-
Bug
-
Resolution: Fixed
-
Major
-
2.9
-
MOODLE_29_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-50271-master -
There are times where only one course is returned from the core_enrol_external::get_users_courses(). I narrowed it down to an exception thrown during the validation of the context of each course. It seems that calling $PAGE->set_course() creates some issues.
Here is a backtrace that can help:
Default exception handler: Coding error detected, it must be fixed by a programmer: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course.
|
|
Debug: Stack trace when the theme was set up:
|
|
- line 637 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()
|
- line 812 of /lib/pagelib.php: call to moodle_page->magic_get_theme()
|
- line 64 of /filter/mediaplugin/filter.php: call to moodle_page->get_renderer()
|
- line 167 of /lib/filterlib.php: call to filter_mediaplugin->filter()
|
- line 205 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
|
- line 337 of /lib/filterlib.php: call to filter_manager->filter_text()
|
- line 1222 of /lib/weblib.php: call to performance_measuring_filter_manager->filter_text()
|
- line 752 of /lib/externallib.php: call to format_text()
|
- line 328 of /enrol/externallib.php: call to external_format_text()
|
- line ? of unknownfile: call to core_enrol_external::get_users_courses()
|
- line 1780 of /webservice/lib.php: call to call_user_func_array()
|
- line 1644 of /webservice/lib.php: call to webservice_base_server->execute()
|
- line 44 of /webservice/rest/server.php: call to webservice_base_server->run()
|
|
Error code: codingerror
|
* line 1832 of /lib/pagelib.php: coding_exception thrown
|
* line 914 of /lib/pagelib.php: call to moodle_page->ensure_theme_not_set()
|
* line 2627 of /lib/moodlelib.php: call to moodle_page->set_course()
|
* line 379 of /lib/externallib.php: call to require_login()
|
* line 310 of /enrol/externallib.php: call to external_api::validate_context()
|
* line ? of unknownfile: call to core_enrol_external::get_users_courses()
|
* line 1780 of /webservice/lib.php: call to call_user_func_array()
|
* line 1644 of /webservice/lib.php: call to webservice_base_server->execute()
|
* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()
|
, referer: http://localhost:8100/
|
STEPS TO REPRODUCE:
- Enable the multimedia filter at site and course level
- Edit the description of two courses where the same user is enrolled, add normal links to youtube videos
- Open the site with the Mobile app, you will see only one course (the first course where the user is enrolled)
I have reproduced this on master but it might affect other versions. I was logged in as admin but I think I have experienced this as another user.
- Discovered while testing
-
MOBILE-999 Create a directive to download (cache) pluginfiles
- Closed
- will be (partly) resolved by
-
MDL-50627 Using the multimedia filter sets theme up for output..
- Closed
-
MDLSITE-3926 Enable auto enrol to send a custom welcome message
- Resolved