|
|
@ -177,12 +177,21 @@ function attendance_form_sessiondate_selector (MoodleQuickForm $mform) { |
|
|
|
} |
|
|
|
|
|
|
|
$sesendtime = array(); |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'from', '', get_string('from', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'starthour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'startminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'to', '', get_string('to', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endhour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
if (!right_to_left()) { |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'from', '', get_string('from', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'starthour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'startminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'to', '', get_string('to', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endhour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
} else { |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'from', '', get_string('from', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'startminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'starthour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('static', 'to', '', get_string('to', 'attendance')); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endminute', get_string('minute', 'form'), $minutes, false, true); |
|
|
|
$sesendtime[] =& $mform->createElement('select', 'endhour', get_string('hour', 'form'), $hours, false, true); |
|
|
|
} |
|
|
|
$mform->addGroup($sesendtime, 'sestime', get_string('time', 'attendance'), array(' '), true); |
|
|
|
} |
|
|
|
|
|
|
@ -1178,4 +1187,4 @@ function attendance_return_passwords($session) { |
|
|
|
|
|
|
|
$sql = 'SELECT * FROM {attendance_rotate_passwords} WHERE attendanceid = ? AND expirytime > ? ORDER BY expirytime ASC'; |
|
|
|
return json_encode($DB->get_records_sql($sql, ['attendanceid' => $session->id, time()], $strictness = IGNORE_MISSING)); |
|
|
|
} |
|
|
|
} |
|
|
|