Moodle release 1.9.16
[moodle.git] / mod / quiz / pagelib.php
blob23326292fdd916cc7cc177a5a21000452ad19bdb
1 <?php // $Id$
3 require_once($CFG->libdir.'/pagelib.php');
4 require_once($CFG->dirroot.'/course/lib.php'); // needed for some blocks
6 define('PAGE_QUIZ_VIEW', 'mod-quiz-view');
8 page_map_class(PAGE_QUIZ_VIEW, 'page_quiz');
10 $DEFINEDPAGES = array(PAGE_QUIZ_VIEW);
12 /**
13 * Class that models the behavior of a quiz
15 * @author Jon Papaioannou
16 * @package pages
19 class page_quiz extends page_generic_activity {
21 function init_quick($data) {
22 if(empty($data->pageid)) {
23 error('Cannot quickly initialize page: empty course id');
25 $this->activityname = 'quiz';
26 parent::init_quick($data);
29 function get_type() {
30 return PAGE_QUIZ_VIEW;