Example #1
0
 /**
  * Adds fields to this form which are relevant to the course, either
  * new or old, that a class is being requested for, including any associated
  * validation rules
  */
 protected function add_course_info()
 {
     // add the standard fields
     parent::add_course_info();
     $mform =& $this->_form;
     // remove the course dropdown
     $mform->removeElement('courseid');
     // disable editing of the course name
     $mform->hardFreeze('title');
     // don't display as required, since not editable
     $course_name_element =& $mform->getElement('title');
     $course_name_element->setLabel(get_string('title', 'block_courserequest'));
 }