- Removed new SQL added in the file data.sql

- Added new config value in the file configuration.dist.php
- Changed function api_get_setting() to api_get_configuration_value()
pull/2487/head
Rafa 9 years ago
parent 9142959680
commit d3daa7e9b0
  1. 4
      main/inc/lib/userportal.lib.php
  2. 2
      main/install/configuration.dist.php
  3. 8
      main/install/data.sql

@ -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;

@ -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;

@ -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

Loading…
Cancel
Save