Minor removing center styles

skala
Julio Montoya 13 years ago
parent 5568f1b8e8
commit b36b24b2f6
  1. 22
      main/tracking/courseLog.php
  2. 8
      main/tracking/course_session_report.php
  3. 28
      main/tracking/exams.php
  4. 170
      main/tracking/logins_details.php
  5. 4
      main/tracking/question_course_report.php
  6. 8
      main/tracking/toolaccess_details.php

@ -217,7 +217,7 @@ echo '</div>';
if ($_GET['studentlist'] == '' || $_GET['studentlist'] == 'true') { if ($_GET['studentlist'] == '' || $_GET['studentlist'] == 'true') {
echo '<div class="actions">'; echo '<div class="actions">';
// Create a search-box. // Create a search-box.
$form_search = new FormValidator('search_simple', 'get', api_get_path(WEB_CODE_PATH).'tracking/courseLog.php?'.api_get_cidreq().'&studentlist=true', '', 'width=200px', false); $form_search = new FormValidator('search_simple', 'GET', api_get_path(WEB_CODE_PATH).'tracking/courseLog.php?'.api_get_cidreq().'&studentlist=true', '', array('class' => 'form-search'), false);
$renderer =& $form_search->defaultRenderer(); $renderer =& $form_search->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span>'); $renderer->setElementTemplate('<span>{element}</span>');
$form_search->addElement('hidden', 'studentlist', 'true'); $form_search->addElement('hidden', 'studentlist', 'true');
@ -558,20 +558,20 @@ if ($_GET['studentlist'] == 'false') {
$table->set_additional_parameters($parameters); $table->set_additional_parameters($parameters);
$tab_table_header = array(); // tab of header texts $tab_table_header = array(); // tab of header texts
$table->set_header(0, get_lang('OfficialCode'), true, 'align="center"'); $table->set_header(0, get_lang('OfficialCode'), true);
$tab_table_header[] = get_lang('OfficialCode'); $tab_table_header[] = get_lang('OfficialCode');
if ($is_western_name_order) { if ($is_western_name_order) {
$table->set_header(1, get_lang('FirstName'), true, 'align="center"'); $table->set_header(1, get_lang('FirstName'), true);
$tab_table_header[] = get_lang('FirstName'); $tab_table_header[] = get_lang('FirstName');
$table->set_header(2, get_lang('LastName'), true, 'align="center"'); $table->set_header(2, get_lang('LastName'), true);
$tab_table_header[] = get_lang('LastName'); $tab_table_header[] = get_lang('LastName');
} else { } else {
$table->set_header(1, get_lang('LastName'), true, 'align="center"'); $table->set_header(1, get_lang('LastName'), true);
$tab_table_header[] = get_lang('LastName'); $tab_table_header[] = get_lang('LastName');
$table->set_header(2, get_lang('FirstName'), true, 'align="center"'); $table->set_header(2, get_lang('FirstName'), true);
$tab_table_header[] = get_lang('FirstName'); $tab_table_header[] = get_lang('FirstName');
} }
$table->set_header(3, get_lang('Login'), false, 'align="center"'); // $table->set_header(3, get_lang('Login'), false);
$tab_table_header[] = get_lang('Login'); $tab_table_header[] = get_lang('Login');
$table->set_header(4, get_lang('TrainingTime'), false); $table->set_header(4, get_lang('TrainingTime'), false);
@ -593,9 +593,9 @@ if ($_GET['studentlist'] == 'false') {
if (empty($session_id)) { if (empty($session_id)) {
$table->set_header(11, get_lang('Survey'), false); $table->set_header(11, get_lang('Survey'), false);
$tab_table_header[] = get_lang('Survey'); $tab_table_header[] = get_lang('Survey');
$table->set_header(12, get_lang('FirstLogin'), false, 'align="center"'); $table->set_header(12, get_lang('FirstLogin'), false);
$tab_table_header[] = get_lang('FirstLogin'); $tab_table_header[] = get_lang('FirstLogin');
$table->set_header(13, get_lang('LatestLogin'), false, 'align="center"'); $table->set_header(13, get_lang('LatestLogin'), false);
$tab_table_header[] = get_lang('LatestLogin'); $tab_table_header[] = get_lang('LatestLogin');
if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) { if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) {
$table->set_header(14, $extra_info['field_display_text'], false); $table->set_header(14, $extra_info['field_display_text'], false);
@ -608,9 +608,9 @@ if ($_GET['studentlist'] == 'false') {
} }
} else { } else {
$table->set_header(11, get_lang('FirstLogin'), false, 'align="center"'); $table->set_header(11, get_lang('FirstLogin'), false);
$tab_table_header[] = get_lang('FirstLogin'); $tab_table_header[] = get_lang('FirstLogin');
$table->set_header(12, get_lang('LatestLogin'), false, 'align="center"'); $table->set_header(12, get_lang('LatestLogin'), false);
$tab_table_header[] = get_lang('LatestLogin'); $tab_table_header[] = get_lang('LatestLogin');
if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) { if (isset($_GET['additional_profile_field']) AND is_numeric($_GET['additional_profile_field'])) {

@ -180,7 +180,7 @@ if (!empty($users) && is_array($users)) {
foreach($course_list as $current_course ) { foreach($course_list as $current_course ) {
$total_course = 0; $total_course = 0;
$user_info_stat = $main_result[$current_course['code']][$user['user_id']]; $user_info_stat = $main_result[$current_course['code']][$user['user_id']];
$html_result .= "<td align=\"center\" >"; $html_result .= "<td>";
if (!empty($user_info_stat['result']) && !empty($user_info_stat['attempts'])) { if (!empty($user_info_stat['result']) && !empty($user_info_stat['attempts'])) {
$result =round($user_info_stat['result']/$user_info_stat['attempts'] * 100, 2); $result =round($user_info_stat['result']/$user_info_stat['attempts'] * 100, 2);
$total_course +=$result; $total_course +=$result;
@ -203,7 +203,7 @@ if (!empty($users) && is_array($users)) {
$total_average_score_count++; $total_average_score_count++;
} }
$string_date=Tracking :: get_last_connection_date($user['user_id'],true); $string_date=Tracking :: get_last_connection_date($user['user_id'],true);
$html_result .="<td align=\"center\">$total_student</td><td>$string_date</td></tr>"; $html_result .="<td>$total_student</td><td>$string_date</td></tr>";
} }
$html_result .="<tr><th>".get_lang('AverageScore')."</th>"; $html_result .="<tr><th>".get_lang('AverageScore')."</th>";
@ -219,7 +219,7 @@ if (!empty($users) && is_array($users)) {
$counter++; $counter++;
} }
$total_average = $total_average + $average_per_course; $total_average = $total_average + $average_per_course;
$html_result .="<td align=\"center\">$average_per_course</td>"; $html_result .="<td>$average_per_course</td>";
} }
if (!empty($total_average_score_count)) { if (!empty($total_average_score_count)) {
$total_average = round($total_average_score/($total_average_score_count*100)*100,2); $total_average = round($total_average_score/($total_average_score_count*100)*100,2);
@ -227,7 +227,7 @@ if (!empty($users) && is_array($users)) {
$total_average = '-'; $total_average = '-';
} }
$html_result .='<td align="center">'.$total_average.'</td>'; $html_result .='<td>'.$total_average.'</td>';
$html_result .="<td>-</td>"; $html_result .="<td>-</td>";
$html_result .="</tr>"; $html_result .="</tr>";
$html_result .= '</table>'; $html_result .= '</table>';

@ -296,44 +296,44 @@ foreach ($course_list as $current_course) {
$user_info = api_get_user_info($current_student_id); $user_info = api_get_user_info($current_student_id);
//User //User
$user_row = '<td align="center">'; $user_row = '<td >';
$user_row .= $user_info['firstName'].' '.$user_info['lastName']; $user_row .= $user_info['firstName'].' '.$user_info['lastName'];
$user_row .= '</td>'; $user_row .= '</td>';
$user_info = $user_info['firstName'].' '.$user_info['lastName']; $user_info = $user_info['firstName'].' '.$user_info['lastName'];
//Best result //Best result
if (!empty($a_essais['essais'])) { if (!empty($a_essais['essais'])) {
$user_row .= '<td align="center" >'; $user_row .= '<td >';
$user_row .= $pourcentageScore; $user_row .= $pourcentageScore;
$temp_array [] = $pourcentageScore; $temp_array [] = $pourcentageScore;
$user_row .= '</td>'; $user_row .= '</td>';
if ($pourcentageScore >= $filter_score ) { if ($pourcentageScore >= $filter_score ) {
$user_row .= '<td align="center" style="background-color:#DFFFA8">'; $user_row .= '<td style="background-color:#DFFFA8">';
$user_row .= get_lang('PassExam').'</td>'; $user_row .= get_lang('PassExam').'</td>';
$temp_array [] = get_lang('PassExam'); $temp_array [] = get_lang('PassExam');
} else { } else {
$user_row .= '<td align="center" style="background-color:#FC9A9E" >'; $user_row .= '<td style="background-color:#FC9A9E" >';
$user_row .= get_lang('ExamFail').'</td>'; $user_row .= get_lang('ExamFail').'</td>';
$temp_array [] = get_lang('ExamFail'); $temp_array [] = get_lang('ExamFail');
} }
$user_row .= '<td align="center">'; $user_row .= '<td >';
$user_row .= $a_essais['essais']; $user_row .= $a_essais['essais'];
$temp_array [] = $a_essais['essais']; $temp_array [] = $a_essais['essais'];
$user_row .= '</td>'; $user_row .= '</td>';
} else { } else {
$score = '-'; $score = '-';
$user_row .= '<td align="center" >'; $user_row .= '<td >';
$user_row .= '-'; $user_row .= '-';
$temp_array [] = '-'; $temp_array [] = '-';
$user_row .= '</td>'; $user_row .= '</td>';
$user_row .= '<td align="center" style="background-color:#FCE89A">'; $user_row .= '<td style="background-color:#FCE89A">';
$user_row .= get_lang('NoAttempt'); $user_row .= get_lang('NoAttempt');
$temp_array [] = get_lang('NoAttempt'); $temp_array [] = get_lang('NoAttempt');
$user_row .= '</td>'; $user_row .= '</td>';
$user_row .= '<td align="center">'; $user_row .= '<td >';
$user_row .= 0; $user_row .= 0;
$temp_array [] = 0; $temp_array [] = 0;
$user_row .= '</td>'; $user_row .= '</td>';
@ -369,23 +369,23 @@ foreach ($course_list as $current_course) {
} }
if ($global) { if ($global) {
//Exam taken //Exam taken
$html_result .= '<td align="center">'; $html_result .= '<td >';
$html_result .= $taken; $html_result .= $taken;
$global_row[]= $taken; $global_row[]= $taken;
//echo $total.' / '.$total_students; //echo $total.' / '.$total_students;
$html_result .= '</td>'; $html_result .= '</td>';
//Exam NOT taken //Exam NOT taken
$html_result .= '<td align="center">'; $html_result .= '<td >';
$html_result .= $not_taken = $total_students - $taken; $html_result .= $not_taken = $total_students - $taken;
$global_row[]= $not_taken; $global_row[]= $not_taken;
$html_result .= '</td>'; $html_result .= '</td>';
//Examn pass //Examn pass
if (!empty($total_with_parameter_score)) { if (!empty($total_with_parameter_score)) {
$html_result .= '<td align="center" style="background-color:#DFFFA8" >'; $html_result .= '<td style="background-color:#DFFFA8" >';
} else { } else {
$html_result .= '<td align="center" style="background-color:#FCE89A" >'; $html_result .= '<td style="background-color:#FCE89A" >';
} }
$html_result .= $total_with_parameter_score; $html_result .= $total_with_parameter_score;
@ -393,13 +393,13 @@ foreach ($course_list as $current_course) {
$html_result .= '</td>'; $html_result .= '</td>';
//Exam fail //Exam fail
$html_result .= '<td align="center">'; $html_result .= '<td >';
$html_result .= $fail = $taken - $total_with_parameter_score; $html_result .= $fail = $taken - $total_with_parameter_score;
$global_row[]= $fail; $global_row[]= $fail;
$html_result .= '</td>'; $html_result .= '</td>';
$html_result .= '<td align="center">'; $html_result .= '<td >';
$html_result .= $total_students; $html_result .= $total_students;
$global_row[]= $total_students; $global_row[]= $total_students;

@ -1,33 +1,28 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* @author Thomas Depraetere * @author Thomas Depraetere
* @author Hugues Peeters * @author Hugues Peeters
* @author Christophe Gesche * @author Christophe Gesche
* @author Sebastien Piraux * @author Sebastien Piraux
* *
* @package chamilo.tracking * @package chamilo.tracking
*/ */
/** /**
* Code * Code
*/ */
// TODO: Is this file deprecated? // TODO: Is this file deprecated?
/* /* INIT SECTION */
==============================================================================
INIT SECTION
==============================================================================
*/
$uInfo = $_REQUEST['uInfo']; $uInfo = $_REQUEST['uInfo'];
if( !isset($_REQUEST['reqdate']) ) if (!isset($_REQUEST['reqdate']))
$reqdate = time(); $reqdate = time();
else else
$reqdate = $_REQUEST['reqdate']; $reqdate = $_REQUEST['reqdate'];
$period = $_REQUEST['period']; $period = $_REQUEST['period'];
if(!isset($_REQUEST['view'])) if (!isset($_REQUEST['view']))
$view ="0000000"; $view = "0000000";
else else
$view = $_REQUEST['view']; $view = $_REQUEST['view'];
@ -35,7 +30,7 @@ else
$language_file = "tracking"; $language_file = "tracking";
include('../inc/global.inc.php'); include('../inc/global.inc.php');
$interbreadcrumb[]= array ("url"=>"../user/user.php", "name"=> get_lang('Users')); $interbreadcrumb[] = array("url" => "../user/user.php", "name" => get_lang('Users'));
$nameTools = get_lang('ToolName'); $nameTools = get_lang('ToolName');
@ -57,7 +52,7 @@ $TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER);
$TABLEUSER = Database::get_main_table(TABLE_MAIN_USER); $TABLEUSER = Database::get_main_table(TABLE_MAIN_USER);
$TABLETRACK_ACCESS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS); $TABLETRACK_ACCESS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS);
Display::display_header($nameTools, "Tracking"); Display::display_header($nameTools, "Tracking");
include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php"); include(api_get_path(LIBRARY_PATH) . "statsUtils.lib.inc.php");
// the variables for the days and the months // the variables for the days and the months
// Defining the shorts for the days // Defining the shorts for the days
@ -76,21 +71,17 @@ $is_allowedToTrackEverybodyInCourse = $is_courseAdmin; // allowed to track all s
<?php echo $nameTools ?> <?php echo $nameTools ?>
</h3> </h3>
<table width="100%" cellpadding="2" cellspacing="3" border="0"> <table width="100%" cellpadding="2" cellspacing="3" border="0">
<?php <?php
// check if uid is tutor of this group // check if uid is tutor of this group
if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse )) if (( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) {
{ if ($is_allowedToTrackEverybodyInCourse) {
if( $is_allowedToTrackEverybodyInCourse )
{
$sql = "SELECT u.firstname,u.lastname, u.email $sql = "SELECT u.firstname,u.lastname, u.email
FROM $TABLECOURSUSER cu , $TABLEUSER u FROM $TABLECOURSUSER cu , $TABLEUSER u
WHERE cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." WHERE cu.user_id = u.user_id AND cu.relation_type<>" . COURSE_RELATION_TYPE_RRHH . "
AND cu.course_code = '$_cid' AND cu.course_code = '$_cid'
AND u.user_id = '$uInfo'"; AND u.user_id = '$uInfo'";
} } else {
else
{
$sql = "SELECT u.firstname,u.lastname, u.email $sql = "SELECT u.firstname,u.lastname, u.email
FROM $TABLECOURSE_GROUPSUSER gu , $TABLEUSER u FROM $TABLECOURSE_GROUPSUSER gu , $TABLEUSER u
WHERE gu.user_id = u.user_id WHERE gu.user_id = u.user_id
@ -99,37 +90,35 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse ))
} }
$query = Database::query($sql); $query = Database::query($sql);
$res = @Database::fetch_array($query); $res = @Database::fetch_array($query);
if(is_array($res)) if (is_array($res)) {
{
$res[2] == "" ? $res2 = get_lang('NoEmail') : $res2 = Display::encrypted_mailto_link($res[2]); $res[2] == "" ? $res2 = get_lang('NoEmail') : $res2 = Display::encrypted_mailto_link($res[2]);
echo "<tr><td>"; echo "<tr><td>";
echo $informationsAbout." : <br>"; echo $informationsAbout . " : <br>";
echo "<ul>\n" echo "<ul>\n"
."<li>".get_lang('FirstName')." : ".$res[0]."</li>\n" . "<li>" . get_lang('FirstName') . " : " . $res[0] . "</li>\n"
."<li>".get_lang('LastName')." : ".$res[1]."</li>\n" . "<li>" . get_lang('LastName') . " : " . $res[1] . "</li>\n"
."<li>".get_lang('Email')." : ".$res2."</li>\n" . "<li>" . get_lang('Email') . " : " . $res2 . "</li>\n"
."</ul>"; . "</ul>";
echo "</td></tr>"; echo "</td></tr>";
/******* MENU ********/ /* * ***** MENU ******* */
echo "<tr> echo "<tr>
<td> <td>
[<a href='userLog.php?uInfo=$uInfo&view=$view'>".get_lang('Back')."</a>] [<a href='userLog.php?uInfo=$uInfo&view=$view'>" . get_lang('Back') . "</a>]
"; ";
echo " &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp; echo " &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodWeek')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodWeek') . "</a>]
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodMonth')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodMonth') . "</a>]
&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;
"; ";
switch($period) switch ($period) {
{
case "week" : case "week" :
// previous and next date must be evaluated // previous and next date must be evaluated
$previousReqDate = $reqdate - 7*86400; $previousReqDate = $reqdate - 7 * 86400;
$nextReqDate = $reqdate + 7*86400; $nextReqDate = $reqdate + 7 * 86400;
echo " echo "
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousWeek')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousWeek') . "</a>]
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextWeek')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextWeek') . "</a>]
"; ";
break; break;
default : default :
@ -137,124 +126,105 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse ))
case "month" : case "month" :
// previous and next date must be evaluated // previous and next date must be evaluated
// 30 days should be a good approximation // 30 days should be a good approximation
$previousReqDate = mktime(1,1,1,date("m",$reqdate)-1,1,date("Y",$reqdate)); $previousReqDate = mktime(1, 1, 1, date("m", $reqdate) - 1, 1, date("Y", $reqdate));
$nextReqDate = mktime(1,1,1,date("m",$reqdate)+1,1,date("Y",$reqdate)); $nextReqDate = mktime(1, 1, 1, date("m", $reqdate) + 1, 1, date("Y", $reqdate));
echo " echo "
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousMonth')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousMonth') . "</a>]
[<a href='".api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextMonth')."</a>] [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextMonth') . "</a>]
"; ";
break; break;
} }
echo " echo "
</td> </td>
</tr> </tr>
"; ";
/******* END OF MENU ********/ /* * ***** END OF MENU ******* */
switch($period) switch ($period) {
{
case "month" : case "month" :
$sql = "SELECT access_date $sql = "SELECT access_date
FROM $TABLETRACK_ACCESS FROM $TABLETRACK_ACCESS
WHERE access_user_id = '$uInfo' WHERE access_user_id = '$uInfo'
AND access_cours_code = '".$_cid."' AND access_cours_code = '" . $_cid . "'
AND MONTH(access_date) = MONTH( FROM_UNIXTIME('$reqdate') ) AND MONTH(access_date) = MONTH( FROM_UNIXTIME('$reqdate') )
AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate')) AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate'))
GROUP BY DAYOFMONTH(access_date) GROUP BY DAYOFMONTH(access_date)
ORDER BY access_date ASC"; ORDER BY access_date ASC";
$displayedDate = $MonthsLong[date("n", $reqdate)-1].date(" Y", $reqdate); $displayedDate = $MonthsLong[date("n", $reqdate) - 1] . date(" Y", $reqdate);
break; break;
case "week" : case "week" :
$sql = "SELECT access_date $sql = "SELECT access_date
FROM $TABLETRACK_ACCESS FROM $TABLETRACK_ACCESS
WHERE access_user_id = '$uInfo' WHERE access_user_id = '$uInfo'
AND access_cours_code = '".$_cid."' AND access_cours_code = '" . $_cid . "'
AND WEEK(access_date) = WEEK( FROM_UNIXTIME('$reqdate') ) AND WEEK(access_date) = WEEK( FROM_UNIXTIME('$reqdate') )
AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate')) AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate'))
GROUP BY DAYOFMONTH(access_date) GROUP BY DAYOFMONTH(access_date)
ORDER BY access_date ASC"; ORDER BY access_date ASC";
$weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate))); $weeklowreqdate = ($reqdate - (86400 * date("w", $reqdate)));
$weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) )); $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate)) ));
$displayedDate = get_lang('From')." ".date("d " , $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate) $displayedDate = get_lang('From') . " " . date("d ", $weeklowreqdate) . $MonthsLong[date("n", $weeklowreqdate) - 1] . date(" Y", $weeklowreqdate)
." ".get_lang('To')." ".date("d " , $weekhighreqdate ).$MonthsLong[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate); . " " . get_lang('To') . " " . date("d ", $weekhighreqdate) . $MonthsLong[date("n", $weekhighreqdate) - 1] . date(" Y", $weekhighreqdate);
break; break;
} }
echo "<tr><td>"; echo "<tr><td>";
$results = getManyResults1Col($sql); $results = getManyResults1Col($sql);
/*** display of the displayed period ***/ /* * * display of the displayed period ** */
echo "<table width='100%' cellpadding='2' cellspacing='1' border='0' align=center>"; echo "<table width='100%' cellpadding='2' cellspacing='1' border='0' align=center>";
echo "<td bgcolor='#E6E6E6'>".$displayedDate."</td>"; echo "<td bgcolor='#E6E6E6'>" . $displayedDate . "</td>";
if (is_array($results)) if (is_array($results)) {
{ for ($j = 0; $j < sizeof($results); $j++) {
for ($j = 0 ; $j < sizeof($results); $j++)
{
$beautifulDateTime = api_convert_and_format_date($results[$j], null, date_default_timezone_get()); $beautifulDateTime = api_convert_and_format_date($results[$j], null, date_default_timezone_get());
echo "<tr>"; echo "<tr>";
echo "<td style='padding-left : 40px;' valign='top'>".$beautifulDateTime."</td>"; echo "<td style='padding-left : 40px;' valign='top'>" . $beautifulDateTime . "</td>";
echo"</tr>"; echo"</tr>";
// $limit is used to select only results between $results[$j] (current login) and next one // $limit is used to select only results between $results[$j] (current login) and next one
if( $j == ( sizeof($results) - 1 ) ) if ($j == ( sizeof($results) - 1 ))
$limit = date("Y-m-d H:i:s",$nextReqDate); $limit = date("Y-m-d H:i:s", $nextReqDate);
else else
$limit = $results[$j+1]; $limit = $results[$j + 1];
// select all access to tool between displayed date and next displayed date or now() if // select all access to tool between displayed date and next displayed date or now() if
// displayed date is the last login date // displayed date is the last login date
$sql = "SELECT access_tool, count(access_tool) $sql = "SELECT access_tool, count(access_tool)
FROM $TABLETRACK_ACCESS FROM $TABLETRACK_ACCESS
WHERE access_user_id = '$uInfo' WHERE access_user_id = '$uInfo'
AND access_tool IS NOT NULL AND access_tool IS NOT NULL
AND access_date > '".$results[$j]."' AND access_date > '" . $results[$j] . "'
AND access_date < '".$limit."' AND access_date < '" . $limit . "'
AND access_cours_code = '".$_cid."' AND access_cours_code = '" . $_cid . "'
GROUP BY access_tool GROUP BY access_tool
ORDER BY access_tool ASC"; ORDER BY access_tool ASC";
$results2 = getManyResults2Col($sql); $results2 = getManyResults2Col($sql);
if (is_array($results2)) if (is_array($results2)) {
{
echo "<tr><td colspan='2'>\n"; echo "<tr><td colspan='2'>\n";
echo "<table width='50%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table width='50%' cellpadding='0' cellspacing='0' border='0'>\n";
for($k = 0 ; $k < count($results2) ; $k++) for ($k = 0; $k < count($results2); $k++) {
{
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='70%' style='padding-left : 60px;'>".get_lang($results2[$k][0])."</td>\n"; echo "<td width='70%' style='padding-left : 60px;'>" . get_lang($results2[$k][0]) . "</td>\n";
echo "<td width='30%' align='right' style='padding-right : 40px'>".$results2[$k][1]." ".get_lang('Visits')."</td>\n"; echo "<td width='30%' align='right' style='padding-right : 40px'>" . $results2[$k][1] . " " . get_lang('Visits') . "</td>\n";
echo "</tr>"; echo "</tr>";
} }
echo "</table>\n"; echo "</table>\n";
echo "</td></tr>\n"; echo "</td></tr>\n";
} }
$previousDate = $value; $previousDate = $value;
} }
} else {
}
else
{
echo "<tr>"; echo "<tr>";
echo "<td colspan='2' bgcolor='#eeeeee'><center>".get_lang('NoResult')."</center></td>"; echo "<td colspan='2' bgcolor='#eeeeee'>" . get_lang('NoResult') . "</td>";
echo "</tr>"; echo "</tr>";
} }
echo "</table>"; echo "</table>";
echo "</td></tr>"; echo "</td></tr>";
} } else {
else
{
echo get_lang('ErrorUserNotInGroup'); echo get_lang('ErrorUserNotInGroup');
} }
} else {
} // not allowed
// not allowed
else
{
api_not_allowed(); api_not_allowed();
} }
?> ?>
</table> </table>
<?php
<?php Display::display_footer();
Display::display_footer();
?>

@ -218,11 +218,11 @@ if (!empty($main_question_list) && is_array($main_question_list)) {
$html_result .= "</td>"; $html_result .= "</td>";
$html_result .= "<td align=\"center\" >"; $html_result .= "<td>";
$html_result .= round($question->results, 2).' / '.$question->weighting; $html_result .= round($question->results, 2).' / '.$question->weighting;
$html_result .= "</td>"; $html_result .= "</td>";
$html_result .= "<td align=\"center\" >"; $html_result .= "<td>";
$html_result .= $question->quantity; $html_result .= $question->quantity;
$html_result .= "</td>"; $html_result .= "</td>";

@ -1,4 +1,4 @@
<?php // $Id: toolaccess_details.php 20472 2009-05-11 10:02:06Z ivantcholakov $ <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
// TODO: Is this file deprecated? // TODO: Is this file deprecated?
@ -14,11 +14,7 @@
* Code * Code
*/ */
/* /* INIT SECTION */
==============================================================================
INIT SECTION
==============================================================================
*/
$tool = $_REQUEST['tool']; $tool = $_REQUEST['tool'];
$period = $_REQUEST['period']; $period = $_REQUEST['period'];

Loading…
Cancel
Save