Merge branch 'MDL-75914-master' of https://github.com/meirzamoodle/moodle

This commit is contained in:
Paul Holden
2022-12-22 12:24:57 +07:00
committed by Ilya Tregubov
2 changed files with 5 additions and 1 deletions
+5
View File
@@ -1050,6 +1050,7 @@ class mod_quiz_external extends external_api {
* @throws moodle_quiz_exceptions
*/
public static function get_attempt_data($attemptid, $page, $preflightdata = array()) {
global $PAGE;
$warnings = array();
@@ -1068,6 +1069,10 @@ class mod_quiz_external extends external_api {
$nextpage = $params['page'] + 1;
}
// TODO: Remove the code once the long-term solution (MDL-76728) has been applied.
// Set a default URL to stop the debugging output.
$PAGE->set_url('/fake/url');
$result = array();
$result['attempt'] = $attemptobj->get_attempt();
$result['messages'] = $messages;
-1
View File
@@ -1321,7 +1321,6 @@ class external_test extends externallib_advanced_testcase {
// Now, get the summary.
$result = mod_quiz_external::get_attempt_summary($attempt->id);
$result = \external_api::clean_returnvalue(mod_quiz_external::get_attempt_summary_returns(), $result);
$this->assertDebuggingCalled(); // Expect $PAGE->set_url debugging.
// Check it's marked as completed only the first one.
$this->assertEquals('complete', $result['questions'][0]['state']);