|
|
|
|
@ -18,6 +18,8 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
public function up(Schema $schema) |
|
|
|
|
{ |
|
|
|
|
$this->addSql('ALTER TABLE user ADD COLUMN last_login datetime DEFAULT NULL'); |
|
|
|
|
// calendar events comments |
|
|
|
|
$this->addSql("ALTER TABLE c_calendar_event ADD COLUMN comment TEXT"); |
|
|
|
|
|
|
|
|
|
// Move some settings from configuration.php to the database |
|
|
|
|
// Current settings categories are: |
|
|
|
|
@ -32,7 +34,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'true'), |
|
|
|
|
'AllowLearningPathReturnLinkTitle', |
|
|
|
|
'AllowLearningPathReturnLinkComment', |
|
|
|
|
null, |
|
|
|
|
@ -50,7 +52,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'HideScormExportLinkTitle', |
|
|
|
|
'HideScormExportLinkComment', |
|
|
|
|
null, |
|
|
|
|
@ -69,7 +71,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'HideScormCopyLinkTitle', |
|
|
|
|
'HideScormCopyLinkComment', |
|
|
|
|
null, |
|
|
|
|
@ -88,7 +90,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'HideScormPdfLinkTitle', |
|
|
|
|
'HideScormPdfLinkComment', |
|
|
|
|
null, |
|
|
|
|
@ -144,7 +146,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'PdfLogoHeaderTitle', |
|
|
|
|
'PdfLogoHeaderComment', |
|
|
|
|
null, |
|
|
|
|
@ -163,7 +165,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Platform', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'OrderUserListByOfficialCodeTitle', |
|
|
|
|
'OrderUserListByOfficialCodeComment', |
|
|
|
|
null, |
|
|
|
|
@ -181,8 +183,8 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'email_alert_manager_on_new_quiz', |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Tools', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
'Course', |
|
|
|
|
($value?$value:'true'), |
|
|
|
|
'AlertManagerOnNewQuizTitle', |
|
|
|
|
'AlertManagerOnNewQuizComment', |
|
|
|
|
null, |
|
|
|
|
@ -201,7 +203,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Tools', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'ShowOfficialCodeInExerciseResultListTitle', |
|
|
|
|
'ShowOfficialCodeInExerciseResultListComment', |
|
|
|
|
null, |
|
|
|
|
@ -221,7 +223,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Platform', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'HidePrivateCoursesFromCourseCatalogTitle', |
|
|
|
|
'HidePrivateCoursesFromCourseCatalogComment', |
|
|
|
|
null, |
|
|
|
|
@ -260,7 +262,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Platform', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'true'), |
|
|
|
|
'AutoDetectLanguageCustomPagesTitle', |
|
|
|
|
'AutoDetectLanguageCustomPagesComment', |
|
|
|
|
null, |
|
|
|
|
@ -279,7 +281,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Tools', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'LearningPathShowReducedReportTitle', |
|
|
|
|
'LearningPathShowReducedReportComment', |
|
|
|
|
null, |
|
|
|
|
@ -298,7 +300,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Session', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'AllowSessionCourseCopyForTeachersTitle', |
|
|
|
|
'AllowSessionCourseCopyForTeachersComment', |
|
|
|
|
null, |
|
|
|
|
@ -316,8 +318,8 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'hide_logout_button', |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Platform', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
'Security', |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'HideLogoutButtonTitle', |
|
|
|
|
'HideLogoutButtonComment', |
|
|
|
|
null, |
|
|
|
|
@ -336,7 +338,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Platform', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'RedirectAdminToCoursesListTitle', |
|
|
|
|
'RedirectAdminToCoursesListComment', |
|
|
|
|
null, |
|
|
|
|
@ -355,7 +357,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Course', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'CourseImagesInCoursesListTitle', |
|
|
|
|
'CourseImagesInCoursesListComment', |
|
|
|
|
null, |
|
|
|
|
@ -393,7 +395,7 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Gradebook', |
|
|
|
|
($value?'true':'false'), |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'FilterCertificateByOfficialCodeTitle', |
|
|
|
|
'FilterCertificateByOfficialCodeComment', |
|
|
|
|
null, |
|
|
|
|
@ -499,25 +501,6 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
[0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Allows a comment field in the course calendar events. Requires DB change |
|
|
|
|
//$_configuration['allow_agenda_event_comment'] = false; |
|
|
|
|
$value = api_get_configuration_value('allow_agenda_event_comment'); |
|
|
|
|
$this->addSettingCurrent( |
|
|
|
|
'allow_agenda_event_comment', |
|
|
|
|
'', |
|
|
|
|
'radio', |
|
|
|
|
'Tools', |
|
|
|
|
($value?$value:'false'), |
|
|
|
|
'AgendaEventCommentEnabledTitle', |
|
|
|
|
'AgendaEventCommentEnabledComment', |
|
|
|
|
null, |
|
|
|
|
'', |
|
|
|
|
1, |
|
|
|
|
true, |
|
|
|
|
false, |
|
|
|
|
[0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Filters administration users lists by the session admin who created them. |
|
|
|
|
// Change to true to restrict the visibility |
|
|
|
|
//$_configuration['prevent_session_admins_to_manage_all_users'] = false; |
|
|
|
|
@ -806,8 +789,8 @@ class Version20150522222222 extends AbstractMigrationChamilo |
|
|
|
|
*/ |
|
|
|
|
public function down(Schema $schema) |
|
|
|
|
{ |
|
|
|
|
$this->addSql("DELETE FROM settings_options WHERE variable IN ('session_course_ordering', 'force_sso_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'prevent_session_admins_to_manage_all_users', 'allow_agenda_event_comment', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')"); |
|
|
|
|
$this->addSql("DELETE FROM settings_current WHERE variable IN ('session_course_ordering', 'force_sso_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'prevent_session_admins_to_manage_all_users', 'allow_agenda_event_comment', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')"); |
|
|
|
|
$this->addSql("DELETE FROM settings_options WHERE variable IN ('session_course_ordering', 'force_sso_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'prevent_session_admins_to_manage_all_users', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')"); |
|
|
|
|
$this->addSql("DELETE FROM settings_current WHERE variable IN ('session_course_ordering', 'force_sso_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'prevent_session_admins_to_manage_all_users', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')"); |
|
|
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE user DROP COLUMN last_login'); |
|
|
|
|
$this->addSql(" |
|
|
|
|
|