From 49347eacc5e7ee5cd79ef849569ea11cb48dec4d Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Mon, 25 Jul 2005 14:19:21 +0000 Subject: [PATCH] Fix for question numbering provided by razzor, bug 3807 --- mod/quiz/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 929ae1a9d89..ec50118835e 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -138,7 +138,7 @@ function quiz_first_questionnumber($quizlayout, $pagelayout) { // this works by finding all the questions from the quizlayout that // come before the current page and then adding up their lengths. global $CFG; - $start = strpos($quizlayout, $pagelayout)-3; + $start = strpos($quizlayout, ','.$pagelayout.',')-2; if ($start > 0) { $prevlist = substr($quizlayout, 0, $start); return get_field_sql("SELECT sum(length)+1 FROM {$CFG->prefix}quiz_questions