Fix lang variables. see BT#10106

1.10.x
Julio Montoya 11 years ago
parent e6367791e4
commit e297d7cb62
  1. 26
      main/inc/lib/tracking.lib.php
  2. 8
      main/mySpace/myStudents.php
  3. 47
      main/tracking/courseLog.php

@ -6160,8 +6160,8 @@ class TrackingCourseLog
$sql .= " ORDER BY col$column $direction ";
$sql .= " LIMIT $from,$number_of_items";
$res = Database::query($sql);
$users = array();
$res = Database::query($sql);
$users = array();
$course_info = api_get_course_info($course_code);
$total_surveys = 0;
@ -6196,11 +6196,18 @@ class TrackingCourseLog
$courseInfo = api_get_course_info($course_code);
$courseId = $courseInfo['real_id'];
$user['official_code'] = $user['col0'];
$user['lastname'] = $user['col1'];
$user['firstname'] = $user['col2'];
$user['username'] = $user['col3'];
$user['time'] = api_time_to_hms(Tracking::get_time_spent_on_the_course($user['user_id'], $courseId, $session_id));
$user['official_code'] = $user['col0'];
$user['lastname'] = $user['col1'];
$user['firstname'] = $user['col2'];
$user['username'] = $user['col3'];
$user['time'] = api_time_to_hms(
Tracking::get_time_spent_on_the_course(
$user['user_id'],
$courseId,
$session_id
)
);
$avg_student_score = Tracking::get_avg_student_score(
$user['user_id'],
@ -6215,10 +6222,11 @@ class TrackingCourseLog
array(),
$session_id
);
if (empty($avg_student_progress)) {
$avg_student_progress=0;
}
$user['average_progress'] = $avg_student_progress.'%';
$user['average_progress'] = $avg_student_progress.'%';
$total_user_exercise = Tracking::get_exercise_student_progress(
$total_exercises,
@ -6227,7 +6235,7 @@ class TrackingCourseLog
$session_id
);
$user['exercise_progress'] = $total_user_exercise;
$user['exercise_progress'] = $total_user_exercise;
$total_user_exercise = Tracking::get_exercise_student_average_best_attempt(
$total_exercises,

@ -426,8 +426,8 @@ if (!empty($student_id)) {
get_lang('Tracking', '')
);
$csv_content[] = array(
get_lang('FirstLogin', ''),
get_lang('LatestLogin', ''),
get_lang('FirstLoginInPlatform', ''),
get_lang('LatestLoginInPlatform', ''),
get_lang('TimeSpentInTheCourse', ''),
get_lang('Progress', ''),
get_lang('Score', '')
@ -544,11 +544,11 @@ if (!empty($student_id)) {
<tr>
<th colspan="2"><?php echo get_lang('Tracking'); ?></th>
</tr>
<tr><td align="right"><?php echo get_lang('FirstLogin') ?></td>
<tr><td align="right"><?php echo get_lang('FirstLoginInPlatform') ?></td>
<td align="left"><?php echo $first_connection_date ?></td>
</tr>
<tr>
<td align="right"><?php echo get_lang('LatestLogin') ?></td>
<td align="right"><?php echo get_lang('LatestLoginInPlatform') ?></td>
<td align="left"><?php echo $last_connection_date ?></td>
</tr>
<?php if (isset($_GET['details']) && $_GET['details'] == 'true') {?>

@ -335,7 +335,11 @@ echo Display::page_subheader2(get_lang('StudentList'));
$is_western_name_order = api_is_western_name_order();
if (count($a_students) > 0) {
$form = new FormValidator('reminder_form', 'get', api_get_path(REL_CODE_PATH).'announcements/announcements.php');
$form = new FormValidator(
'reminder_form',
'get',
api_get_path(REL_CODE_PATH).'announcements/announcements.php'
);
$renderer = $form->defaultRenderer();
$renderer->setElementTemplate(
'<span>{label} {element}</span>&nbsp;<button class="save" type="submit">'.get_lang('SendNotification').'</button>',
@ -390,9 +394,9 @@ if (count($a_students) > 0) {
array('TrackingCourseLog', 'get_user_data'),
(api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2);
$parameters['cidReq'] = Security::remove_XSS($_GET['cidReq']);
$parameters['id_session'] = $session_id;
$parameters['from'] = isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
$parameters['cidReq'] = Security::remove_XSS($_GET['cidReq']);
$parameters['id_session'] = $session_id;
$parameters['from'] = isset($_GET['myspace']) ? Security::remove_XSS($_GET['myspace']) : null;
$table->set_additional_parameters($parameters);
$headers = array();
@ -413,16 +417,21 @@ if (count($a_students) > 0) {
$table->set_header(3, get_lang('Login'), false);
$headers['login'] = get_lang('Login');
$table->set_header(4, get_lang('TrainingTime').'&nbsp;'.Display::return_icon('info3.gif', get_lang('TrainingTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$table->set_header(4, get_lang('TrainingTime').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('TrainingTimeInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['training_time'] = get_lang('TrainingTime');
$table->set_header(5, get_lang('CourseProgress').'&nbsp;'.Display::return_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$table->set_header(5, get_lang('CourseProgress').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['course_progress'] = get_lang('CourseProgress');
$table->set_header(6, get_lang('ExerciseProgress').'&nbsp;'.Display::return_icon('info3.gif', get_lang('ExerciseProgressInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$table->set_header(6, get_lang('ExerciseProgress').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('ExerciseProgressInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['exercise_progress'] = get_lang('ExerciseProgress');
$table->set_header(7, get_lang('ExerciseAverage').'&nbsp;'.Display::return_icon('info3.gif', get_lang('ExerciseAverageInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$table->set_header(7, get_lang('ExerciseAverage').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('ExerciseAverageInfo'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['exercise_average'] = get_lang('ExerciseAverage');
$table->set_header(8, get_lang('Score').'&nbsp;'.Display::return_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$table->set_header(8, get_lang('Score').'&nbsp;'.
Display::return_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array('align' => 'absmiddle', 'hspace' => '3px')), false, array('style' => 'width:110px;'));
$headers['score'] = get_lang('Score');
$table->set_header(9, get_lang('Student_publication'), false);
$headers['student_publication'] = get_lang('Student_publication');
@ -432,10 +441,10 @@ if (count($a_students) > 0) {
if (empty($session_id)) {
$table->set_header(11, get_lang('Survey'), false);
$headers['survey'] = get_lang('Survey');
$table->set_header(12, get_lang('FirstLogin'), false);
$headers['first_login'] = get_lang('FirstLogin');
$table->set_header(13, get_lang('LatestLogin'), false);
$headers['latest_login'] = get_lang('LatestLogin');
$table->set_header(12, get_lang('FirstLoginInCourse'), false);
$headers['first_login'] = get_lang('FirstLoginInCourse');
$table->set_header(13, get_lang('LatestLoginInCourse'), false);
$headers['latest_login'] = get_lang('LatestLoginInCourse');
if (isset($_GET['additional_profile_field']) and is_numeric($_GET['additional_profile_field'])) {
$table->set_header(14, $extra_info['display_text'], false);
$headers['display_text'] = $extra_info['display_text'];
@ -446,10 +455,10 @@ if (count($a_students) > 0) {
$headers['details'] = get_lang('Details');
}
} else {
$table->set_header(11, get_lang('FirstLogin'), false);
$headers['first_login'] = get_lang('FirstLogin');
$table->set_header(12, get_lang('LatestLogin'), false);
$headers['latest_login'] = get_lang('LatestLogin');
$table->set_header(11, get_lang('FirstLoginInCourse'), false);
$headers['first_login'] = get_lang('FirstLoginInCourse');
$table->set_header(12, get_lang('LatestLoginInCourse'), false);
$headers['latest_login'] = get_lang('LatestLoginInCourse');
if (isset($_GET['additional_profile_field']) and is_numeric($_GET['additional_profile_field'])) {
$table->set_header(13, $extra_info['display_text'], false);
@ -508,8 +517,8 @@ if ($export_csv) {
$csv_headers[] = get_lang('Survey');
}
$csv_headers[] = get_lang('FirstLogin', '');
$csv_headers[] = get_lang('LatestLogin', '');
$csv_headers[] = get_lang('FirstLoginInCourse', '');
$csv_headers[] = get_lang('LatestLoginInCourse', '');
if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) {
$csv_headers[] = $extra_info['display_text'];

Loading…
Cancel
Save