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

Revert previous commit altering URLs.

parent e7078811
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,12 @@ $PAGE->set_pagelayout('admin'); ...@@ -51,7 +51,12 @@ $PAGE->set_pagelayout('admin');
require_login(); require_login();
// The URL back to the preview page. // The URL back to the preview page.
$returnurl = new moodle_url('/question/type/stack/questiontestrun.php', $urlparams); // TODO, when we drop support for Moodle 3, this link needs to go back to the dashboard, not the preview.
if (stack_determine_moodle_version() < 400) {
$returnurl = question_preview_url($questionid, null, null, null, null, $context);
} else {
$returnurl = qbank_previewquestion\helper::question_preview_url($questionid, null, null, null, null, $context);
}
// Create the question usage we will use. // Create the question usage we will use.
$quba = question_engine::make_questions_usage_by_activity('qtype_stack', $context); $quba = question_engine::make_questions_usage_by_activity('qtype_stack', $context);
$quba->set_preferred_behaviour('adaptive'); $quba->set_preferred_behaviour('adaptive');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment