|
@ -387,8 +387,8 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
private function construct_take_session_info(attendance_take_data $takedata) { |
|
|
private function construct_take_session_info(attendance_take_data $takedata) { |
|
|
$sess = $takedata->sessioninfo; |
|
|
$sess = $takedata->sessioninfo; |
|
|
$date = userdate($sess->sessdate, get_string('strftimedate')); |
|
|
$date = userdate($sess->sessdate, get_string('strftimedate')); |
|
|
$starttime = userdate($sess->sessdate, get_string('strftimehm', 'attendance')); |
|
|
$starttime = attendance_strftimehm($sess->sessdate); |
|
|
$endtime = userdate($sess->sessdate + $sess->duration, get_string('strftimehm', 'attendance')); |
|
|
$endtime = attendance_strftimehm($sess->sessdate + $sess->duration); |
|
|
$time = html_writer::tag('nobr', $starttime . ($sess->duration > 0 ? ' - ' . $endtime : '')); |
|
|
$time = html_writer::tag('nobr', $starttime . ($sess->duration > 0 ? ' - ' . $endtime : '')); |
|
|
$sessinfo = $date.' '.$time; |
|
|
$sessinfo = $date.' '.$time; |
|
|
$sessinfo .= html_writer::empty_tag('br'); |
|
|
$sessinfo .= html_writer::empty_tag('br'); |
|
@ -485,9 +485,8 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
|
|
|
|
|
|
$options = array(); |
|
|
$options = array(); |
|
|
foreach ($takedata->sessions4copy as $sess) { |
|
|
foreach ($takedata->sessions4copy as $sess) { |
|
|
$start = userdate($sess->sessdate, get_string('strftimehm', 'attendance')); |
|
|
$start = attendance_strftimehm($sess->sessdate); |
|
|
$end = $sess->duration ? ' - '.userdate($sess->sessdate + $sess->duration, |
|
|
$end = $sess->duration ? ' - '.attendance_strftimehm($sess->sessdate + $sess->duration) : ''; |
|
|
get_string('strftimehm', 'attendance')) : ''; |
|
|
|
|
|
$options[$sess->id] = $start . $end; |
|
|
$options[$sess->id] = $start . $end; |
|
|
} |
|
|
} |
|
|
$select = new single_select($takedata->url(array(), array('copyfrom')), 'copyfrom', $options); |
|
|
$select = new single_select($takedata->url(array(), array('copyfrom')), 'copyfrom', $options); |
|
@ -1153,7 +1152,7 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
foreach ($reportdata->sessions as $sess) { |
|
|
foreach ($reportdata->sessions as $sess) { |
|
|
$sesstext = userdate($sess->sessdate, get_string('strftimedm', 'attendance')); |
|
|
$sesstext = userdate($sess->sessdate, get_string('strftimedm', 'attendance')); |
|
|
$sesstext .= html_writer::empty_tag('br'); |
|
|
$sesstext .= html_writer::empty_tag('br'); |
|
|
$sesstext .= userdate($sess->sessdate, '('.get_string('strftimehm', 'attendance').')'); |
|
|
$sesstext .= attendance_strftimehm($sess->sessdate); |
|
|
$capabilities = array( |
|
|
$capabilities = array( |
|
|
'mod/attendance:takeattendances', |
|
|
'mod/attendance:takeattendances', |
|
|
'mod/attendance:changeattendances' |
|
|
'mod/attendance:changeattendances' |
|
|