Show average and latest attempt as before see BT#12474

pull/2487/head
jmontoyaa 9 years ago
parent 41d98ccc03
commit d5785b6b8a
  1. 31
      main/mySpace/myStudents.php

@ -869,8 +869,8 @@ if (!empty($student_id)) {
get_lang('Learnpath'), get_lang('Learnpath'),
get_lang('Time'), get_lang('Time'),
get_lang('BestScore'), get_lang('BestScore'),
//get_lang('AverageScore'), get_lang('AverageScore'),
//get_lang('LatestAttemptAverageScore'), get_lang('LatestAttemptAverageScore'),
get_lang('Progress'), get_lang('Progress'),
get_lang('LastConnexion') get_lang('LastConnexion')
); );
@ -925,22 +925,18 @@ if (!empty($student_id)) {
<th> <th>
<?php <?php
echo get_lang('BestScore').' '; echo get_lang('BestScore').' ';
/*Display:: display_icon(
'info3.gif',
get_lang('AverageIsCalculatedBasedInAllAttempts'),
array('align' => 'absmiddle', 'hspace' => '3px')
);*/
?> ?>
</th> </th>
<th>
<?php <?php
/*echo get_lang('LatestAttemptAverageScore').' '; echo get_lang('LatestAttemptAverageScore').' ';
Display::display_icon( Display::display_icon(
'info3.gif', 'info3.gif',
get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), get_lang('AverageIsCalculatedBasedInTheLatestAttempts'),
array('align' => 'absmiddle', 'hspace' => '3px') array('align' => 'absmiddle', 'hspace' => '3px')
);*/ );
?> ?>
</th>
<th><?php <th><?php
echo get_lang('Progress').' '; echo get_lang('Progress').' ';
Display:: display_icon( Display:: display_icon(
@ -1022,7 +1018,7 @@ if (!empty($student_id)) {
} }
// Quiz in lp // Quiz in lp
/*$score = Tracking::get_avg_student_score( $score = Tracking::get_avg_student_score(
$student_id, $student_id,
$course_code, $course_code,
array($lp_id), array($lp_id),
@ -1037,7 +1033,7 @@ if (!empty($student_id)) {
$sessionId, $sessionId,
false, false,
true true
);*/ );
$bestScore = Tracking::get_avg_student_score( $bestScore = Tracking::get_avg_student_score(
$student_id, $student_id,
@ -1068,6 +1064,7 @@ if (!empty($student_id)) {
api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset), api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset),
api_time_to_hms($total_time), api_time_to_hms($total_time),
$bestScore, $bestScore,
$score_latest,
$progress.'%', $progress.'%',
$start_time $start_time
); );
@ -1081,7 +1078,6 @@ if (!empty($student_id)) {
$score = $score.'%'; $score = $score.'%';
} }
} }
echo Display::tag('td', $bestScore); echo Display::tag('td', $bestScore);
if (isset($score_latest) && !is_null($score_latest)) { if (isset($score_latest) && !is_null($score_latest)) {
@ -1089,7 +1085,7 @@ if (!empty($student_id)) {
$score_latest = $score_latest.'%'; $score_latest = $score_latest.'%';
} }
} }
//echo Display::tag('td', $score_latest); echo Display::tag('td', $score_latest);
if (is_numeric($progress)) { if (is_numeric($progress)) {
$progress = $progress.'%'; $progress = $progress.'%';
@ -1118,7 +1114,12 @@ if (!empty($student_id)) {
echo '<td>'; echo '<td>';
if ($any_result === true) { if ($any_result === true) {
echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.$course_code.'&course='.$course_code.'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">'; echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.$course_code.'&course='.$course_code.'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">';
echo Display::return_icon('clean.png', get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>'; echo Display::return_icon(
'clean.png',
get_lang('Clean'),
'',
ICON_SIZE_SMALL
).'</a>';
echo '</a>'; echo '</a>';
} }
echo '</td>'; echo '</td>';

Loading…
Cancel
Save