|
|
|
|
@ -7,11 +7,6 @@ |
|
|
|
|
* @package chamilo.tracking |
|
|
|
|
* @todo clean code - structure is unclear and difficult to modify |
|
|
|
|
*/ |
|
|
|
|
/** |
|
|
|
|
* Code |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/* INIT SECTION */ |
|
|
|
|
|
|
|
|
|
$uInfo = $_REQUEST['uInfo']; |
|
|
|
|
$view = $_REQUEST['view']; |
|
|
|
|
@ -174,18 +169,16 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
$offset = 0; |
|
|
|
|
} |
|
|
|
|
echo $navLink; |
|
|
|
|
|
|
|
|
|
if (!settype($offset, 'integer') || !settype($step, 'integer')) die('Offset or step variables are not integers.'); //sanity check of integer vars |
|
|
|
|
if( $is_allowedToTrackEverybodyInCourse ) { |
|
|
|
|
//sanity check of integer vars |
|
|
|
|
if (!settype($offset, 'integer') || !settype($step, 'integer')) die('Offset or step variables are not integers.'); |
|
|
|
|
if ($is_allowedToTrackEverybodyInCourse) { |
|
|
|
|
// list of users in this course |
|
|
|
|
$sql = "SELECT u.user_id, u.firstname,u.lastname |
|
|
|
|
FROM $TABLECOURSUSER cu , $TABLEUSER u |
|
|
|
|
WHERE cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." |
|
|
|
|
AND cu.course_code = '".Database::escape_string($_cid)."' |
|
|
|
|
LIMIT $offset,$step"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
} else { |
|
|
|
|
// list of users of this group |
|
|
|
|
$sql = "SELECT u.user_id, u.firstname,u.lastname |
|
|
|
|
FROM $TABLECOURSE_GROUPSUSER gu , $TABLEUSER u |
|
|
|
|
@ -198,7 +191,7 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
."<tr align='center' valign='top' bgcolor='#E6E6E6'>\n" |
|
|
|
|
."<td align='left'>",get_lang('UserName'),"</td>\n" |
|
|
|
|
."</tr>\n"; |
|
|
|
|
for($i = 0 ; $i < sizeof($list_users) ; $i++) { |
|
|
|
|
for ($i = 0 ; $i < sizeof($list_users) ; $i++) { |
|
|
|
|
echo "<tr valign='top' align='center'>\n" |
|
|
|
|
."<td align='left'>" |
|
|
|
|
."<a href='".api_get_self()."?uInfo=",$list_users[$i][0],"'>" |
|
|
|
|
@ -206,8 +199,7 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
."</a>". |
|
|
|
|
"</td>\n"; |
|
|
|
|
} |
|
|
|
|
echo "</table>\n"; |
|
|
|
|
|
|
|
|
|
echo "</table>"; |
|
|
|
|
echo $navLink; |
|
|
|
|
} else { |
|
|
|
|
// if uInfo is set |
|
|
|
|
@ -256,8 +248,8 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
"</td> |
|
|
|
|
</tr> |
|
|
|
|
"; |
|
|
|
|
if(!isset($view)) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if(!isset($view)) { |
|
|
|
|
$view ='0000000'; |
|
|
|
|
} |
|
|
|
|
//Logins |
|
|
|
|
@ -278,7 +270,6 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
echo get_lang('ErrorUserNotInGroup'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* Scorm contents and Learning Path |
|
|
|
|
*/ |
|
|
|
|
@ -306,7 +297,8 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
echo "<tr><td>"; |
|
|
|
|
echo "<a href='".api_get_self()."?view=".$view."&scormcontopen=".$ar['id']."&uInfo=".Security::remove_XSS($uInfo)."' class='specialLink'>$lp_title</a>"; |
|
|
|
|
echo "</td></tr>"; |
|
|
|
|
if ($ar['id']==$scormcontopen) { //have to list the students here |
|
|
|
|
if ($ar['id'] == $scormcontopen) { |
|
|
|
|
//have to list the students here |
|
|
|
|
$contentId=$ar['id']; |
|
|
|
|
$sql3 = "SELECT iv.status, iv.score, i.title, iv.total_time " . |
|
|
|
|
"FROM $tbl_learnpath_item i " . |
|
|
|
|
@ -344,7 +336,7 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
echo"</tr>"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$ar=Database::fetch_array($result); |
|
|
|
|
$ar = Database::fetch_array($result); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$noscorm=true; |
|
|
|
|
@ -367,7 +359,6 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) { |
|
|
|
|
</tr> |
|
|
|
|
"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// not allowed |
|
|
|
|
|