|
|
@ -143,21 +143,22 @@ class updatesession extends \moodleform { |
|
|
|
$mform->settype('studentscanmark', PARAM_INT); |
|
|
|
} |
|
|
|
|
|
|
|
$options2 = attendance_get_automarkoptions(); |
|
|
|
if ($DB->record_exists('attendance_statuses', ['attendanceid' => $this->_customdata['att']->id, 'setunmarked' => 1])) { |
|
|
|
$options2 = attendance_get_automarkoptions(); |
|
|
|
|
|
|
|
$mform->addElement('select', 'automark', get_string('automark', 'attendance'), $options2); |
|
|
|
$mform->setType('automark', PARAM_INT); |
|
|
|
$mform->addHelpButton('automark', 'automark', 'attendance'); |
|
|
|
$mform->addElement('select', 'automark', get_string('automark', 'attendance'), $options2); |
|
|
|
$mform->setType('automark', PARAM_INT); |
|
|
|
$mform->addHelpButton('automark', 'automark', 'attendance'); |
|
|
|
|
|
|
|
$automarkcmoptions2 = attendance_get_coursemodulenames($COURSE->id); |
|
|
|
$automarkcmoptions2 = attendance_get_coursemodulenames($COURSE->id); |
|
|
|
|
|
|
|
$mform->addElement('select', 'automarkcmid', get_string('selectactivity', 'attendance'), $automarkcmoptions2); |
|
|
|
$mform->setType('automarkcmid', PARAM_INT); |
|
|
|
$mform->hideif('automarkcmid', 'automark', 'neq', '3'); |
|
|
|
if (!empty($sess->automarkcompleted)) { |
|
|
|
$mform->hardFreeze('automarkcmid,automark,studentscanmark'); |
|
|
|
$mform->addElement('select', 'automarkcmid', get_string('selectactivity', 'attendance'), $automarkcmoptions2); |
|
|
|
$mform->setType('automarkcmid', PARAM_INT); |
|
|
|
$mform->hideif('automarkcmid', 'automark', 'neq', '3'); |
|
|
|
if (!empty($sess->automarkcompleted)) { |
|
|
|
$mform->hardFreeze('automarkcmid,automark,studentscanmark'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($studentscanmark)) { |
|
|
|
$mform->addElement('text', 'studentpassword', get_string('studentpassword', 'attendance')); |
|
|
|
$mform->setType('studentpassword', PARAM_TEXT); |
|
|
|