Skip to content

Commit

Permalink
Count progress of LP with serious games actived - refs BT#10526 #TMI
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Nov 16, 2015
1 parent 2c8f37a commit e33fa17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/inc/lib/tracking.lib.php
Expand Up @@ -2151,8 +2151,8 @@ public static function get_avg_student_progress(
$lPConditions = [];
$lPConditions['c_id = ? '] = $courseInfo['real_id'];

if ($onlySeriousGame) {
$lPConditions['AND (session_id = ? OR session_id = 0)'] = $sessionId;
if ($sessionId > 0) {
$lPConditions['AND (session_id = ? OR session_id = 0 OR session_id IS NULL)'] = $sessionId;
} else {
$lPConditions['AND session_id = ?'] = $sessionId;
}
Expand Down

2 comments on commit e33fa17

@jmontoyaa
Copy link
Member

@jmontoyaa jmontoyaa commented on e33fa17 Oct 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-This fix makes that if a user doesn't have a progress in a base course, but it has progress 100 in a session, then it will show the progress of the session 100 instead of 0-

Edited: nevermind it works ok 👍

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works ok

Please sign in to comment.