|
|
|
@ -1,16 +1,16 @@ |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action |
|
|
|
|
* @author Christian Fasanando <christian1827@gmail.com> |
|
|
|
|
* @author Julio Montoya <gugli100@gmail.com> Bug fixing, sql improvements |
|
|
|
|
* |
|
|
|
|
* @package chamilo.attendance |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action |
|
|
|
|
* @author Christian Fasanando <christian1827@gmail.com> |
|
|
|
|
* @author Julio Montoya <gugli100@gmail.com> Bug fixing, sql improvements |
|
|
|
|
* |
|
|
|
|
* @package chamilo.attendance |
|
|
|
|
*/ |
|
|
|
|
// name of the language file that needs to be included |
|
|
|
|
$language_file = array ('course_description', 'course_info', 'userInfo', 'admin', 'agenda','tracking', 'gradebook'); |
|
|
|
|
$language_file = array('course_description', 'course_info', 'userInfo', 'admin', 'agenda', 'tracking', 'gradebook'); |
|
|
|
|
|
|
|
|
|
// including files |
|
|
|
|
require_once '../inc/global.inc.php'; |
|
|
|
@ -48,11 +48,11 @@ $actions_calendar = array('calendar_list', 'calendar_add', 'calendar_edit', 'cal |
|
|
|
|
$action = 'attendance_list'; |
|
|
|
|
|
|
|
|
|
$course_id = ''; |
|
|
|
|
if (isset($_GET['cidReq'])){ |
|
|
|
|
if (isset($_GET['cidReq'])) { |
|
|
|
|
$course_id = $_GET['cidReq']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($_GET['action']) && (in_array($_GET['action'],$actions) || in_array($_GET['action'],$actions_calendar))) { |
|
|
|
|
if (isset($_GET['action']) && (in_array($_GET['action'], $actions) || in_array($_GET['action'], $actions_calendar))) { |
|
|
|
|
$action = $_GET['action']; |
|
|
|
|
} |
|
|
|
|
if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') { |
|
|
|
@ -161,10 +161,10 @@ $(function() { |
|
|
|
|
$(".advanced_parameters").click(function() { |
|
|
|
|
if ($("#id_qualify").css("display") == "none") { |
|
|
|
|
$("#id_qualify").css("display","block"); |
|
|
|
|
$("#img_plus_and_minus").html(\' '.Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedParameters').'\'); |
|
|
|
|
$("#img_plus_and_minus").html(\' '.Display::return_icon('div_hide.gif', get_lang('Hide'), array('style' => 'vertical-align:middle')).' '.get_lang('AdvancedParameters').'\'); |
|
|
|
|
} else { |
|
|
|
|
$("#id_qualify").css("display","none"); |
|
|
|
|
$("#img_plus_and_minus").html(\' '.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedParameters').'\'); |
|
|
|
|
$("#img_plus_and_minus").html(\' '.Display::return_icon('div_show.gif', get_lang('Show'), array('style' => 'vertical-align:middle')).' '.get_lang('AdvancedParameters').'\'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -172,12 +172,12 @@ $(function() { |
|
|
|
|
</script>'; |
|
|
|
|
|
|
|
|
|
// interbreadcrumbs |
|
|
|
|
if (!empty($_GET['gradebook']) && $_GET['gradebook']=='view' ) { |
|
|
|
|
$_SESSION['gradebook']=Security::remove_XSS($_GET['gradebook']); |
|
|
|
|
$gradebook= $_SESSION['gradebook']; |
|
|
|
|
if (!empty($_GET['gradebook']) && $_GET['gradebook'] == 'view') { |
|
|
|
|
$_SESSION['gradebook'] = Security::remove_XSS($_GET['gradebook']); |
|
|
|
|
$gradebook = $_SESSION['gradebook']; |
|
|
|
|
} elseif (empty($_GET['gradebook'])) { |
|
|
|
|
unset($_SESSION['gradebook']); |
|
|
|
|
$gradebook= ''; |
|
|
|
|
$gradebook = ''; |
|
|
|
|
} |
|
|
|
|
$param_gradebook = ''; |
|
|
|
|
if (isset($_SESSION['gradebook'])) { |
|
|
|
@ -188,29 +188,29 @@ if (api_is_drh() && isset($_GET['student_id'])) { |
|
|
|
|
$student_id = intval($_GET['student_id']); |
|
|
|
|
$student_param = '&student_id='.$student_id; |
|
|
|
|
$student_info = api_get_user_info($student_id); |
|
|
|
|
$student_name = api_get_person_name($student_info['firstname'],$student_info['lastname']); |
|
|
|
|
$interbreadcrumb[] = array ('url' => api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id, 'name' => $student_name); |
|
|
|
|
$student_name = api_get_person_name($student_info['firstname'], $student_info['lastname']); |
|
|
|
|
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id, 'name' => $student_name); |
|
|
|
|
} |
|
|
|
|
if (!empty($gradebook)) { |
|
|
|
|
$interbreadcrumb[] = array ('url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php', 'name' => get_lang('ToolGradebook')); |
|
|
|
|
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php', 'name' => get_lang('ToolGradebook')); |
|
|
|
|
} |
|
|
|
|
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=attendance_list'.$param_gradebook.$student_param, 'name' => get_lang('ToolAttendance')); |
|
|
|
|
$interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=attendance_list'.$param_gradebook.$student_param, 'name' => get_lang('ToolAttendance')); |
|
|
|
|
if ($action == 'attendance_add') { |
|
|
|
|
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('CreateANewAttendance')); |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateANewAttendance')); |
|
|
|
|
} |
|
|
|
|
if ($action == 'attendance_edit') { |
|
|
|
|
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('Edit')); |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); |
|
|
|
|
} |
|
|
|
|
if ($action == 'attendance_sheet_list' || $action == 'attendance_sheet_add') { |
|
|
|
|
$interbreadcrumb[] = array ('url' => '#', 'name' => $attendance_data['name']); |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => $attendance_data['name']); |
|
|
|
|
} |
|
|
|
|
if ($action == 'calendar_list' || $action == 'calendar_edit' || $action == 'calendar_delete' || $action == 'calendar_all_delete') { |
|
|
|
|
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.$param_gradebook, 'name' => $attendance_data['name']); |
|
|
|
|
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('AttendanceCalendar')); |
|
|
|
|
$interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.$param_gradebook, 'name' => $attendance_data['name']); |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AttendanceCalendar')); |
|
|
|
|
} |
|
|
|
|
if ($action == 'calendar_add') { |
|
|
|
|
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.$param_gradebook, 'name' => $attendance_data['name']); |
|
|
|
|
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('AddDateAndTime')); |
|
|
|
|
$interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.$param_gradebook, 'name' => $attendance_data['name']); |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddDateAndTime')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// delete selected attendance |
|
|
|
|