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

Move maxima code to the end of the testing page.

parent 46159b9a
No related branches found
No related tags found
No related merge requests found
...@@ -529,22 +529,6 @@ echo $OUTPUT->heading(stack_string('questionnote'), 3); ...@@ -529,22 +529,6 @@ echo $OUTPUT->heading(stack_string('questionnote'), 3);
echo html_writer::tag('p', stack_ouput_castext($question->get_question_summary()), echo html_writer::tag('p', stack_ouput_castext($question->get_question_summary()),
array('class' => 'questionnote')); array('class' => 'questionnote'));
// Display the question variables.
echo $OUTPUT->heading(stack_string('questionvariablevalues'), 3);
echo html_writer::start_tag('div', array('class' => 'questionvariables'));
echo html_writer::tag('pre', $questionvariablevalues);
echo html_writer::end_tag('div');
// Display a representation of the PRT for offline use.
$offlinemaxima = array();
foreach ($question->prts as $name => $prt) {
$offlinemaxima[] = $prt->get_maxima_representation();
}
$offlinemaxima = s(implode("\n", $offlinemaxima));
echo html_writer::start_tag('div', array('class' => 'questionvariables'));
echo html_writer::tag('pre', $offlinemaxima);
echo html_writer::end_tag('div');
// Display the general feedback, aka "Worked solution". // Display the general feedback, aka "Worked solution".
echo $OUTPUT->heading(stack_string('generalfeedback'), 3); echo $OUTPUT->heading(stack_string('generalfeedback'), 3);
echo html_writer::tag('div', html_writer::tag('div', $renderer->general_feedback( echo html_writer::tag('div', html_writer::tag('div', $renderer->general_feedback(
...@@ -579,5 +563,21 @@ if ($question->stackversion == null) { ...@@ -579,5 +563,21 @@ if ($question->stackversion == null) {
. stack_string('stackversionnow', get_config('qtype_stack', 'version'))); . stack_string('stackversionnow', get_config('qtype_stack', 'version')));
} }
// Display the question variables.
echo $OUTPUT->heading(stack_string('questionvariablevalues'), 3);
echo html_writer::start_tag('div', array('class' => 'questionvariables'));
echo html_writer::tag('pre', $questionvariablevalues);
echo html_writer::end_tag('div');
// Display a representation of the PRT for offline use.
$offlinemaxima = array();
foreach ($question->prts as $name => $prt) {
$offlinemaxima[] = $prt->get_maxima_representation();
}
$offlinemaxima = s(implode("\n", $offlinemaxima));
echo html_writer::start_tag('div', array('class' => 'questionvariables'));
echo html_writer::tag('pre', $offlinemaxima);
echo html_writer::end_tag('div');
// Finish output. // Finish output.
echo $OUTPUT->footer(); echo $OUTPUT->footer();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment