fixed incorrect page id

This commit is contained in:
Petr Skoda
2010-09-18 13:11:19 +00:00
parent df0442c67e
commit 18ac654eab
+1 -1
View File
@@ -218,7 +218,7 @@ class lesson_page_type_essay extends lesson_page {
}
public function is_unanswered($nretakes) {
global $DB, $USER;
if (!$DB->count_records("lesson_attempts", array('pageid'=>$thispage->id, 'userid'=>$USER->id, 'retry'=>$nretakes))) {
if (!$DB->count_records("lesson_attempts", array('pageid'=>$this->properties->id, 'userid'=>$USER->id, 'retry'=>$nretakes))) {
return true;
}
return false;