rounded percent of thematic advance to integer

skala
Cristian Fasanando 16 years ago
parent 03bb4df9ec
commit 7b5ff9c70c
  1. 2
      main/inc/introductionSection.inc.php
  2. 4
      main/inc/lib/thematic.lib.php
  3. 2
      main/mySpace/session.php

@ -187,7 +187,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematic_description_html .= '<h3>'.$thematic_advance.'</h3>'; $thematic_description_html .= '<h3>'.$thematic_advance.'</h3>';
$thematic_description_html .= '<h4>'.$information_title.'</h4>'; $thematic_description_html .= '<h4>'.$information_title.'</h4>';
$thematic_description_html .= '<div><strong>'.$thematic_info['title'].'</strong></div>'; $thematic_description_html .= '<div><strong>'.$thematic_info['title'].'</strong></div>';
$thematic_description_html .= '<div><strong>'.$thematic_advance_info['start_date'].'</strong></div>'; $thematic_description_html .= '<div style="font-size:8pt;"><strong>'.$thematic_advance_info['start_date'].'</strong></div>';
$thematic_description_html .= '<div>'.$thematic_advance_info['content'].'</div>'; $thematic_description_html .= '<div>'.$thematic_advance_info['content'].'</div>';
$thematic_description_html .= '<div>'.get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].'</div>'; $thematic_description_html .= '<div>'.get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].'</div>';
$thematic_description_html .= '<br />'; $thematic_description_html .= '<br />';

@ -732,7 +732,7 @@ class Thematic
if (!empty($a_average_of_advances_by_thematic)) { if (!empty($a_average_of_advances_by_thematic)) {
$count_tematics = count($thematic_data); $count_tematics = count($thematic_data);
$score = array_sum($a_average_of_advances_by_thematic); $score = array_sum($a_average_of_advances_by_thematic);
$total_average = round(($score*100)/($count_tematics*100),2); $total_average = round(($score*100)/($count_tematics*100));
} }
return $total_average; return $total_average;
@ -763,7 +763,7 @@ class Thematic
} }
// calculate average by thematic // calculate average by thematic
$count_total_advances = count($advances); $count_total_advances = count($advances);
$average = round(($count_done_advances*100)/$count_total_advances,2); $average = round(($count_done_advances*100)/$count_total_advances);
} }
return $average; return $average;

@ -186,7 +186,7 @@ if ($nb_sessions > 0) {
exit; exit;
} }
} else { } else {
get_lang('NoSession'); echo get_lang('NoSession');
} }
/* /*

Loading…
Cancel
Save