Fix for question numbering provided by razzor, bug 3807

This commit is contained in:
gustav_delius
2005-07-25 14:19:21 +00:00
parent 3b405a5f3d
commit 49347eacc5
+1 -1
View File
@@ -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