Skip to content
Snippets Groups Projects
Commit becbcfee authored by Gustav W Delius's avatar Gustav W Delius
Browse files

Style question testing pages like preview pages

The pages for running, editing or deleting question tests are displayed
in the same pop-up window as the question preview. They should therefore
also use the same pop-up pagelayout, see issue #78
(https://github.com/maths/moodle-qtype_stack/issues/78).
parent a081f4b9
Branches
No related tags found
No related merge requests found
...@@ -60,9 +60,9 @@ if (data_submitted() && confirm_sesskey()) { ...@@ -60,9 +60,9 @@ if (data_submitted() && confirm_sesskey()) {
// Display the confirmation. // Display the confirmation.
$PAGE->set_title($title); $PAGE->set_title($title);
$PAGE->set_pagelayout('admin'); $PAGE->set_heading($title);
$PAGE->set_pagelayout('popup');
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading($title);
echo $OUTPUT->confirm(stack_string('deletetestcaseareyousure', echo $OUTPUT->confirm(stack_string('deletetestcaseareyousure',
array('no' => $testcase, 'question' => format_string($question->name))), array('no' => $testcase, 'question' => format_string($question->name))),
......
...@@ -63,8 +63,8 @@ if (!is_null($testcase)) { ...@@ -63,8 +63,8 @@ if (!is_null($testcase)) {
} }
$PAGE->set_url('/question/type/stack/questiontestedit.php', $urlparams); $PAGE->set_url('/question/type/stack/questiontestedit.php', $urlparams);
$PAGE->set_title($title); $PAGE->set_title($title);
$PAGE->set_heading($COURSE->fullname); $PAGE->set_heading($title);
$PAGE->set_pagelayout('admin'); $PAGE->set_pagelayout('popup');
// 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);
...@@ -137,7 +137,6 @@ $options->suppressruntestslink = true; ...@@ -137,7 +137,6 @@ $options->suppressruntestslink = true;
// Display the page. // Display the page.
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading($title);
// Show the question read-only. // Show the question read-only.
echo $quba->render_question($slot, $options); echo $quba->render_question($slot, $options);
......
...@@ -56,8 +56,8 @@ $canedit = question_has_capability_on($questiondata, 'edit'); ...@@ -56,8 +56,8 @@ $canedit = question_has_capability_on($questiondata, 'edit');
$PAGE->set_url('/question/type/stack/questiontestrun.php', $urlparams); $PAGE->set_url('/question/type/stack/questiontestrun.php', $urlparams);
$title = stack_string('testingquestion', format_string($question->name)); $title = stack_string('testingquestion', format_string($question->name));
$PAGE->set_title($title); $PAGE->set_title($title);
$PAGE->set_heading($COURSE->fullname); $PAGE->set_heading($title);
$PAGE->set_pagelayout('admin'); $PAGE->set_pagelayout('popup');
// 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);
...@@ -92,7 +92,6 @@ foreach ($testscases as $key => $testcase) { ...@@ -92,7 +92,6 @@ foreach ($testscases as $key => $testcase) {
// Start output. // Start output.
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$deployfeedback = optional_param('deployfeedback', null, PARAM_TEXT); $deployfeedback = optional_param('deployfeedback', null, PARAM_TEXT);
if (!is_null($deployfeedback)) { if (!is_null($deployfeedback)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment