mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-15112 lesson dml conversion - fix the previous fix ($DB->count_records_select should be $DB->count_records)
This commit is contained in:
parent
590a837a34
commit
9267ffda3c
1 changed files with 2 additions and 4 deletions
|
@ -790,10 +790,8 @@
|
||||||
}
|
}
|
||||||
} elseif ($lesson->nextpagedefault == LESSON_UNANSWEREDPAGE) {
|
} elseif ($lesson->nextpagedefault == LESSON_UNANSWEREDPAGE) {
|
||||||
foreach ($allpages as $thispage) {
|
foreach ($allpages as $thispage) {
|
||||||
$params = array('pageid'=>$thispage->id,
|
if (!$DB->count_records("lesson_attempts", array('pageid'=>$thispage->id,
|
||||||
'userid'=>$USER->id, 'correct'=>1, 'retry'=>$nretakes);
|
'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;
|
$found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue