|
|
@ -70,12 +70,9 @@ if (!empty($attendance_id)) { |
|
|
|
$attendance_data = $attendance->get_attendance_by_id($attendance_id); |
|
|
|
$attendance_data = $attendance->get_attendance_by_id($attendance_id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$htmlHeadXtra[] = '<script language="javascript"> |
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
|
|
|
|
|
|
|
$(function() { |
|
|
|
$(function() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("table th img").click(function() { |
|
|
|
$("table th img").click(function() { |
|
|
|
var col_id = this.id; |
|
|
|
var col_id = this.id; |
|
|
|
var col_split = col_id.split("_"); |
|
|
|
var col_split = col_id.split("_"); |
|
|
@ -118,8 +115,6 @@ $(function() { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); |
|
|
|
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); |
|
|
|
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/unlock.gif"); |
|
|
|
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/unlock.gif"); |
|
|
|
$(this).attr("title","'.get_lang('DateLock').'"); |
|
|
|
$(this).attr("title","'.get_lang('DateLock').'"); |
|
|
@ -235,12 +230,16 @@ switch ($action) { |
|
|
|
case 'attendance_delete' : |
|
|
|
case 'attendance_delete' : |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
$attendance_controller->attendance_delete($attendance_id); |
|
|
|
$attendance_controller->attendance_delete($attendance_id); |
|
|
|
} else { api_not_allowed();} |
|
|
|
} else { |
|
|
|
|
|
|
|
api_not_allowed(); |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'attendance_restore': |
|
|
|
case 'attendance_restore': |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
$attendance_controller->attendance_restore($attendance_id); |
|
|
|
$attendance_controller->attendance_restore($attendance_id); |
|
|
|
} else { api_not_allowed();} |
|
|
|
} else { |
|
|
|
|
|
|
|
api_not_allowed(); |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'attendance_sheet_list': |
|
|
|
case 'attendance_sheet_list': |
|
|
|
$attendance_controller->attendance_sheet($action, $attendance_id, $student_id); |
|
|
|
$attendance_controller->attendance_sheet($action, $attendance_id, $student_id); |
|
|
@ -251,7 +250,9 @@ switch ($action) { |
|
|
|
case 'attendance_sheet_add' : |
|
|
|
case 'attendance_sheet_add' : |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
if (api_is_allowed_to_edit(null, true)) { |
|
|
|
$attendance_controller->attendance_sheet($action, $attendance_id); |
|
|
|
$attendance_controller->attendance_sheet($action, $attendance_id); |
|
|
|
} else { api_not_allowed();} |
|
|
|
} else { |
|
|
|
|
|
|
|
api_not_allowed(); |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'lock_attendance' : |
|
|
|
case 'lock_attendance' : |
|
|
|
case 'unlock_attendance' : |
|
|
|
case 'unlock_attendance' : |
|
|
|