MDL-20636 changed accessrules to return the button instead of eco it and applied this change to render file

This commit is contained in:
Dean Lennard 2011-05-03 14:06:43 +01:00 committed by Tim Hunt
parent 213d4cff9c
commit 7886376a12
2 changed files with 2 additions and 2 deletions

View File

@ -218,6 +218,7 @@ class quiz_access_manager {
* @param bool $unfinished whether the button is to continue an existing attempt,
* or start a new one. This affects whether a javascript alert is shown.
*/
//TODO: Add this function to renderer
public function print_start_attempt_button($canpreview, $buttontext, $unfinished) {
global $OUTPUT;
@ -244,7 +245,7 @@ class quiz_access_manager {
$OUTPUT->heading(get_string('noscript', 'quiz')));
}
echo $OUTPUT->render($button) . $warning;
return $OUTPUT->render($button) . $warning;
}
/**

View File

@ -660,7 +660,6 @@ class mod_quiz_renderer extends plugin_renderer_base {
// Determine if we should be showing a start/continue attempt button,
// or a button to go back to the course page.
$output .= $this->box_start('quizattempt');
$output .= 'TEST';
$buttontext = ''; // This will be set something if as start/continue attempt button should appear.
if (!quiz_clean_layout($quiz->questions, true)) {
$output .= quiz_no_questions_message($quiz, $cm, $context);