[svn r11895] display the informations about course - lp - user in lp_tracking

skala
Eric Marguin 18 years ago
parent 92310931e2
commit 01b8c74c45
  1. 18
      main/mySpace/lp_tracking.php
  2. 7
      main/newscorm/lp_stats.php

@ -121,10 +121,24 @@ Display :: display_header($nameTools);
$user_id = intval($_GET['student_id']);
$lp_id = intval($_GET['lp_id']);
echo '<div align="right">
$sql = 'SELECT name
FROM '.Database::get_course_table(TABLE_LP_MAIN, $_course['db_name']).'
WHERE id='.$lp_id;
$rs = api_sql_query($sql, __FILE__, __LINE__);
$lp_title = mysql_result($rs, 0, 0);
$sql = 'SELECT lastname, firstname
FROM '.Database::get_main_table(TABLE_MAIN_USER).'
WHERE user_id='.$user_id;
$rs = api_sql_query($sql, __FILE__, __LINE__);
$name = mysql_result($rs, 0, 0).' '.mysql_result($rs, 0, 1);
echo '<div align="left" style="float:left"><h4>'.$_course['title'].' - '.$lp_title.' - '.$name.'</h4></div>
<div align="right">
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.$_SERVER['PHP_SELF'].'?export=csv&'.$_SERVER['QUERY_STRING'].'"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
</div>';
</div>
<div class="clear"></div>';
$list = learnpath :: get_flat_ordered_items_list($lp_id);

@ -67,8 +67,11 @@ if (!empty ($_GET['extend_all'])) {
$extend_all_link = '<a href="'.api_get_self().'?action=stats&extend_all=1'.$url_suffix.'"><img src="../img/view_more_stats.gif" alt="extend_view" border="0"></a>';
}
$output .= "<tr><td><div class='title'>".htmlentities(get_lang('ScormMystatus'), ENT_QUOTES, $dokeos_charset)."</div></td></tr>"."<tr><td>&nbsp;</td></tr>"."<tr><td>"."<table border='0' class='data_table'><tr>\n".'<td width="16">'.$extend_all_link.'</td>'.'<td colspan="4" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormLessonTitle'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormStatus'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormScore'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormTime'), ENT_QUOTES, $dokeos_charset)."</div></td></tr>\n";
if($origin != 'tracking')
{
$output .= "<tr><td><div class='title'>".htmlentities(get_lang('ScormMystatus'), ENT_QUOTES, $dokeos_charset)."</div></td></tr>";
}
$output .= "<tr><td>&nbsp;</td></tr>"."<tr><td>"."<table border='0' class='data_table'><tr>\n".'<td width="16">'.$extend_all_link.'</td>'.'<td colspan="4" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormLessonTitle'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormStatus'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormScore'), ENT_QUOTES, $dokeos_charset)."</div></td>\n".'<td colspan="2" class="title"><div class="mystatusfirstrow">'.htmlentities(get_lang('ScormTime'), ENT_QUOTES, $dokeos_charset)."</div></td></tr>\n";
//going through the items using the $items[] array instead of the database order ensures
// we get them in the same order as in the imsmanifest file, which is rather random when using
// the database table

Loading…
Cancel
Save