Skip to content

Commit

Permalink
Fix issue in course resources tracking SQL query asking for session_i…
Browse files Browse the repository at this point in the history
…d = 0 where table has been changed to use NULL value - refs #8068
  • Loading branch information
ywarnier committed Jan 26, 2016
1 parent 24fa07b commit bb45844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/inc/lib/tracking.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5668,7 +5668,7 @@ public static function count_item_resources()
WHERE
track_resource.c_id = $course_id AND
track_resource.insert_user_id = user.user_id AND
session_id = $session_id ";
session_id " .(empty($session_id) ? ' IS NULL ' : " = $session_id ");

if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
Expand Down Expand Up @@ -5726,7 +5726,7 @@ public static function get_item_resources_data($from, $number_of_items, $column,
WHERE
track_resource.c_id = $course_id AND
track_resource.insert_user_id = user.user_id AND
session_id = $session_id ";
session_id " .(empty($session_id) ? ' IS NULL ' : " = $session_id ");

if (isset($_GET['keyword'])) {
$keyword = Database::escape_string(trim($_GET['keyword']));
Expand Down

0 comments on commit bb45844

Please sign in to comment.