Skip to content
Snippets Groups Projects
Commit 93d41f86 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Fix to issue #901.

parent a7c0cd7a
Branches
No related tags found
No related merge requests found
......@@ -232,6 +232,13 @@ function qtype_stack_setup_question_test_page($question) {
} else {
require_login();
$context = $question->get_context();
if ($context->contextlevel == CONTEXT_MODULE) {
$urlparams['cmid'] = $context->instanceid;
} else if ($context->contextlevel == CONTEXT_COURSE) {
$urlparams['courseid'] = $context->instanceid;
} else {
$urlparams['courseid'] = SITEID;
}
$PAGE->set_context($context);
// Note that in the other cases, require_login will set the correct page context.
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment