public function is_unanswered($nretakes) {
        global $DB, $USER;
        if (!$DB->count_records("lesson_attempts", array('pageid'=>$this->properties->id, 'userid'=>$USER->id, 'correct'=>1, 'retry'=>$nretakes))) {
            return true;
        }
        return false;
    }
public function is_unanswered($nretakes) {
        global $DB, $USER;
        if (!$DB->count_records("lesson_attempts", array('pageid'=>$this->properties->id, 'userid'=>$USER->id, 'correct'=>1, 'retry'=>$nretakes))) {
            return true;
        }
        return false;
    }
public function is_unanswered ( $ nretakes ) { global $ DB , $ USER ; if ( ! $ DB -> count_records ( "lesson_attempts" , array ( 'pageid' => $ this -> properties -> id , 'userid' => $ USER -> id , 'correct' => 1 , 'retry' => $ nretakes ) ) ) { return true ; } return false ; }
Checks to see if a page has been answered previously
@param int $nretakes
@return bool
Checks to see if a page has been answered previously