lib.php:scormremote_pluginfile() calls exit($OUTPUT->render_from_template(...)) to render output which results in a warning if debugging is enabled for the site: Debugging: Coding problem: $PAGE->context was not set....
Using Moodle 4.1.4+ (Build: 20230623) and mod_scormremote 2023070600 (44d5d9d).
Steps to reproduce issue
Step up a SCORM hosted on Moodle, generate the wrapper and add the wrapper to a remote LMS.
No warning in PHP error log on the server hosting Moodle.
Actual results
Warning in PHP error log on the server hosting Moodle:
[31-Aug-2023 16:13:22 Europe/London] Debugging: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result in
* line 567 of /lib/pagelib.php: call to debugging()
* line 1696 of /lib/pagelib.php: call to moodle_page->magic_get_context()
* line 1972 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
* line 250 of /mod/scormremote/lib.php: call to bootstrap_renderer->__call()
* line 5212 of /lib/filelib.php: call to scormremote_pluginfile()
* line 44 of /pluginfile.php: call to file_pluginfile()
lib.php:scormremote_pluginfile()
calls exit($OUTPUT->render_from_template(...)) to render output which results in a warning if debugging is enabled for the site:Debugging: Coding problem: $PAGE->context was not set...
.Using Moodle 4.1.4+ (Build: 20230623) and mod_scormremote 2023070600 (44d5d9d).
Steps to reproduce issue
Expected results
No warning in PHP error log on the server hosting Moodle.
Actual results
Warning in PHP error log on the server hosting Moodle: