Skip to content

Commit

Permalink
Add my_progress_session_show_all_courses conf setting - refs BT#18671
Browse files Browse the repository at this point in the history
Allow show all details of each course in session when clicking on session details
  • Loading branch information
AngelFQC committed Apr 28, 2021
1 parent a45bcee commit a3fba7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main/auth/my_progress.php
Expand Up @@ -80,7 +80,18 @@
}

$content = Tracking::show_user_progress($user_id, $sessionId);
$content .= Tracking::show_course_detail($user_id, $courseCode, $sessionId);

$showAllSessionCourses = api_get_configuration_value('my_progress_session_show_all_courses');

if ($showAllSessionCourses && !empty($sessionId) && empty($courseCode)) {
$userSessionCourses = UserManager::get_courses_list_by_session($user_id, $sessionId);

foreach ($userSessionCourses as $userSessionCourse) {
$content .= Tracking::show_course_detail($user_id, $userSessionCourse['course_code'], $sessionId);
}
} else {
$content .= Tracking::show_course_detail($user_id, $courseCode, $sessionId);
}

if (!empty($dates)) {
if (!empty($content)) {
Expand Down
2 changes: 2 additions & 0 deletions main/install/configuration.dist.php
Expand Up @@ -403,6 +403,8 @@
/*$_configuration['my_progress_course_tools_order'] = [
'order' => ['quizzes', 'learning_paths', 'skills'],
];*/
// Allow show all details of each course in session when clicking on session details
//$_configuration['my_progress_session_show_all_courses'] = false;
// Hide session link of course_block on index/userportal
//$_configuration['remove_session_url']= false ;
// Allow foldable block for session list in session category on My courses tab
Expand Down

0 comments on commit a3fba7f

Please sign in to comment.