fixed incorrect page id
authorPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 13:11:19 +0000 (13:11 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 13:11:19 +0000 (13:11 +0000)
mod/lesson/pagetypes/essay.php

index f9113ff..2ae796f 100644 (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;