diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 1f552ee716..bcb6464bcf 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -1144,7 +1144,7 @@ class IndexManager //Course option (show student progress) //This code will add a new variables (Progress, Score, Certificate) - if (api_get_setting('my_course_progress') === 'true' && api_is_student() === true) { + if (api_get_configuration_value('my_course_progress') === true && api_is_student() === true) { foreach($specialCourses as $key => $specialCourseInfo) { $progress = Tracking::get_avg_student_progress( $user_id, $specialCourseInfo['course_code'] ); @@ -1319,7 +1319,7 @@ class IndexManager //Course option (show student progress) //This code will add a new variables (Progress, Score, Certificate) - if (api_get_setting('my_course_progress') === 'true' && api_is_student() === true) { + if (api_get_configuration_value('my_course_progress') === true && api_is_student() === true) { $progress = Tracking::get_avg_student_progress( $user_id, $course['course_code'], array(), $session_id ); $percentage_score = Tracking::get_avg_student_score( $user_id, $course['course_code'], array(), $session_id); $course_session['student_info']['progress'] = $progress; diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index 64402ff5a8..c03e2f8545 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -277,3 +277,5 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE; // $_configuration['allow_course_introduction_low_security'] = false; // Prevents the duplicate upload in assignments // $_configuration['assignment_prevent_duplicate_upload'] = false; +//Show student progress in My courses page +//$_configuration['my_course_progress'] = false; diff --git a/main/install/data.sql b/main/install/data.sql index f525d3bcfc..a52fe4744a 100644 --- a/main/install/data.sql +++ b/main/install/data.sql @@ -1963,12 +1963,4 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_down -UPDATE settings_current SET selected_value = '1.11.0.7' WHERE variable = 'chamilo_database_version'; - -INSERT INTO `settings_current` (`id`, `variable`, `subkey`, `type`, `category`, `selected_value`, `title`, `comment`, `scope`, `subkeytext`, `access_url`, `access_url_changeable`, `access_url_locked`) VALUES (NULL, 'my_course_progress', NULL, 'radio', 'Course', 'false', 'MyCourseProgressTitle', 'MyCourseProgressTemplateTitle', NULL, NULL, '1', '0', '0'); - -INSERT INTO `settings_options` (`id`, `variable`, `value`, `display_text`) VALUES (NULL, 'my_course_progress', 'true', 'Yes'); -INSERT INTO `settings_options` (`id`, `variable`, `value`, `display_text`) VALUES (NULL, 'my_course_progress', 'false', 'No'); - --- Version 1.11.0.7