Permalink
Browse files

Merge branch 'MDL-26178' of git://github.com/timhunt/moodle

  • Loading branch information...
2 parents 334d8b9 + 2cb01c9 commit 2b1f6ced64216b30489aa4e898583f93a39e3061 Sam Hemelryk committed Jan 31, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 mod/quiz/attemptlib.php
  2. +1 −1 mod/quiz/view.php
@@ -375,14 +375,14 @@ protected function determine_layout() {
$this->pagequestionids = array();
// Get the appropriate layout string (from quiz or attempt).
- $layout = $this->get_layout_string();
+ $layout = quiz_clean_layout($this->get_layout_string(), true);
if (empty($layout)) {
// Nothing to do.
return;
}
// Break up the layout string into pages.
- $pagelayouts = explode(',0', quiz_clean_layout($layout, true));
+ $pagelayouts = explode(',0', $layout);
// Strip off any empty last page (normally there is one).
if (end($pagelayouts) == '') {
View
@@ -339,7 +339,7 @@
/// or a button to go back to the course page.
echo $OUTPUT->box_start('quizattempt');
$buttontext = ''; // This will be set something if as start/continue attempt button should appear.
- if (!$quiz->questions) {
+ if (!quiz_clean_layout($quiz->questions, true)) {
echo $OUTPUT->heading(get_string("noquestions", "quiz"));
} else {
if ($unfinished) {

0 comments on commit 2b1f6ce

Please sign in to comment.