|
|
|
@ -23,7 +23,7 @@ $toolName = get_lang('TeacherTimeReport'); |
|
|
|
|
// Access restrictions. |
|
|
|
|
api_protect_admin_script(); |
|
|
|
|
|
|
|
|
|
$form = new FormValidator('teacher_time_report'); |
|
|
|
|
$form = new FormValidator('teacher_time_report', 'get'); |
|
|
|
|
$startDate = new DateTime(api_get_local_time()); |
|
|
|
|
$startDate->modify('first day of this month'); |
|
|
|
|
$limitDate = new DateTime(api_get_local_time()); |
|
|
|
@ -372,27 +372,21 @@ $leftActions = Display::url( |
|
|
|
|
Display::return_icon('session.png', get_lang('Sessions'), [], ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'admin/teachers_time_by_session_report.php' |
|
|
|
|
); |
|
|
|
|
$exportUrlParams = [ |
|
|
|
|
'from' => $selectedFrom, |
|
|
|
|
'until' => $selectedUntil, |
|
|
|
|
'course' => $selectedCourse, |
|
|
|
|
'session' => $selectedSession, |
|
|
|
|
'teacher' => $selectedTeacher, |
|
|
|
|
'_qf__teacher_time_report' => '' |
|
|
|
|
]; |
|
|
|
|
$rightActions = Display::url( |
|
|
|
|
Display::return_icon('pdf.png', get_lang('ExportToPDF'), [], ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_self().'?'.http_build_query([ |
|
|
|
|
'export' => 'pdf', |
|
|
|
|
'from' => $selectedFrom, |
|
|
|
|
'until' => $selectedUntil, |
|
|
|
|
'course' => $selectedCourse, |
|
|
|
|
'session' => $selectedSession, |
|
|
|
|
'teacher' => $selectedTeacher |
|
|
|
|
]) |
|
|
|
|
api_get_self().'?export=pdf&'.http_build_query($exportUrlParams) |
|
|
|
|
); |
|
|
|
|
$rightActions .= Display::url( |
|
|
|
|
Display::return_icon('export_excel.png', get_lang('ExportExcel'), [], ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_self().'?'.http_build_query([ |
|
|
|
|
'export' => 'xls', |
|
|
|
|
'from' => $selectedFrom, |
|
|
|
|
'until' => $selectedUntil, |
|
|
|
|
'course' => $selectedCourse, |
|
|
|
|
'session' => $selectedSession, |
|
|
|
|
'teacher' => $selectedTeacher |
|
|
|
|
]) |
|
|
|
|
api_get_self().'?export=xls&'.http_build_query($exportUrlParams) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$tpl = new Template($toolName); |
|
|
|
|