Source for file personnalLog.php
Documentation is available at personnalLog.php
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
==============================================================================
==============================================================================
* @author Thomas Depraetere
* @author Christophe Gesche
* @author Sebastien Piraux
* @package dokeos.tracking
==============================================================================
==============================================================================
==============================================================================
// name of the language file that needs to be included
$language_file = "tracking";
include('../inc/global.inc.php');
$interbreadcrumb[]= array ("url"=> "../auth/profile.php", "name"=> get_lang('ModifyProfile'));
$htmlHeadXtra[] = "<style type=\"text/css\">
.secLine {background-color : #E6E6E6;}
.content {padding-left : 15px; padding-right : 15px;}
.specialLink{color : #0000FF;}
<style media='print' type='text/css'>
td {border-bottom: thin dashed gray;}
-----------------------------------------------------------
-----------------------------------------------------------
//Remove all characters different than 0 and 1 from $view parameter
$TABLETRACK_ACCESS = $_configuration['statistics_database']. "`.`track_e_access";
$TABLETRACK_LINKS = $_configuration['statistics_database']. "`.`track_e_links";
$TABLETRACK_DOWNLOADS = $_configuration['statistics_database']. "`.`track_e_downloads";
$TABLETRACK_LOGIN = $_configuration['statistics_database']. "`.`track_e_login";
$TABLETRACK_EXERCICES = $_configuration['statistics_database']. "`.`track_e_exercices";
$limitOfDisplayedLogins = 25; // number of logins to display
include(api_get_path(LIBRARY_PATH). "statsUtils.lib.inc.php");
////////////// OUTPUT //////////////////////
==============================================================================
==============================================================================
if ( $_configuration['tracking_enabled'] )
// show all : view must be equal to the sum of all view values (1024+512+...+64)
<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">
if(empty($view)) $view = "0000000";
/***************************************************************************
***************************************************************************/
<font color='#0000FF'>- </font>
$sql = "SELECT `login_date`
FROM `". $TABLETRACK_LOGIN. "`
WHERE `login_user_id` = '". $_user['user_id']. "'
ORDER BY `login_date` DESC
LIMIT ". $limitOfDisplayedLogins. "";
echo "<tr><td style='padding-left : 40px;' valign='top'>". get_lang('LoginsExplaination'). "<br/>";
<table width='100%' cellpadding='2' cellspacing='1' border='0' align='center'>";
while ( list ($key,$value) = each($results))
//$beautifulDate = $langDay_of_weekNames['long'][date("w" , $timestamp)].date(" d " , $timestamp).$langMonthNames['long'][date("n", $timestamp)-1].date(" Y" , $timestamp);
//$beautifulHour = date("H : i" , $timestamp);
if(!isset ($previousDate))
$sql = "SELECT `access_tool`, count(access_tool), `access_cours_code`
FROM `". $TABLETRACK_ACCESS. "`
WHERE `access_user_id` = '". $_user['user_id']. "'".
//AND access_tool IS NOT NULL
"AND access_date > '". $value. "'
AND access_date < '". $previousDate. "'
GROUP BY access_tool, access_cours_code
ORDER BY access_cours_code ASC";
<table width='50%' cellpadding='0' cellspacing='0' border='0' >";
for($j = 0 ; $j < count($results2) ; $j++ )
// if course is different, write the name of the course
if($results2[$j][2] != $previousCourse)
<td colspan='2' width='100%' style='padding-left : 40px;'>
// if count != de 0 then display toolname et number of visits, else its a course visit
if( $results2[$j][1] != 0 )
echo "<td width='70%' style='padding-left : 60px;'>". get_lang(ucfirst($results2[$j][0])). "</td>";
echo "<td width='30%' align='right'>". $results2[$j][1]. " ". get_lang('Visits'). "</td>";
$previousCourse = $results2[$j][2];
echo "<td colspan='2' bgcolor='#eeeeee' align='center' >". get_lang('NoResult'). "</td>";
+<font color='#0000FF'> </font><a href='". api_get_self(). "?view=". $tempView. "' class='specialLink'>". get_lang('Logins'). "</a>
/***************************************************************************
***************************************************************************/
<font color='#0000FF'>- </font><b>".get_lang('ExercicesResults')."</b> [<a href='".api_get_self()."?view=".$tempView."'>".get_lang('Close')."</a>]
echo " Ceci est amen etre dplac vers la page de garde des exercices ";
$sql = "SELECT `ce`.`title`, `te`.`exe_result` , `te`.`exe_weighting`, `te`.`exe_date`
FROM `$TABLECOURSE_EXERCICES` AS ce , `$TABLETRACK_EXERCICES` AS te
WHERE `te`.`exe_user_id` = '".$_user['user_id']."'
AND `te`.`exe_exo_id` = `ce`.`id`
ORDER BY `te`.`exe_cours_id` ASC, `ce`.`title` ASC, `te`.`exe_date`ASC";
echo "<tr><td style='padding-left : 40px;padding-right : 40px;'>";
$results = getManyResultsXCol($sql,4);
echo "<table cellpadding='2' cellspacing='1' border='0' align='center'>";
<td class='secLine' width='60%'>
".get_lang('ExercicesTitleExerciceColumn')."
<td class='secLine' width='20%'>
<td class='secLine' width='20%'>
".get_lang('ExercicesTitleScoreColumn')."
for($i = 0; $i < sizeof($results); $i++)
if( $results[$i][1] < ($results[$i][2]/2) )
elseif( $results[$i][1] > ($results[$i][2]/100*60) )
echo "<td class='content'>".$results[$i][0]."</td>";
echo "<td class='content'>".$results[$i][3]."</td>";
echo "<td valign='top' align='right' class='content'><font color=$scoreColor>".$results[$i][1]." / ".$results[$i][2]."</font></td>";
echo "<td colspan='2' align='center'>".get_lang('NoResult')."</td>";
<font color='#0000FF'>+ </font><a href='".api_get_self()."?view=".$tempView."' class='specialLink'>".get_lang('ExercicesResults')."</a>
|