Skip to content

Commit

Permalink
Add show_invisible_exercise_in_lp_list setting see BT#10902
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Mar 2, 2016
1 parent 8c87f92 commit 3f192a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main/install/configuration.dist.php
Expand Up @@ -230,3 +230,5 @@
//$_configuration['document_manage_deleted_files'] = false;
// Hide tabs in the main/session/index.php page
//$_configuration['session_hide_tab_list'] = array();
// Show invisible exercise in LP list
//$_configuration['show_invisible_exercise_in_lp_list'] = false;
9 changes: 8 additions & 1 deletion main/newscorm/learnpath.class.php
Expand Up @@ -8627,8 +8627,15 @@ public function get_exercises()
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);

$setting = api_get_configuration_value('show_invisible_exercise_in_lp_list');

$activeCondition = " active <> -1 ";
if ($setting) {
$activeCondition = " active = 1 ";
}

$sql_quiz = "SELECT * FROM $tbl_quiz
WHERE c_id = $course_id AND active = 1 $condition_session
WHERE c_id = $course_id AND $activeCondition $condition_session
ORDER BY title ASC";

$sql_hot = "SELECT * FROM $tbl_doc
Expand Down

0 comments on commit 3f192a5

Please sign in to comment.