2009-11-04 11:57:52 +00:00
|
|
|
<?php
|
2011-02-22 19:59:12 +00:00
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
2009-01-19 05:30:01 +00:00
|
|
|
|
2006-02-24 10:21:40 +00:00
|
|
|
/**
|
2010-08-10 09:56:48 +00:00
|
|
|
* Page to edit the question bank
|
|
|
|
*
|
2011-02-22 19:59:12 +00:00
|
|
|
* @package moodlecore
|
|
|
|
* @subpackage questionbank
|
|
|
|
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
2010-08-10 09:56:48 +00:00
|
|
|
*/
|
2007-05-07 16:57:23 +00:00
|
|
|
|
2006-02-24 10:21:40 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
require_once(dirname(__FILE__) . '/../config.php');
|
|
|
|
require_once($CFG->dirroot . '/question/editlib.php');
|
2009-09-16 02:43:58 +00:00
|
|
|
|
2012-08-09 13:48:56 +01:00
|
|
|
list($thispageurl, $contexts, $cmid, $cm, $module, $pagevars) =
|
|
|
|
question_edit_setup('questions', '/question/edit.php');
|
|
|
|
|
|
|
|
$url = new moodle_url($thispageurl);
|
2011-02-22 19:59:12 +00:00
|
|
|
if (($lastchanged = optional_param('lastchanged', 0, PARAM_INT)) !== 0) {
|
|
|
|
$url->param('lastchanged', $lastchanged);
|
|
|
|
}
|
|
|
|
$PAGE->set_url($url);
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
$questionbank = new question_bank_view($contexts, $thispageurl, $COURSE, $cm);
|
|
|
|
$questionbank->process_actions();
|
2006-02-24 10:21:40 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
// TODO log this page view.
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
$context = $contexts->lowest();
|
2011-02-23 18:53:50 +00:00
|
|
|
$streditingquestions = get_string('editquestions', 'question');
|
2011-02-22 19:59:12 +00:00
|
|
|
$PAGE->set_title($streditingquestions);
|
|
|
|
$PAGE->set_heading($COURSE->fullname);
|
|
|
|
echo $OUTPUT->header();
|
2006-02-24 10:21:40 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
echo '<div class="questionbankwindow boxwidthwide boxaligncenter">';
|
2011-08-04 13:53:02 +01:00
|
|
|
$questionbank->display('questions', $pagevars['qpage'], $pagevars['qperpage'],
|
|
|
|
$pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'],
|
2011-08-26 17:01:06 +01:00
|
|
|
$pagevars['qbshowtext']);
|
2011-02-22 19:59:12 +00:00
|
|
|
echo "</div>\n";
|
2009-11-04 11:57:52 +00:00
|
|
|
|
2011-02-22 19:59:12 +00:00
|
|
|
echo $OUTPUT->footer();
|