public function process_page_responses(lesson_page $page) {
        $context = $this->get_context();

        // Check the page has answers [MDL-25632].
        if (count($page->answers) > 0) {
            $result = $page->record_attempt($context);
        } else {
            // The page has no answers so we will just progress to the next page in the
            // sequence (as set by newpageid).
            $result = new stdClass;
            $result->newpageid       = optional_param('newpageid', $page->nextpageid, PARAM_INT);
            $result->nodefaultresponse  = true;
            $result->inmediatejump = false;
        }

        if ($result->inmediatejump) {
            return $result;
        }

        $result->newpageid = $this->calculate_new_page_on_jump($page, $result->newpageid);

        return $result;
    }