public function set_currentpage($page) {
        global $DB;

        if ($this->check_page_access($page)) {
            $DB->set_field('quiz_attempts', 'currentpage', $page, array('id' => $this->get_attemptid()));
            return true;
        }
        return false;
    }
public function set_currentpage($page) {
        global $DB;

        if ($this->check_page_access($page)) {
            $DB->set_field('quiz_attempts', 'currentpage', $page, array('id' => $this->get_attemptid()));
            return true;
        }
        return false;
    }
public function set_currentpage ( $ page ) { global $ DB ; if ( $ this -> check_page_access ( $ page ) ) { $ DB -> set_field ( 'quiz_attempts' , 'currentpage' , $ page , array ( 'id' => $ this -> get_attemptid ( ) ) ) ; return true ; } return false ; }
Update attempt page.

@param  int $page page number
@return boolean true if everything was ok, false otherwise (out of sequence access).
@since Moodle 3.1
Update attempt page .