Skip to content

Commit

Permalink
Hidden courses with status hidden see BT#11324
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Jun 29, 2016
1 parent 10c3ed1 commit 72efb59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion main/auth/courses.php
Expand Up @@ -216,7 +216,7 @@
if (!$user_can_view_page) {
api_not_allowed(true);
}

$courses_controller->courses_categories(
$action,
$categoryCode,
Expand Down
11 changes: 5 additions & 6 deletions main/inc/lib/course_category.lib.php
Expand Up @@ -677,6 +677,9 @@ function browseCoursesInCategory($category_code, $random_value = null, $limit =
$courseVisibility = $courseInfo['visibility'];
$visibilityCondition = ' AND course.visibility <> 1';
}

$visibilityCondition .= ' AND course.visibility <> '.COURSE_VISIBILITY_HIDDEN;

if (!empty($random_value)) {
$random_value = intval($random_value);

Expand Down Expand Up @@ -936,12 +939,8 @@ function searchCategoryById($list)
*/
function getLimitArray()
{
$pageCurrent = isset($_REQUEST['pageCurrent']) ?
intval($_GET['pageCurrent']) :
1;
$pageLength = isset($_REQUEST['pageLength']) ?
intval($_GET['pageLength']) :
12;
$pageCurrent = isset($_REQUEST['pageCurrent']) ? intval($_GET['pageCurrent']) : 1;
$pageLength = isset($_REQUEST['pageLength']) ? intval($_GET['pageLength']) : 12;
return array(
'start' => ($pageCurrent - 1) * $pageLength,
'current' => $pageCurrent,
Expand Down

0 comments on commit 72efb59

Please sign in to comment.