Skip to content

Commit

Permalink
Fix #1401 learningpathList class
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Sep 11, 2016
1 parent 90b4c35 commit b13fc1e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion main/inc/ajax/course_home.ajax.php
Expand Up @@ -272,7 +272,7 @@
}
}

$list = new LearnpathList(api_get_user_id(),$item['code'], $session_id, 'publicated_on DESC');
$list = new LearnpathList(api_get_user_id(),$item['code'], $session_id, 'Lp.publicatedOn DESC');
$flat_list = $list->get_flat_list();
$lps[$item['code']] = $flat_list;
$item['title'] = Display::url(
Expand Down
2 changes: 1 addition & 1 deletion main/inc/lib/tracking.lib.php
Expand Up @@ -4957,7 +4957,7 @@ public static function show_course_detail($user_id, $course_code, $session_id)
api_get_user_id(),
$course_info['code'],
$session_id,
'publicated_on ASC',
'Lp.publicatedOn ASC',
true,
null,
true
Expand Down
8 changes: 4 additions & 4 deletions main/lp/learnpathList.class.php
Expand Up @@ -80,10 +80,10 @@ public function __construct(

if ($check_publication_dates) {
$time_conditions = " AND (
(LP.publicatedOn IS NOT NULL AND LP.publicatedOn < '$now' AND Lp.expiredOn IS NOT NULL AND Lp.expiredOn > '$now') OR
(LP.publicatedOn IS NOT NULL AND LP.publicatedOn < '$now' AND Lp.expiredOn IS NULL) OR
(LP.publicatedOn IS NULL AND Lp.expiredOn IS NOT NULL AND Lp.expiredOn > '$now') OR
(LP.publicatedOn IS NULL AND Lp.expiredOn IS NULL ))
(Lp.publicatedOn IS NOT NULL AND Lp.publicatedOn < '$now' AND Lp.expiredOn IS NOT NULL AND Lp.expiredOn > '$now') OR
(Lp.publicatedOn IS NOT NULL AND Lp.publicatedOn < '$now' AND Lp.expiredOn IS NULL) OR
(Lp.publicatedOn IS NULL AND Lp.expiredOn IS NOT NULL AND Lp.expiredOn > '$now') OR
(Lp.publicatedOn IS NULL AND Lp.expiredOn IS NULL ))
";
}

Expand Down
2 changes: 1 addition & 1 deletion main/session/index.php
Expand Up @@ -146,7 +146,7 @@
api_get_user_id(),
$course_data['code'],
$session_id,
'publicated_on ASC',
'Lp.publicatedOn ASC',
true
);
$lp_list = $list->get_flat_list();
Expand Down

0 comments on commit b13fc1e

Please sign in to comment.