|
@ -62,19 +62,22 @@ class mod_attendance_update_form extends moodleform { |
|
|
$endhour = floor($endtime / HOURSECS); |
|
|
$endhour = floor($endtime / HOURSECS); |
|
|
$endminute = floor(($endtime - $endhour * HOURSECS) / MINSECS); |
|
|
$endminute = floor(($endtime - $endhour * HOURSECS) / MINSECS); |
|
|
|
|
|
|
|
|
$data = array('sessiondate' => $sess->sessdate, |
|
|
$data = array( |
|
|
'sestime' => array('starthour' => $starthour, 'startminute' => $startminute, |
|
|
'sessiondate' => $sess->sessdate, |
|
|
'endhour' => $endhour, 'endminute' => $endminute), |
|
|
'sestime' => array('starthour' => $starthour, 'startminute' => $startminute, |
|
|
'sdescription' => $sess->description_editor, |
|
|
'endhour' => $endhour, 'endminute' => $endminute), |
|
|
'studentscanmark' => $sess->studentscanmark, |
|
|
'sdescription' => $sess->description_editor, |
|
|
'studentpassword' => $sess->studentpassword, |
|
|
'calendarevent' => $sess->calendarevent, |
|
|
'autoassignstatus' => $sess->autoassignstatus, |
|
|
'studentscanmark' => $sess->studentscanmark, |
|
|
'subnet' => $sess->subnet, |
|
|
'studentpassword' => $sess->studentpassword, |
|
|
'automark' => $sess->automark, |
|
|
'autoassignstatus' => $sess->autoassignstatus, |
|
|
'absenteereport' => $sess->absenteereport, |
|
|
'subnet' => $sess->subnet, |
|
|
'automarkcompleted' => 0, |
|
|
'automark' => $sess->automark, |
|
|
'preventsharedip' => $sess->preventsharedip, |
|
|
'absenteereport' => $sess->absenteereport, |
|
|
'preventsharediptime' => $sess->preventsharediptime); |
|
|
'automarkcompleted' => 0, |
|
|
|
|
|
'preventsharedip' => $sess->preventsharedip, |
|
|
|
|
|
'preventsharediptime' => $sess->preventsharediptime |
|
|
|
|
|
); |
|
|
if ($sess->subnet == $attendancesubnet) { |
|
|
if ($sess->subnet == $attendancesubnet) { |
|
|
$data['usedefaultsubnet'] = 1; |
|
|
$data['usedefaultsubnet'] = 1; |
|
|
} else { |
|
|
} else { |
|
@ -110,6 +113,11 @@ class mod_attendance_update_form extends moodleform { |
|
|
array('rows' => 1, 'columns' => 80), $defopts); |
|
|
array('rows' => 1, 'columns' => 80), $defopts); |
|
|
$mform->setType('sdescription', PARAM_RAW); |
|
|
$mform->setType('sdescription', PARAM_RAW); |
|
|
|
|
|
|
|
|
|
|
|
$mform->addElement('checkbox', 'calendarevent', '', get_string('calendarevent', 'attendance')); |
|
|
|
|
|
$mform->addHelpButton('calendarevent', 'calendarevent', 'attendance'); |
|
|
|
|
|
// XXX - this should be modified to use a different config setting if we keep enablecalendar's current meaning |
|
|
|
|
|
// $mform->setDefault('calendarevent', get_config('attendance', 'enablecalendar')); |
|
|
|
|
|
|
|
|
// If warnings allow selector for reporting. |
|
|
// If warnings allow selector for reporting. |
|
|
if (!empty(get_config('attendance', 'enablewarnings'))) { |
|
|
if (!empty(get_config('attendance', 'enablewarnings'))) { |
|
|
$mform->addElement('checkbox', 'absenteereport', '', get_string('includeabsentee', 'attendance')); |
|
|
$mform->addElement('checkbox', 'absenteereport', '', get_string('includeabsentee', 'attendance')); |
|
@ -185,7 +193,6 @@ class mod_attendance_update_form extends moodleform { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$mform->setDefaults($data); |
|
|
$mform->setDefaults($data); |
|
|
|
|
|
|
|
|
$this->add_action_buttons(true); |
|
|
$this->add_action_buttons(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|