MDL-15112 lesson dml conversion

This commit is contained in:
jerome 2008-06-11 05:51:43 +00:00
parent 667b0a1601
commit 590a837a34

View File

@ -790,8 +790,10 @@
}
} elseif ($lesson->nextpagedefault == LESSON_UNANSWEREDPAGE) {
foreach ($allpages as $thispage) {
if (!$DB->count_records_select("lesson_attempts", array('pageid'=>$thispage->id,
'userid'=>$USER->id, 'correct'=>1, 'retry'=>$nretakes))) {
$params = array('pageid'=>$thispage->id,
'userid'=>$USER->id, 'correct'=>1, 'retry'=>$nretakes);
if (!count_records_select("lesson_attempts", "pageid = :pageid AND
userid = :userid AND correct = 1 AND retry = :retry", $params)) {
$found = true;
break;
}