|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // This file is part of Moodle - http://moodle.org/ 00003 // 00004 // Moodle is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // Moodle is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 00016 00027 require_once(dirname(__FILE__) . '/../config.php'); 00028 require_once($CFG->dirroot . '/question/editlib.php'); 00029 00030 $url = new moodle_url('/question/edit.php'); 00031 if (($lastchanged = optional_param('lastchanged', 0, PARAM_INT)) !== 0) { 00032 $url->param('lastchanged', $lastchanged); 00033 } 00034 if (($category = optional_param('category', 0, PARAM_TEXT)) !== 0) { 00035 $url->param('category', $category); 00036 } 00037 if (($qpage = optional_param('qpage', 0, PARAM_INT)) !== 0) { 00038 $url->param('qpage', $qpage); 00039 } 00040 if (($cat = optional_param('cat', 0, PARAM_TEXT)) !== 0) { 00041 $url->param('cat', $cat); 00042 } 00043 if (($courseid = optional_param('courseid', 0, PARAM_INT)) !== 0) { 00044 $url->param('courseid', $courseid); 00045 } 00046 if (($returnurl = optional_param('returnurl', 0, PARAM_INT)) !== 0) { 00047 $url->param('returnurl', $returnurl); 00048 } 00049 if (($cmid = optional_param('cmid', 0, PARAM_INT)) !== 0) { 00050 $url->param('cmid', $cmid); 00051 } 00052 $PAGE->set_url($url); 00053 00054 list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) = 00055 question_edit_setup('questions', '/question/edit.php'); 00056 $questionbank = new question_bank_view($contexts, $thispageurl, $COURSE, $cm); 00057 $questionbank->process_actions(); 00058 00059 // TODO log this page view. 00060 00061 $context = $contexts->lowest(); 00062 $streditingquestions = get_string('editquestions', 'question'); 00063 $PAGE->set_title($streditingquestions); 00064 $PAGE->set_heading($COURSE->fullname); 00065 echo $OUTPUT->header(); 00066 00067 echo '<div class="questionbankwindow boxwidthwide boxaligncenter">'; 00068 $questionbank->display('questions', $pagevars['qpage'], $pagevars['qperpage'], 00069 $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'], 00070 $pagevars['qbshowtext']); 00071 echo "</div>\n"; 00072 00073 echo $OUTPUT->footer();