MDL-9628 Added title attributes to quickgrading and quickfeedback input elements...
[moodle-pu.git] / group / grouping_edit_form.php
blob5d23ecae9786c9efad14a28be4f304352e0b5e44
1 <?php //$Id$
3 require_once($CFG->dirroot.'/lib/formslib.php');
5 /// get url variables
6 class grouping_edit_form extends moodleform {
8 // Define the form
9 function definition () {
10 global $USER, $CFG, $COURSE;
12 $strrequired = get_string('required');
13 $buttonstr = get_string('creategrouping', 'group');
15 if (!empty($this->_customdata['grouping'])) {
16 $grouping = $this->_customdata['grouping'];
17 $id = $grouping->id;
20 $courseid = $this->_customdata['courseid'];
22 $mform =& $this->_form;
24 $mform->addElement('text','name', get_string('groupingname', 'group'),'maxlength="254" size="50"');
25 $mform->setDefault('name', get_string('defaultgroupingname', 'group'));
26 $mform->addRule('name', get_string('missingname'), 'required', null, 'server');
27 $mform->setType('name', PARAM_MULTILANG);
29 $mform->addElement('htmleditor', 'description', get_string('groupdescription', 'group'), array('rows'=> '15', 'course' => $courseid, 'cols'=>'45'));
30 $mform->setType('description', PARAM_RAW);
32 if (!empty($id)) {
33 $buttonstr = get_string('save', 'group');
34 $mform->addElement('hidden','id', null);
35 $mform->setType('id', PARAM_INT);
37 $this->add_action_buttons(true, $buttonstr);
38 $mform->addElement('hidden', 'courseid', $courseid);