Example #1
0
 function definition()
 {
     global $DB, $sessionid, $courseid, $OUTPUT, $action, $userid;
     $mform =& $this->_form;
     $actionOptions = array('mark_as_attended' => get_string('markattended', 'local_attendance'), 'mark_as_absent' => get_string('markabsent', 'local_attendance'));
     $actionGroup = array();
     $actionGroup[] =& $mform->createElement('select', 'action_for_checked', '', $actionOptions);
     $actionGroup[] =& $mform->createElement('submit', 'submitbutton', get_string('apply', 'local_attendance'));
     $actionGroup[] =& $mform->createElement('html', '<div id="filter">' . get_string('filter', 'local_attendance') . ': <input type="text"></div>');
     $mform->addGroup($actionGroup, 'actionGroup', get_string('chooseoption', 'local_attendance'), array(' '), false);
     $sessionsTable = tables::getAssistDateDetail($courseid, $sessionid);
     $mform->addElement('html', html_writer::table($sessionsTable));
     $mform->addElement('hidden', 'sessionid', $sessionid);
     $mform->setType('sessionid', PARAM_INT);
     $mform->addElement('hidden', 'courseid', $courseid);
     $mform->setType('courseid', PARAM_INT);
     $mform->addElement('hidden', 'action', 'modify_session_attendance');
     $mform->setType('action', PARAM_TEXT);
 }