merging MOODLE_19_QUESTIONS with HEAD

This commit is contained in:
jamiesensei 2007-08-09 21:51:09 +00:00
parent 3bee1ead40
commit 271e6decda
47 changed files with 2807 additions and 1546 deletions

View file

@ -31,8 +31,8 @@ class question_edit_random_form extends question_edit_form {
// Standard fields at the start of the form.
$mform->addElement('header', 'generalheader', get_string("general", 'form'));
$mform->addElement('questioncategory', 'category', get_string('category', 'quiz'),
array('courseid' => $COURSE->id, 'published' => true, 'only_editable' => true));
$mform->addElement('questioncategory', 'category', get_string('category', 'quiz'),
array('contexts' => $this->contexts->having_cap('moodle/question:useall')));
$mform->addElement('text', 'name', get_string('questionname', 'quiz'),
array('size' => 50));
@ -57,6 +57,18 @@ class question_edit_random_form extends question_edit_form {
$mform->addElement('hidden', 'versioning');
$mform->setType('versioning', PARAM_BOOL);
$mform->addElement('hidden', 'cmid');
$mform->setType('cmid', PARAM_INT);
$mform->setDefault('cmid', 0);
$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);
$mform->setDefault('courseid', 0);
$mform->addElement('hidden', 'returnurl');
$mform->setType('returnurl', PARAM_LOCALURL);
$mform->setDefault('returnurl', 0);
$buttonarray = array();
$buttonarray[] = &$mform->createElement('submit', 'submitbutton', get_string('savechanges'));