Fixing attendance select by default is today + other fixes in the table see BT#4751

skala
Julio Montoya 12 years ago
parent 02b64be214
commit 002207c915
  1. 20
      main/attendance/attendance_sheet.php

@ -65,7 +65,7 @@ if (api_is_allowed_to_edit(null, true)) {
$default_filter = $_REQUEST['filter'];
}
} else {
$default_filter = 'all';
$default_filter = 'today';
}
$form->setDefaults(array('filter'=>$default_filter));
$param_filter = '&filter='.Security::remove_XSS($default_filter);
@ -175,11 +175,8 @@ if (api_is_allowed_to_edit(null, true)) {
<td><span title="<?php echo $username ?>"><?php echo $data['lastname'] ?></span></td>
<td><?php echo $data['firstname'] ?></td>
<td>
<div style="height:28px">
<center>
<div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar'])?$data['result_color_bar']:'none') ?>">
<?php echo $data['attendance_result'] ?></div>
</center>
<?php echo $data['attendance_result'] ?>
</div>
</td>
</tr>
@ -202,6 +199,7 @@ if (api_is_allowed_to_edit(null, true)) {
$datetime = $date.'<br />'.$time;
$img_lock = Display::return_icon('lock.gif',get_lang('DateUnLock'),array('class'=>'img_lock','id'=>'datetime_column_'.$calendar['id']));
if (!empty($calendar['done_attendance'])){
$datetime = '<font color="blue">'.$date.'<br />'.$time.'</font>';
}
@ -213,8 +211,8 @@ if (api_is_allowed_to_edit(null, true)) {
$img_lock = Display::return_icon('unlock.gif',get_lang('DateLock'),array('class'=>'img_unlock','id'=>'datetime_column_'.$calendar['id']));
}
$result .= '<th height="80px" width="800px">';
$result .= '<center><div style="font-size:10px;width:80px;">'.$datetime.'&nbsp;';
$result .= '<th width="800px">';
$result .= '<center><div style="font-size:10px;width:100px;">'.$datetime.'&nbsp;';
$result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin()?$img_lock:'').'</span>';
if ($is_locked_attendance == false) {
@ -240,8 +238,11 @@ if (api_is_allowed_to_edit(null, true)) {
$i = 0;
foreach ($users_in_course as $user) {
$class = '';
if ($i%2==0) {$class = 'row_even';}
else {$class = 'row_odd';}
if ($i%2==0) {
$class = 'row_even';
} else {
$class = 'row_odd';
}
?>
<tr class="<?php echo $class ?>">
<?php
@ -266,6 +267,7 @@ if (api_is_allowed_to_edit(null, true)) {
}
$disabled = 'disabled';
$style_td = '';
if ($next_attendance_calendar_id == $calendar['id']) {
if ($i%2==0)
$style_td = 'background-color:#eee;';

Loading…
Cancel
Save