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/>.
|
|
|
|
|
2006-07-06 09:45:02 +00:00
|
|
|
/**
|
2011-02-22 19:59:12 +00:00
|
|
|
* Page for editing questions.
|
2006-07-06 09:45:02 +00:00
|
|
|
*
|
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
|
|
|
|
*/
|
|
|
|
|
2007-01-10 06:40:42 +00:00
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
require_once(dirname(__FILE__) . '/../config.php');
|
|
|
|
require_once(dirname(__FILE__) . '/editlib.php');
|
|
|
|
require_once($CFG->libdir . '/filelib.php');
|
|
|
|
require_once($CFG->libdir . '/formslib.php');
|
|
|
|
|
|
|
|
// Read URL parameters telling us which question to edit.
|
|
|
|
$id = optional_param('id', 0, PARAM_INT); // question id
|
2014-03-07 16:31:00 +00:00
|
|
|
$makecopy = optional_param('makecopy', 0, PARAM_BOOL);
|
2007-04-11 21:21:06 +00:00
|
|
|
$qtype = optional_param('qtype', '', PARAM_FILE);
|
|
|
|
$categoryid = optional_param('category', 0, PARAM_INT);
|
2007-08-09 21:51:09 +00:00
|
|
|
$cmid = optional_param('cmid', 0, PARAM_INT);
|
|
|
|
$courseid = optional_param('courseid', 0, PARAM_INT);
|
2009-02-13 06:11:42 +00:00
|
|
|
$wizardnow = optional_param('wizardnow', '', PARAM_ALPHA);
|
2010-08-04 19:44:59 +00:00
|
|
|
$originalreturnurl = optional_param('returnurl', 0, PARAM_LOCALURL);
|
2008-11-20 06:59:11 +00:00
|
|
|
$appendqnumstring = optional_param('appendqnumstring', '', PARAM_ALPHA);
|
2007-08-17 01:06:02 +00:00
|
|
|
$inpopup = optional_param('inpopup', 0, PARAM_BOOL);
|
2011-02-11 17:36:30 +00:00
|
|
|
$scrollpos = optional_param('scrollpos', 0, PARAM_INT);
|
2007-08-17 01:06:02 +00:00
|
|
|
|
2010-01-16 15:39:56 +00:00
|
|
|
$url = new moodle_url('/question/question.php');
|
2009-09-16 02:43:58 +00:00
|
|
|
if ($id !== 0) {
|
|
|
|
$url->param('id', $id);
|
|
|
|
}
|
2014-03-07 16:31:00 +00:00
|
|
|
if ($makecopy) {
|
2013-11-04 16:35:27 +00:00
|
|
|
$url->param('makecopy', $makecopy);
|
|
|
|
}
|
2009-09-16 02:43:58 +00:00
|
|
|
if ($qtype !== '') {
|
|
|
|
$url->param('qtype', $qtype);
|
|
|
|
}
|
|
|
|
if ($categoryid !== 0) {
|
|
|
|
$url->param('category', $categoryid);
|
|
|
|
}
|
|
|
|
if ($cmid !== 0) {
|
|
|
|
$url->param('cmid', $cmid);
|
|
|
|
}
|
|
|
|
if ($courseid !== 0) {
|
|
|
|
$url->param('courseid', $courseid);
|
|
|
|
}
|
|
|
|
if ($wizardnow !== '') {
|
|
|
|
$url->param('wizardnow', $wizardnow);
|
|
|
|
}
|
2010-08-04 19:44:59 +00:00
|
|
|
if ($originalreturnurl !== 0) {
|
|
|
|
$url->param('returnurl', $originalreturnurl);
|
2009-09-16 02:43:58 +00:00
|
|
|
}
|
|
|
|
if ($appendqnumstring !== '') {
|
|
|
|
$url->param('appendqnumstring', $appendqnumstring);
|
|
|
|
}
|
|
|
|
if ($inpopup !== 0) {
|
|
|
|
$url->param('inpopup', $inpopup);
|
|
|
|
}
|
2011-02-11 17:36:30 +00:00
|
|
|
if ($scrollpos) {
|
|
|
|
$url->param('scrollpos', $scrollpos);
|
|
|
|
}
|
2009-09-16 02:43:58 +00:00
|
|
|
$PAGE->set_url($url);
|
|
|
|
|
2010-10-18 15:28:59 +00:00
|
|
|
if ($originalreturnurl) {
|
|
|
|
if (strpos($originalreturnurl, '/') !== 0) {
|
|
|
|
throw new coding_exception("returnurl must be a local URL starting with '/'. $originalreturnurl was given.");
|
|
|
|
}
|
|
|
|
$returnurl = new moodle_url($originalreturnurl);
|
|
|
|
} else if ($cmid) {
|
|
|
|
$returnurl = new moodle_url('/question/edit.php', array('cmid' => $cmid));
|
|
|
|
} else {
|
|
|
|
$returnurl = new moodle_url('/question/edit.php', array('courseid' => $courseid));
|
2010-08-04 19:44:59 +00:00
|
|
|
}
|
2011-02-11 17:36:30 +00:00
|
|
|
if ($scrollpos) {
|
|
|
|
$returnurl->param('scrollpos', $scrollpos);
|
|
|
|
}
|
2010-08-04 19:44:59 +00:00
|
|
|
|
2007-05-04 05:47:59 +00:00
|
|
|
if ($cmid){
|
2007-08-09 21:51:09 +00:00
|
|
|
list($module, $cm) = get_module_from_cmid($cmid);
|
|
|
|
require_login($cm->course, false, $cm);
|
2012-07-24 16:57:51 +08:00
|
|
|
$thiscontext = context_module::instance($cmid);
|
2007-08-09 21:51:09 +00:00
|
|
|
} elseif ($courseid) {
|
|
|
|
require_login($courseid, false);
|
2012-07-24 16:57:51 +08:00
|
|
|
$thiscontext = context_course::instance($courseid);
|
2007-05-04 05:47:59 +00:00
|
|
|
$module = null;
|
|
|
|
$cm = null;
|
2007-08-09 21:51:09 +00:00
|
|
|
} else {
|
2008-05-21 07:53:23 +00:00
|
|
|
print_error('missingcourseorcmid', 'question');
|
2007-05-04 05:47:59 +00:00
|
|
|
}
|
2007-08-09 21:51:09 +00:00
|
|
|
$contexts = new question_edit_contexts($thiscontext);
|
2011-07-25 08:50:06 +01:00
|
|
|
$PAGE->set_pagelayout('admin');
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2009-02-25 07:14:03 +00:00
|
|
|
if (optional_param('addcancel', false, PARAM_BOOL)) {
|
|
|
|
redirect($returnurl);
|
|
|
|
}
|
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
if ($id) {
|
2008-06-06 14:43:15 +00:00
|
|
|
if (!$question = $DB->get_record('question', array('id' => $id))) {
|
2007-04-11 21:21:06 +00:00
|
|
|
print_error('questiondoesnotexist', 'question', $returnurl);
|
|
|
|
}
|
2009-01-16 08:00:06 +00:00
|
|
|
get_question_options($question, true);
|
2010-05-06 22:33:21 +00:00
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
} else if ($categoryid && $qtype) { // only for creating new questions
|
2011-02-21 18:10:19 +00:00
|
|
|
$question = new stdClass();
|
2007-04-11 21:21:06 +00:00
|
|
|
$question->category = $categoryid;
|
|
|
|
$question->qtype = $qtype;
|
2012-03-28 12:09:12 +01:00
|
|
|
$question->createdby = $USER->id;
|
2009-02-26 06:06:18 +00:00
|
|
|
|
|
|
|
// Check that users are allowed to create this question type at the moment.
|
2010-12-21 17:01:46 +00:00
|
|
|
if (!question_bank::qtype_enabled($qtype)) {
|
2009-02-26 06:06:18 +00:00
|
|
|
print_error('cannotenable', 'question', $returnurl, $qtype);
|
|
|
|
}
|
2010-05-06 22:33:21 +00:00
|
|
|
|
|
|
|
} else if ($categoryid) {
|
|
|
|
// Category, but no qtype. They probably came from the addquestion.php
|
2010-08-10 09:56:48 +00:00
|
|
|
// script without choosing a question type. Send them back.
|
2010-05-06 22:33:21 +00:00
|
|
|
$addurl = new moodle_url('/question/addquestion.php', $url->params());
|
|
|
|
$addurl->param('validationerror', 1);
|
|
|
|
redirect($addurl);
|
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
} else {
|
|
|
|
print_error('notenoughdatatoeditaquestion', 'question', $returnurl);
|
|
|
|
}
|
|
|
|
|
2010-12-21 17:01:46 +00:00
|
|
|
$qtypeobj = question_bank::get_qtype($question->qtype);
|
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
// Validate the question category.
|
2008-06-06 14:43:15 +00:00
|
|
|
if (!$category = $DB->get_record('question_categories', array('id' => $question->category))) {
|
2007-04-11 21:21:06 +00:00
|
|
|
print_error('categorydoesnotexist', 'question', $returnurl);
|
|
|
|
}
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2009-04-02 07:50:33 +00:00
|
|
|
// Check permissions
|
2011-02-21 18:10:19 +00:00
|
|
|
$question->formoptions = new stdClass();
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2012-08-21 14:20:30 +08:00
|
|
|
$categorycontext = context::instance_by_id($category->contextid);
|
2007-08-09 21:51:09 +00:00
|
|
|
$addpermission = has_capability('moodle/question:add', $categorycontext);
|
|
|
|
|
|
|
|
if ($id) {
|
2014-01-24 14:08:19 +00:00
|
|
|
$question->formoptions->canedit = question_has_capability_on($question, 'edit');
|
|
|
|
$question->formoptions->canmove = $addpermission && question_has_capability_on($question, 'move');
|
|
|
|
$question->formoptions->cansaveasnew = $addpermission &&
|
|
|
|
(question_has_capability_on($question, 'view') || $question->formoptions->canedit);
|
|
|
|
$question->formoptions->repeatelements = $question->formoptions->canedit || $question->formoptions->cansaveasnew;
|
|
|
|
$formeditable = $question->formoptions->canedit || $question->formoptions->cansaveasnew || $question->formoptions->canmove;
|
|
|
|
if (!$formeditable) {
|
|
|
|
question_require_capability_on($question, 'view');
|
|
|
|
}
|
|
|
|
if ($makecopy) {
|
|
|
|
// If we are duplicating a question, add some indication to the question name.
|
|
|
|
$question->name = get_string('questionnamecopy', 'question', $question->name);
|
2014-03-07 16:31:00 +00:00
|
|
|
$question->beingcopied = true;
|
2007-08-09 21:51:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} else { // creating a new question
|
2010-08-10 09:56:48 +00:00
|
|
|
$question->formoptions->canedit = question_has_capability_on($question, 'edit');
|
|
|
|
$question->formoptions->canmove = (question_has_capability_on($question, 'move') && $addpermission);
|
2012-03-28 12:09:12 +01:00
|
|
|
$question->formoptions->cansaveasnew = false;
|
2007-08-09 21:51:09 +00:00
|
|
|
$question->formoptions->repeatelements = true;
|
2012-03-28 12:09:12 +01:00
|
|
|
$formeditable = true;
|
|
|
|
require_capability('moodle/question:add', $categorycontext);
|
2007-04-11 21:21:06 +00:00
|
|
|
}
|
2012-03-28 13:55:17 +01:00
|
|
|
$question->formoptions->mustbeusable = (bool) $appendqnumstring;
|
2007-04-11 21:21:06 +00:00
|
|
|
|
|
|
|
// Validate the question type.
|
2009-05-06 08:38:55 +00:00
|
|
|
$PAGE->set_pagetype('question-type-' . $question->qtype);
|
2007-04-11 21:21:06 +00:00
|
|
|
|
|
|
|
// Create the question editing form.
|
2014-01-24 14:08:19 +00:00
|
|
|
if ($wizardnow !== '') {
|
2010-12-21 17:01:46 +00:00
|
|
|
$mform = $qtypeobj->next_wizard_form('question.php', $question, $wizardnow, $formeditable);
|
2007-04-11 21:21:06 +00:00
|
|
|
} else {
|
2010-12-21 17:01:46 +00:00
|
|
|
$mform = $qtypeobj->create_editing_form('question.php', $question, $category, $contexts, $formeditable);
|
2007-04-11 21:21:06 +00:00
|
|
|
}
|
2007-08-16 05:25:00 +00:00
|
|
|
$toform = fullclone($question); // send the question object and a few more parameters to the form
|
|
|
|
$toform->category = "$category->id,$category->contextid";
|
2011-02-11 17:36:30 +00:00
|
|
|
$toform->scrollpos = $scrollpos;
|
2007-08-16 05:25:00 +00:00
|
|
|
if ($formeditable && $id){
|
|
|
|
$toform->categorymoveto = $toform->category;
|
|
|
|
}
|
2008-11-20 06:59:11 +00:00
|
|
|
|
|
|
|
$toform->appendqnumstring = $appendqnumstring;
|
2010-08-04 19:44:59 +00:00
|
|
|
$toform->returnurl = $originalreturnurl;
|
2013-11-04 16:35:27 +00:00
|
|
|
$toform->makecopy = $makecopy;
|
2007-05-04 05:47:59 +00:00
|
|
|
if ($cm !== null){
|
|
|
|
$toform->cmid = $cm->id;
|
2007-08-09 21:51:09 +00:00
|
|
|
$toform->courseid = $cm->course;
|
|
|
|
} else {
|
|
|
|
$toform->courseid = $COURSE->id;
|
2007-05-04 05:47:59 +00:00
|
|
|
}
|
2010-08-10 09:56:48 +00:00
|
|
|
|
2007-09-27 08:17:09 +00:00
|
|
|
$toform->inpopup = $inpopup;
|
2010-08-10 09:56:48 +00:00
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
$mform->set_data($toform);
|
|
|
|
|
2010-12-21 17:01:46 +00:00
|
|
|
if ($mform->is_cancelled()) {
|
2007-09-27 08:17:09 +00:00
|
|
|
if ($inpopup) {
|
|
|
|
close_window();
|
|
|
|
} else {
|
2011-02-11 17:36:30 +00:00
|
|
|
redirect($returnurl);
|
2007-09-27 08:17:09 +00:00
|
|
|
}
|
2010-12-21 17:01:46 +00:00
|
|
|
|
2010-11-11 21:54:22 +00:00
|
|
|
} else if ($fromform = $mform->get_data()) {
|
2013-11-04 16:35:27 +00:00
|
|
|
// If we are saving as a copy, break the connection to the old question.
|
|
|
|
if ($makecopy) {
|
2009-02-13 06:11:42 +00:00
|
|
|
$question->id = 0;
|
2013-11-04 16:35:27 +00:00
|
|
|
$question->hidden = 0; // Copies should not be hidden.
|
2007-04-11 21:21:06 +00:00
|
|
|
}
|
2009-02-13 06:11:42 +00:00
|
|
|
|
|
|
|
/// Process the combination of usecurrentcat, categorymoveto and category form
|
|
|
|
/// fields, so the save_question method only has to consider $fromform->category
|
|
|
|
if (!empty($fromform->usecurrentcat)) {
|
|
|
|
// $fromform->category is the right category to save in.
|
|
|
|
} else {
|
|
|
|
if (!empty($fromform->categorymoveto)) {
|
|
|
|
$fromform->category = $fromform->categorymoveto;
|
|
|
|
} else {
|
|
|
|
// $fromform->category is the right category to save in.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// If we are moving a question, check we have permission to move it from
|
|
|
|
/// whence it came. (Where we are moving to is validated by the form.)
|
2012-03-28 12:09:12 +01:00
|
|
|
list($newcatid, $newcontextid) = explode(',', $fromform->category);
|
2009-02-13 06:11:42 +00:00
|
|
|
if (!empty($question->id) && $newcatid != $question->category) {
|
|
|
|
question_require_capability_on($question, 'move');
|
|
|
|
}
|
|
|
|
|
2010-11-11 21:54:22 +00:00
|
|
|
// Ensure we redirect back to the category the question is being saved into.
|
2009-02-13 06:11:42 +00:00
|
|
|
$returnurl->param('category', $fromform->category);
|
|
|
|
|
2014-01-24 14:08:19 +00:00
|
|
|
// We are acutally saving the question.
|
|
|
|
if (!empty($question->id)) {
|
|
|
|
question_require_capability_on($question, 'edit');
|
2010-11-11 21:54:22 +00:00
|
|
|
} else {
|
2014-01-24 14:08:19 +00:00
|
|
|
require_capability('moodle/question:add', context::instance_by_id($newcontextid));
|
|
|
|
if (!empty($fromform->makecopy) && !$question->formoptions->cansaveasnew) {
|
|
|
|
print_error('nopermissions', '', '', 'edit');
|
2010-11-11 21:54:22 +00:00
|
|
|
}
|
2009-01-16 08:00:06 +00:00
|
|
|
}
|
2014-01-24 14:08:19 +00:00
|
|
|
$question = $qtypeobj->save_question($question, $fromform);
|
|
|
|
if (!empty($CFG->usetags) && isset($fromform->tags)) {
|
|
|
|
// A wizardpage from multipe pages questiontype like calculated may not
|
|
|
|
// allow editing the question tags, hence the isset($fromform->tags) test.
|
|
|
|
require_once($CFG->dirroot.'/tag/lib.php');
|
|
|
|
tag_set('question', $question->id, $fromform->tags);
|
|
|
|
}
|
2009-01-16 08:00:06 +00:00
|
|
|
|
2012-10-17 17:25:04 +08:00
|
|
|
// Purge this question from the cache.
|
|
|
|
question_bank::notify_question_edited($question->id);
|
|
|
|
|
2013-11-14 12:01:10 +00:00
|
|
|
// If we are saving and continuing to edit the question.
|
|
|
|
if (!empty($fromform->updatebutton)) {
|
2014-03-07 16:31:00 +00:00
|
|
|
$url->param('id', $question->id);
|
|
|
|
$url->remove_params('makecopy');
|
2013-11-14 12:01:10 +00:00
|
|
|
redirect($url);
|
|
|
|
}
|
|
|
|
|
2014-01-24 14:08:19 +00:00
|
|
|
if ($qtypeobj->finished_edit_wizard($fromform)) {
|
2007-08-17 01:06:02 +00:00
|
|
|
if ($inpopup) {
|
2009-08-18 05:19:00 +00:00
|
|
|
echo $OUTPUT->notification(get_string('changessaved'), '');
|
2007-04-11 21:21:06 +00:00
|
|
|
close_window(3);
|
2006-02-24 10:21:40 +00:00
|
|
|
} else {
|
2010-10-18 15:28:59 +00:00
|
|
|
$returnurl->param('lastchanged', $question->id);
|
|
|
|
if ($appendqnumstring) {
|
|
|
|
$returnurl->param($appendqnumstring, $question->id);
|
|
|
|
$returnurl->param('sesskey', sesskey());
|
|
|
|
$returnurl->param('cmid', $cmid);
|
2008-11-20 06:59:11 +00:00
|
|
|
}
|
2010-10-18 15:28:59 +00:00
|
|
|
redirect($returnurl);
|
2006-02-24 10:21:40 +00:00
|
|
|
}
|
2010-11-11 21:54:22 +00:00
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
} else {
|
2010-10-18 15:28:59 +00:00
|
|
|
$nexturlparams = array(
|
|
|
|
'returnurl' => $originalreturnurl,
|
2011-02-11 17:36:30 +00:00
|
|
|
'appendqnumstring' => $appendqnumstring,
|
|
|
|
'scrollpos' => $scrollpos);
|
2007-08-17 01:06:02 +00:00
|
|
|
if (isset($fromform->nextpageparam) && is_array($fromform->nextpageparam)){
|
2010-10-18 15:28:59 +00:00
|
|
|
//useful for passing data to the next page which is not saved in the database.
|
|
|
|
$nexturlparams += $fromform->nextpageparam;
|
2007-04-11 21:21:06 +00:00
|
|
|
}
|
2007-08-17 01:06:02 +00:00
|
|
|
$nexturlparams['id'] = $question->id;
|
2007-08-16 05:25:00 +00:00
|
|
|
$nexturlparams['wizardnow'] = $fromform->wizard;
|
2010-10-18 15:28:59 +00:00
|
|
|
$nexturl = new moodle_url('/question/question.php', $nexturlparams);
|
2007-08-17 01:06:02 +00:00
|
|
|
if ($cmid){
|
|
|
|
$nexturl->param('cmid', $cmid);
|
|
|
|
} else {
|
|
|
|
$nexturl->param('courseid', $COURSE->id);
|
|
|
|
}
|
2009-07-20 06:52:40 +00:00
|
|
|
redirect($nexturl);
|
2006-02-24 10:21:40 +00:00
|
|
|
}
|
2007-04-11 21:21:06 +00:00
|
|
|
|
2010-11-11 21:54:22 +00:00
|
|
|
} else {
|
2010-12-21 17:01:46 +00:00
|
|
|
$streditingquestion = $qtypeobj->get_heading();
|
2009-09-07 02:36:39 +00:00
|
|
|
$PAGE->set_title($streditingquestion);
|
2010-06-02 06:13:27 +00:00
|
|
|
$PAGE->set_heading($COURSE->fullname);
|
2007-05-04 05:47:59 +00:00
|
|
|
if ($cm !== null) {
|
2007-09-11 08:23:00 +00:00
|
|
|
$strmodule = get_string('modulename', $cm->modname);
|
|
|
|
$streditingmodule = get_string('editinga', 'moodle', $strmodule);
|
2010-01-16 15:39:56 +00:00
|
|
|
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url('/mod/'.$cm->modname.'/index.php', array('id'=>$cm->course)));
|
|
|
|
$PAGE->navbar->add(format_string($module->name), new moodle_url('/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
|
2007-09-11 08:23:00 +00:00
|
|
|
if (stripos($returnurl, "$CFG->wwwroot/mod/{$cm->modname}/view.php")!== 0){
|
|
|
|
//don't need this link if returnurl returns to view.php
|
2009-09-07 02:36:39 +00:00
|
|
|
$PAGE->navbar->add($streditingmodule, $returnurl);
|
2007-09-11 08:23:00 +00:00
|
|
|
}
|
2009-09-07 02:36:39 +00:00
|
|
|
$PAGE->navbar->add($streditingquestion);
|
|
|
|
echo $OUTPUT->header();
|
2007-08-09 21:51:09 +00:00
|
|
|
|
2007-01-10 06:46:12 +00:00
|
|
|
} else {
|
2011-02-23 18:53:50 +00:00
|
|
|
$strediting = '<a href="edit.php?courseid='.$COURSE->id.'">'.get_string('editquestions', 'question').'</a> -> '.$streditingquestion;
|
|
|
|
$PAGE->navbar->add(get_string('editquestions', 'question'), $returnurl);
|
2009-09-07 02:36:39 +00:00
|
|
|
$PAGE->navbar->add($streditingquestion);
|
|
|
|
echo $OUTPUT->header();
|
2007-01-10 06:46:12 +00:00
|
|
|
}
|
2006-02-24 10:21:40 +00:00
|
|
|
|
2007-04-11 21:21:06 +00:00
|
|
|
// Display a heading, question editing form and possibly some extra content needed for
|
|
|
|
// for this question type.
|
2010-12-21 17:01:46 +00:00
|
|
|
$qtypeobj->display_question_editing_page($mform, $question, $wizardnow);
|
2009-08-06 14:19:16 +00:00
|
|
|
echo $OUTPUT->footer();
|
2007-04-11 21:21:06 +00:00
|
|
|
}
|