3 * Page to edit the question bank
7 * @author Martin Dougiamas and many others. This has recently been extensively
8 * rewritten by Gustav Delius and other members of the Serving Mathematics project
9 * {@link http://maths.york.ac.uk/serving_maths}
10 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
11 * @package questionbank
13 require_once("../config.php");
14 require_once("editlib.php");
16 list($thispageurl, $courseid, $cmid, $cm, $module, $pagevars) = question_edit_setup();
18 if (! $course = get_record("course", "id", $courseid)) {
19 error("This course doesn't exist");
21 $context = get_context_instance(CONTEXT_COURSE
, $courseid);
23 $SESSION->returnurl
= $FULLME;
25 $streditingquestions = get_string('editquestions', "quiz");
27 $strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE
, $course->id
))
28 ?
update_module_button($cm->id
, $course->id
, get_string('modulename', $cm->modname
))
31 $crumbs[] = array('name' => get_string('modulenameplural', $cm->modname
), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
32 $crumbs[] = array('name' => format_string($module->name
), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
33 $crumbs[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
34 $navigation = build_navigation($crumbs);
35 print_header_simple($streditingquestions, '', $navigation, "", "", true, $strupdatemodule);
39 $
{$cm->modname
} = $module;
40 include($CFG->dirroot
."/mod/$cm->modname/tabs.php");
42 // Print basic page layout.
44 $crumbs[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
45 $navigation = build_navigation($crumbs);
47 print_header_simple($streditingquestions, '', $navigation);
50 $currenttab = 'questions';
55 echo '<table class="boxaligncenter" border="0" cellpadding="2" cellspacing="0">';
56 echo '<tr><td valign="top">';
58 question_showbank($thispageurl, $cm, $pagevars['qpage'], $pagevars['qperpage'], $pagevars['qsortorder'], $pagevars['qsortorderdecoded'],
59 $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'], $pagevars['showquestiontext']);
64 print_footer($course);