Skip to content

Commit 2f33dd7

Browse files
committed
Temporary bug fix for grade caching.
1 parent 41a9052 commit 2f33dd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

classes/external/run_in_sandbox.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static function execute(
114114
$files = '',
115115
$params = ''
116116
) {
117-
global $USER, $SESSION;
117+
global $USER, $PAGE, $SESSION;
118118
// First, see if the web service is enabled.
119119
if (!get_config('qtype_coderunner', 'wsenabled')) {
120120
throw new qtype_coderunner_exception(get_string('wsdisabled', 'qtype_coderunner'));
@@ -138,6 +138,7 @@ public static function execute(
138138
throw new qtype_coderunner_exception(get_string('wsnoaccess', 'qtype_coderunner'));
139139
}
140140

141+
$PAGE->set_context($context); // *** Temporary hack - to be removed after the rewrite of the grade caching module.
141142
$sandbox = qtype_coderunner_sandbox::get_best_sandbox($language, true);
142143
if ($sandbox === null) {
143144
throw new qtype_coderunner_exception(get_string('wsnolanguage', 'qtype_coderunner', $language));

0 commit comments

Comments
 (0)