function definition() { global $DB, $userid, $courseid, $OUTPUT, $action; $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')); $mform->addGroup($actionGroup, 'actionGroup', get_string('chooseoption', 'local_attendance'), array(' '), false); $studentsTable = tables::getAssistStudentDetail($courseid, $userid); $mform->addElement('html', html_writer::table($studentsTable)); $mform->addElement('hidden', 'userid', $userid); $mform->setType('userid', PARAM_INT); $mform->addElement('hidden', 'courseid', $courseid); $mform->setType('courseid', PARAM_INT); $mform->addElement('hidden', 'action', 'modify_student_attendance'); $mform->setType('action', PARAM_TEXT); }