Minor - fix php errors, update lang vars

pull/3984/head
Julio 4 years ago
parent 99ec75abbb
commit 822a3a2306
  1. 4
      public/main/inc/lib/attendance.lib.php
  2. 3
      public/main/inc/lib/course.lib.php
  3. 18
      public/main/mySpace/myStudents.php

@ -2171,7 +2171,7 @@ class Attendance
* @return array
*/
public function getCoursesWithAttendance(
$studentId = 0,
int $studentId,
DateTime $startDate = null,
DateTime $endDate = null,
$orderDesc = false
@ -2192,7 +2192,7 @@ class Attendance
$i = 0;
foreach ($courses as $courseItem) {
$i++;
$courseId = $courseItem['course_id'];
$courseId = $courseItem['real_id'];
/* Get all attendance by courses*/
$attendanceList = $attendanceLib->getAttendanceList(api_get_course_entity($courseId));

@ -2850,7 +2850,6 @@ class CourseManager
if ($loadSpecialCourses) {
$specialCourseList = self::get_special_course_list();
if (!empty($specialCourseList)) {
$specialCourseToString = '"'.implode('","', $specialCourseList).'"';
$withSpecialCourses = ' AND course.id IN ('.$specialCourseToString.')';
@ -2860,12 +2859,10 @@ class CourseManager
if (!empty($withSpecialCourses)) {
$sql = "SELECT DISTINCT (course.code),
course.id as real_id,
course_category.code AS category,
course.title
FROM $tbl_course_user course_rel_user
LEFT JOIN $tbl_course course
ON course.id = course_rel_user.c_id
LEFT JOIN $tblCourseCategory ON course_category.id = course.category_id
INNER JOIN $tableCourseUrl url
ON (course.id = url.c_id)
WHERE url.access_url_id = $urlId

@ -1042,7 +1042,7 @@ if (isset($_GET['action']) && 'all_attendance' === $_GET['action']) {
$form->addDateTimePicker(
'startDate',
[
get_lang('ExeStartTime'),
get_lang('Start date'),
],
[
'form_name' => 'attendance_calendar_edit',
@ -1052,7 +1052,7 @@ if (isset($_GET['action']) && 'all_attendance' === $_GET['action']) {
$form->addDateTimePicker(
'endDate',
[
get_lang('ExeEndTime'),
get_lang('End date'),
],
[
'form_name' => 'attendance_calendar_edit',
@ -1068,15 +1068,15 @@ if (isset($_GET['action']) && 'all_attendance' === $_GET['action']) {
$data = $attendance->getCoursesWithAttendance($studentId, $startDate, $endDate);
// 'attendance from %s to %s'
$title = sprintf(get_lang('AttendanceFromXToY'), $startDateText, $endDateText);
$title = sprintf(get_lang('Attendance from %s to %s'), $startDateText, $endDateText);
echo '
<h3>'.$title.'</h3>
<div class="">
<table class="table table-striped table-hover table-responsive">
<thead>
<tr>
<th>'.get_lang('DateExo').'</th>
<th>'.get_lang('Training').'</th>
<th>'.get_lang('Date').'</th>
<th>'.get_lang('Course').'</th>
<th>'.get_lang('Present').'</th>
</tr>
</thead>
@ -1100,7 +1100,7 @@ if (isset($_GET['action']) && 'all_attendance' === $_GET['action']) {
<td>'.$date.'</td>
<td>'
.'<a
title="'.get_lang('GoAttendance').'"
title="'.get_lang('Go to attendances').'"
href="'.api_get_path(WEB_CODE_PATH).
'attendance/index.php?cid='.$attendanceWork['courseId'].'&sid='.$sId.'&student_id='.$studentId.'">'
.$attendanceWork['courseTitle']." $printSession ".'
@ -1199,9 +1199,9 @@ if (!empty($userGroups)) {
<th>';
echo get_lang('Classes');
echo '</th>
</tr>
</thead>
<tbody>';
</tr>
</thead>
<tbody>';
foreach ($userGroups as $class) {
echo '<tr><td>'.$class.'</td></tr>';
}

Loading…
Cancel
Save