Skip to content

Commit 0907f72

Browse files
authored
Tracking: #fix total courses progress calculation in session in myStudent.php to consider only subscribed courses
Author: @yverhenne
1 parent 9ebb5d3 commit 0907f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/mySpace/myStudents.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@
13391339
$totalScore = 0;
13401340
$totalProgress = 0;
13411341
$gradeBookTotal = [0, 0];
1342-
$totalCourses = count($courses);
1342+
$totalCourses = 0;
13431343
$scoreDisplay = ScoreDisplay::instance();
13441344
$theoreticalTime = 0;
13451345
$totalTheoreticalTime = 0;
@@ -1364,6 +1364,7 @@
13641364
}
13651365

13661366
if ($isSubscribed) {
1367+
$totalCourses++;
13671368
$timeInSeconds = Tracking::get_time_spent_on_the_course(
13681369
$student_id,
13691370
$courseId,

0 commit comments

Comments
 (0)