|
|
@ -11,6 +11,13 @@ |
|
|
|
// protect a course script |
|
|
|
// protect a course script |
|
|
|
api_protect_course_script(true); |
|
|
|
api_protect_course_script(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$attendance_states = array( |
|
|
|
|
|
|
|
'1' => get_lang('Present'), |
|
|
|
|
|
|
|
'0' => get_lang('Absent'), |
|
|
|
|
|
|
|
'2' => get_lang('VeryLate'), |
|
|
|
|
|
|
|
'3' => get_lang('Late'), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit(null, true) || api_is_coach(api_get_session_id(), api_get_course_id())) { |
|
|
|
if (api_is_allowed_to_edit(null, true) || api_is_coach(api_get_session_id(), api_get_course_id())) { |
|
|
|
|
|
|
|
|
|
|
|
$param_gradebook = ''; |
|
|
|
$param_gradebook = ''; |
|
|
@ -268,12 +275,7 @@ if (api_is_allowed_to_edit(null, true) || api_is_coach(api_get_session_id(), api |
|
|
|
echo '<tbody>'; |
|
|
|
echo '<tbody>'; |
|
|
|
$i = 0; |
|
|
|
$i = 0; |
|
|
|
|
|
|
|
|
|
|
|
$attendance_states = array( |
|
|
|
|
|
|
|
'1' => get_lang('Present'), |
|
|
|
|
|
|
|
'0' => get_lang('Absent'), |
|
|
|
|
|
|
|
'2' => get_lang('VeryLate'), |
|
|
|
|
|
|
|
'3' => get_lang('Late'), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
$default_presence_value = 1; |
|
|
|
$default_presence_value = 1; |
|
|
|
|
|
|
|
|
|
|
|
foreach ($users_in_course as $user) { |
|
|
|
foreach ($users_in_course as $user) { |
|
|
@ -406,8 +408,10 @@ if (api_is_allowed_to_edit(null, true) || api_is_coach(api_get_session_id(), api |
|
|
|
?> |
|
|
|
?> |
|
|
|
<tr class="<?php echo $class ?>">
|
|
|
|
<tr class="<?php echo $class ?>">
|
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<?php echo $presence['presence']?Display::return_icon('checkbox_on.gif',get_lang('Presence')):Display::return_icon('checkbox_off.gif',get_lang('Presence')) ?> |
|
|
|
<?php |
|
|
|
<?php echo " ".$presence['date_time'] ?> |
|
|
|
echo $attendance_states[$presence['presence']]; |
|
|
|
|
|
|
|
//echo $presence['presence']?Display::return_icon('checkbox_on.gif',get_lang('Presence')):Display::return_icon('checkbox_off.gif',get_lang('Presence')) |
|
|
|
|
|
|
|
echo " ".$presence['date_time'] ?> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<?php } |
|
|
|
<?php } |
|
|
|