Minor: Fix division by zero warning in course tracking page

pull/4448/head
Yannick Warnier 4 years ago
parent 2220dc5748
commit d42d7a6871
  1. 6
      main/tracking/courseLog.php

@ -903,7 +903,11 @@ if (!empty($groupList)) {
$sessionId
);
$time = api_time_to_hms($timeInSeconds);
$averageTime = api_time_to_hms($timeInSeconds / $nbStudents);
if (empty($nbStudents)) {
$averageTime = api_time_to_hms($timeInSeconds);
} else {
$averageTime = api_time_to_hms($timeInSeconds / $nbStudents);
}
$totalLpProgress = 0;
foreach ($studentIdList as $studentId) {
$lpProgress = Tracking::get_avg_student_progress(

Loading…
Cancel
Save