Fix issue using course code instead of course ID in mySpace student time tracking page - fixes #1492

pull/2487/head
Yannick Warnier 9 years ago
parent bf64dbb63d
commit c3ddad3164
  1. 2
      main/inc/ajax/myspace.ajax.php
  2. 4
      main/inc/lib/myspace.lib.php
  3. 2
      main/mySpace/access_details.php

@ -55,7 +55,7 @@ switch ($action) {
if (is_array($sql_result) && count($sql_result) > 0) {
$db['is_empty'] = false;
$db['result'] = convert_to_string($sql_result);
$rst = get_stats($user_id, $course_code, $start_date, $end_date);
$rst = get_stats($user_id, $courseId, $start_date, $end_date);
$foo_stats = '<strong>' . get_lang('Total') . ': </strong>' . $rst['total'] . '<br />';
$foo_stats .= '<strong>' . get_lang('Average') . ': </strong>' . $rst['avg'] . '<br />';
$foo_stats .= '<strong>' . get_lang('Quantity') . ' : </strong>' . $rst['times'] . '<br />';

@ -2798,10 +2798,10 @@ function grapher($sql_result, $start_date, $end_date, $type = "")
$last_days = 5;
$last_months = 3;
for ($i = $last_days; $i >= 0; $i--) {
$main_day[date ('d-m-Y', mktime () - $i * 3600 * 24)] = 0;
$main_day[date ('d-m-Y', time () - $i * 3600 * 24)] = 0;
}
for ($i = $last_months; $i >= 0; $i--) {
$main_month_year[date ('m-Y', mktime () - $i * 30 * 3600 * 24)] = 0;
$main_month_year[date ('m-Y', time () - $i * 30 * 3600 * 24)] = 0;
}
$i = 0;

@ -126,7 +126,7 @@ $result_to_print = convert_to_string($sql_result);
echo Display::page_header(get_lang('DetailsStudentInCourse'));
echo Display::page_subheader(
get_lang('User').': '.$userInfo['complete_name'].' - '.get_lang('Course').': '.$course_code
get_lang('User').': '.$userInfo['complete_name'].' - '.get_lang('Course').': '.$courseInfo['title'] . ' (' . $course_code . ')'
);
$form->setDefaults(array('from' => $from, 'to' => $to));

Loading…
Cancel
Save