Add report title - refs BT#9087

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent f5c9867957
commit 970af92ce7
  1. 12
      main/admin/teacher_time_report.php
  2. 3
      main/template/default/admin/teacher_time_report.tpl

@ -60,6 +60,9 @@ $htmlHeadXtra[] = '
$withFilter = false;
$reportTitle = 'TimeReportIncludingAllCoursesAndSessionsByTeacher';
$reportSubTitle = sprintf(get_lang('TimeSpentBetweenXAndY'), $selectedFrom, $selectedUntil);
$rows = array();
if (!empty($selectedCourse)) {
@ -67,6 +70,8 @@ if (!empty($selectedCourse)) {
$course = api_get_course_info($selectedCourse);
$reportTitle = sprintf(get_lang('TimeReportByCourseX'), $course['title']);
$sessionsByCourse = SessionManager::get_session_by_course($selectedCourse);
foreach ($sessionsByCourse as $session) {
@ -108,6 +113,8 @@ if (!empty($selectedSession)) {
$session = api_get_session_info($selectedSession);
$reportTitle = sprintf(get_lang('TimeReportBySessionX'), $session['name']);
$courses = SessionManager::get_course_list_by_session_id($selectedSession);
foreach ($courses as $course) {
@ -149,6 +156,8 @@ if (!empty($selectedTeacher)) {
$coach = api_get_user_info($selectedTeacher);
$reportTitle = sprintf(get_lang('TimeReportByTeacherX'), $coach['complete_name']);
$courses = SessionManager::getCoursesListByCourseCoach($selectedTeacher);
foreach ($courses as $course) {
@ -203,6 +212,9 @@ $startDate->modify('+1 day');
$limitDate->modify('+1 day');
$tpl = new Template($toolName);
$tpl->assign('reportTitle', $reportTitle);
$tpl->assign('reportSubTitle', $reportSubTitle);
$tpl->assign('filterStartDate', $startDate->format('Y-m-d'));
$tpl->assign('filterEndDate', $limitDate->format('Y-m-d'));
$tpl->assign('filterMaxDate', $limitDate->format('Y-m-d'));

@ -41,6 +41,7 @@
});
</script>
<div class="span12">
<h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
<form class="form-horizontal" method="post">
<div class="control-group">
<label class="control-label" for="course">{{ 'Course' | get_lang }}</label>
@ -89,7 +90,7 @@
</div>
</div>
</form>
<h1 class="page-header">{{ 'GlobalTeacherTimeReport' | get_lang }}</h1>
<h2 class="page-header">{{ reportTitle }} <small>{{ reportSubTitle }}</small></h2>
<table class="table">
<thead>
<tr>

Loading…
Cancel
Save