@ -14,13 +14,11 @@ use Chamilo\CoreBundle\Framework\Container;
* @author Patrick Cool < patrick.cool @ UGent . be >
* @author Roan Embrechts, refactoring and improved course visibility|subscribe|unsubscribe options
* @author Julio Montoya < gugli100 @ gmail . com > Jquery support + lots of fixes
*
* @package chamilo.course_info
*/
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_SETTING;
$this_section = SECTION_COURSES;
$nameTools = get_lang('ModifInfo ');
$nameTools = get_lang('Settings ');
api_protect_course_script(true);
api_block_anonymous_users();
$_course = api_get_course_info();
@ -82,7 +80,7 @@ function card_settings_close()
return $html;
}
$form->addHtml(card_settings_open('course_settings', get_lang('CourseS ettings'), true, 'settings.png', 'accordionSettings'));
$form->addHtml(card_settings_open('course_settings', get_lang('Course s ettings'), true, 'settings.png', 'accordionSettings'));
$image = '';
// Display course picture
@ -101,13 +99,13 @@ $form->applyFilter('title', 'trim');
$form->addElement(
'select',
'category_code',
get_lang('Fac '),
get_lang('Category '),
$categories,
['style' => 'width:350px', 'id' => 'category_code']
);
$form->addSelectLanguage(
'course_language',
[get_lang('Ln'), get_lang('TipLang ')]
[get_lang('Language'), get_lang('This language will be valid for every visitor of your courses portal ')]
);
$group = [
@ -115,13 +113,13 @@ $group = [
$form->createElement('radio', 'show_course_in_user_language', null, get_lang('No'), 2),
];
$form->addGroup($group, '', [get_lang('ShowCourseInUserL anguage')]);
$form->addGroup($group, '', [get_lang('Show course in user\'s l anguage')]);
$form->addText('department_name', get_lang('Department'), false);
$form->applyFilter('department_name', 'html_filter');
$form->applyFilter('department_name', 'trim');
$form->addText('department_url', get_lang('DepartmentUrl '), false);
$form->addText('department_url', get_lang('Department URL '), false);
$form->applyFilter('department_url', 'html_filter');
// Extra fields
@ -150,7 +148,7 @@ $(function() {
// Picture
$form->addFile(
'picture',
get_lang('AddP icture'),
get_lang('Add a p icture'),
['id' => 'picture', 'class' => 'picture-form', 'crop_image' => true]
);
@ -160,18 +158,18 @@ $form->addHtml($image);
$form->addRule(
'picture',
get_lang('OnlyImagesA llowed').' ('.implode(',', $allowed_picture_types).')',
get_lang('Only PNG, JPG or GIF images a llowed').' ('.implode(',', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
$form->addElement('checkbox', 'delete_picture', null, get_lang('DeleteP icture'));
$form->addElement('checkbox', 'delete_picture', null, get_lang('Delete p icture'));
if (api_get_setting('pdf_export_watermark_by_course') == 'true') {
$url = PDF::get_watermark($course_code);
$form->addText('pdf_export_watermark_text', get_lang('PDFExportWatermarkTextTitle '), false, ['size' => '60']);
$form->addElement('file', 'pdf_export_watermark_path', get_lang('AddWaterMark '));
$form->addText('pdf_export_watermark_text', get_lang('PDF watermark text '), false, ['size' => '60']);
$form->addElement('file', 'pdf_export_watermark_path', get_lang('Upload a watermark image '));
if ($url != false) {
$delete_url = '< a href = "?delete_watermark" > '.Display::return_icon('delete.png', get_lang('DelImag e')).'< / a > ';
$delete_url = '< a href = "?delete_watermark" > '.Display::return_icon('delete.png', get_lang('Remove pictur e')).'< / a > ';
$form->addElement(
'html',
'< div class = "row" > < div class = "form" > < a href = "'.$url.'" > '.$url.' '.$delete_url.'< / a > < / div > < / div > '
@ -179,7 +177,7 @@ if (api_get_setting('pdf_export_watermark_by_course') == 'true') {
}
$form->addRule(
'pdf_export_watermark_path',
get_lang('OnlyImagesA llowed').' ('.implode(',', $allowed_picture_types).')',
get_lang('Only PNG, JPG or GIF images a llowed').' ('.implode(',', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
@ -193,21 +191,21 @@ if (api_get_setting('allow_course_theme') == 'true') {
null,
['id' => 'course_theme_id']
);
$form->addGroup($group, '', [get_lang('Stylesheets')]);
$form->addGroup($group, '', [get_lang('Style sheets')]);
}
$form->addElement('label', get_lang('DocumentQuota '), format_file_size(DocumentManager::get_course_quota()));
$form->addElement('label', get_lang('Space Available '), format_file_size(DocumentManager::get_course_quota()));
$scoreModels = ExerciseLib::getScoreModels();
if (!empty($scoreModels)) {
$options = ['' => get_lang('N one')];
$options = ['' => get_lang('n one')];
foreach ($scoreModels['models'] as $item) {
$options[$item['id']] = get_lang($item['name']);
}
$form->addSelect('score_model_id', get_lang('ScoreM odel'), $options);
$form->addSelect('score_model_id', get_lang('Score m odel'), $options);
}
$form->addButtonSave(get_lang('SaveS ettings'), 'submit_save');
$form->addButtonSave(get_lang('Save s ettings'), 'submit_save');
$form->addHtml(card_settings_close());
@ -215,23 +213,23 @@ $group = [];
$group[] = $form->createElement(
'radio',
'visibility',
get_lang('CourseA ccess'),
get_lang('OpenToTheW orld'),
get_lang('Course a ccess'),
get_lang('Public - access allowed for the whole w orld'),
COURSE_VISIBILITY_OPEN_WORLD
);
$group[] = $form->createElement(
'radio',
'visibility',
null,
get_lang('OpenToTheP latform'),
get_lang(' Open - access allowed for users registered on the p latform'),
COURSE_VISIBILITY_OPEN_PLATFORM
);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private access (access authorized to group members only) '), COURSE_VISIBILITY_REGISTERED);
$group[] = $form->createElement(
'radio',
'visibility',
null,
get_lang('CourseVisibilityClosed '),
get_lang('Closed - the course is only accessible to the teachers '),
COURSE_VISIBILITY_CLOSED
);
@ -241,7 +239,7 @@ if (api_is_platform_admin()) {
'radio',
'visibility',
null,
get_lang('CourseVisibilityHidden '),
get_lang('Hidden - Completely hidden to all users except the administrators '),
COURSE_VISIBILITY_HIDDEN
);
}
@ -249,7 +247,7 @@ if (api_is_platform_admin()) {
$groupElement = $form->addGroup(
$group,
'',
[get_lang('CourseAccess'), get_lang('CourseA ccessConfigTip')],
[get_lang('Course access'), get_lang('Course a ccessConfigTip')],
null,
null,
true
@ -257,27 +255,27 @@ $groupElement = $form->addGroup(
$url = api_get_path(WEB_CODE_PATH)."auth/inscription.php?c=$course_code&e=1";
$url = Display::url($url, $url);
$label = $form->addLabel(get_lang('DirectLink'), sprintf(get_lang('CourseSettingsRegisterDirectL ink'), $url), true);
$label = $form->addLabel(get_lang('Direct link'), sprintf(get_lang('Course settingsRegisterDirect l ink'), $url), true);
$group2 = [];
$group2[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group2[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied '), 0);
$group2[] = $form->createElement('radio', 'subscribe', null, get_lang('This function is only available to trainers '), 0);
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$group3[] = $form->createElement(
'radio',
'unsubscribe',
get_lang('Unsubscription '),
get_lang('AllowedToUnsubscrib e'),
get_lang('Unsubscribe '),
get_lang('Users are allowed to unsubscribe from this cours e'),
1
);
$group3[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscrib e'), 0);
$group3[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotUsers are allowed to unsubscribe from this cours e'), 0);
$text = $form->createElement(
'text',
'course_registration_password',
get_lang('CourseRegistrationP assword'),
get_lang('Course registration p assword'),
false,
['size' => '60']
);
@ -285,16 +283,16 @@ $text = $form->createElement(
$checkBoxActiveLegal = $form->createElement(
'checkbox',
'activate_legal',
[null, get_lang('ShowALegalNoticeWhenEnteringTheC ourse')],
get_lang('ActivateLegal ')
[null, get_lang('Show a legal notice when entering the c ourse')],
get_lang('Enable legal terms ')
);
$textAreaLegal = $form->createElement('textarea', 'legal', get_lang('CourseLegalAgreement '), ['rows' => 8]);
$textAreaLegal = $form->createElement('textarea', 'legal', get_lang('Legal agreement for this course '), ['rows' => 8]);
$elements = [
$groupElement,
$label,
get_lang('Subscription') => $group2,
get_lang('Unsubscription ') => $group3,
get_lang('Unsubscribe ') => $group3,
$text,
$checkBoxActiveLegal,
$textAreaLegal,
@ -303,7 +301,7 @@ $elements = [
$form->addPanelOption(
'course_access',
get_lang('CourseA ccess'),
get_lang('Course a ccess'),
$elements,
'course.png',
false,
@ -315,9 +313,9 @@ $globalGroup = [];
if (api_get_setting('documents_default_visibility_defined_in_course') == 'true') {
$group = [
$form->createElement('radio', 'documents_default_visibility', null, get_lang('Visible'), 'visible'),
$form->createElement('radio', 'documents_default_visibility', null, get_lang('I nvisible'), 'invisible'),
$form->createElement('radio', 'documents_default_visibility', null, get_lang('i nvisible'), 'invisible'),
];
$globalGroup[get_lang('DocumentsDefaultVisibility ')] = $group;
$globalGroup[get_lang('Default visibility of new documents ')] = $group;
}
$group = [
@ -325,20 +323,20 @@ $group = [
$form->createElement('radio', 'show_system_folders', null, get_lang('No'), 2),
];
$globalGroup[get_lang('ShowSystemFolders ')] = $group;
$globalGroup[get_lang('Show system folders. ')] = $group;
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$group = [];
$group[] = $form->createElement(
'radio',
'enable_document_auto_launch',
get_lang('DocumentAutoLaunch '),
get_lang('RedirectToTheDocumentL ist'),
get_lang('Auto-launch for documents '),
get_lang('Redirect to the document l ist'),
1
);
$group[] = $form->createElement('radio', 'enable_document_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang('DocumentAutoLaunch ')] = $group;
$globalGroup[get_lang('Auto-launch for documents ')] = $group;
$globalGroup[] = $myButton;
@ -356,99 +354,99 @@ $group = [];
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
get_lang('NewUserEmailAlert '),
get_lang('NewUserEmailAlert Enable'),
get_lang('E-mail teacher when a new user auto-subscribes '),
get_lang('E-mail teacher when a new user auto-subscribes Enable'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
null,
get_lang('NewUserEmailAlert ToTeacharAndTutor'),
get_lang('E-mail teacher when a new user auto-subscribes ToTeacharAndTutor'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
null,
get_lang('NewUserEmailAlert Disable'),
get_lang('E-mail teacher when a new user auto-subscribes Disable'),
0
);
$globalGroup[get_lang('NewUserEmailAlert ')] = $group;
$globalGroup[get_lang('E-mail teacher when a new user auto-subscribes ')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
get_lang('NewHomeworkEmailAlert '),
get_lang('NewHomeworkEmailAlert Enable'),
get_lang('E-mail students on assignment creation '),
get_lang('E-mail students on assignment creation Enable'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
null,
get_lang('NewHomeworkEmailAlert ToHrmEnable'),
get_lang('E-mail students on assignment creation ToHrmEnable'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
null,
get_lang('NewHomeworkEmailAlert Disable'),
get_lang('E-mail students on assignment creation Disable'),
0
);
$globalGroup[get_lang('NewHomeworkEmailAlert ')] = $group;
$globalGroup[get_lang('E-mail students on assignment creation ')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
get_lang('WorkEmailAlert '),
get_lang('WorkEmailAlert Activate'),
get_lang('E-mail on assignments submission by students '),
get_lang('E-mail on assignments submission by students Activate'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlert ActivateOnlyForTeachers'),
get_lang('E-mail on assignments submission by students ActivateOnlyForTeachers'),
3
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlert ActivateOnlyForStudents'),
get_lang('E-mail on assignments submission by students ActivateOnlyForStudents'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlert Deactivate'),
get_lang('E-mail on assignments submission by students Deactivate'),
0
);
$globalGroup[get_lang('WorkEmailAlert ')] = $group;
$globalGroup[get_lang('E-mail on assignments submission by students ')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_on_new_doc_dropbox',
get_lang('DropboxEmailAlert '),
get_lang('DropboxEmailAlert Activate'),
get_lang('E-mail users on dropbox file reception '),
get_lang('E-mail users on dropbox file reception Activate'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_on_new_doc_dropbox',
null,
get_lang('DropboxEmailAlert Deactivate'),
get_lang('E-mail users on dropbox file reception Deactivate'),
0
);
$globalGroup[get_lang('DropboxEmailAlert ')] = $group;
$globalGroup[get_lang('E-mail users on dropbox file reception ')] = $group;
// Exercises notifications
$emailAlerts = ExerciseLib::getNotificationSettings();
@ -463,13 +461,13 @@ foreach ($emailAlerts as $itemId => $label) {
);
}
$globalGroup[get_lang('Exercise s')] = $group;
$globalGroup[get_lang('Test s')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_to_teachers_on_new_work_feedback',
get_lang('EmailToTeachersWhenNewWorkFeedback '),
get_lang('E-mail to teachers on new user\'s student publication feedback. '),
get_lang('Yes'),
1
);
@ -481,14 +479,14 @@ $group[] = $form->createElement(
2
);
$globalGroup[get_lang('EmailToTeachersWhenNewWorkFeedback ')] = $group;
$globalGroup[get_lang('E-mail to teachers on new user\'s student publication feedback. ')] = $group;
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup[] = $myButton;
$form->addPanelOption(
'email-notifications',
get_lang('EmailN otifications'),
get_lang('E-mail n otifications'),
$globalGroup,
'mail.png',
false,
@ -499,25 +497,25 @@ $group = [];
$group[] = $form->createElement(
'radio',
'allow_user_edit_agenda',
get_lang('AllowUserEditA genda'),
get_lang('AllowUserEditA gendaActivate'),
get_lang('Allow learners to edit the a genda'),
get_lang('Allow learners to edit the a gendaActivate'),
1
);
$group[] = $form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditA gendaDeactivate'), 0);
$group[] = $form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('Allow learners to edit the a gendaDeactivate'), 0);
$group2 = [];
$group2[] = $form->createElement(
'radio',
'allow_user_edit_announcement',
get_lang('AllowUserEditAnnouncement '),
get_lang('AllowUserEditAnnouncement Activate'),
get_lang('Allow learners to edit announcements '),
get_lang('Allow learners to edit announcements Activate'),
1
);
$group2[] = $form->createElement(
'radio',
'allow_user_edit_announcement',
null,
get_lang('AllowUserEditAnnouncement Deactivate'),
get_lang('Allow learners to edit announcements Deactivate'),
0
);
@ -525,40 +523,40 @@ $group3 = [];
$group3[] = $form->createElement(
'radio',
'allow_user_image_forum',
get_lang('AllowUserImageF orum'),
get_lang('AllowUserImageF orumActivate'),
get_lang('User picture in f orum'),
get_lang('User picture in f orumActivate'),
1
);
$group3[] = $form->createElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageF orumDeactivate'), 0);
$group3[] = $form->createElement('radio', 'allow_user_image_forum', null, get_lang('User picture in f orumDeactivate'), 0);
$group4 = [];
$group4[] = $form->createElement(
'radio',
'allow_user_view_user_list',
get_lang('AllowUserViewUserL ist'),
get_lang('AllowUserViewUserL istActivate'),
get_lang('Allow user view user l ist'),
get_lang('Allow user view user l istActivate'),
1
);
$group4[] = $form->createElement(
'radio',
'allow_user_view_user_list',
null,
get_lang('AllowUserViewUserL istDeactivate'),
get_lang('Allow user view user l istDeactivate'),
0
);
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup = [
get_lang('AllowUserEditA genda') => $group,
get_lang('AllowUserEditAnnouncement ') => $group2,
get_lang('AllowUserImageF orum') => $group3,
get_lang('AllowUserViewUserL ist') => $group4,
get_lang('Allow learners to edit the a genda') => $group,
get_lang('Allow learners to edit announcements ') => $group2,
get_lang('User picture in f orum') => $group3,
get_lang('Allow user view user l ist') => $group4,
'' => $myButton,
];
$form->addPanelOption(
'users',
get_lang('UserR ights'),
get_lang('User r ights'),
$globalGroup,
'user.png',
false,
@ -570,21 +568,21 @@ $group = [];
$group[] = $form->createElement(
'radio',
'allow_open_chat_window',
get_lang('Allow OpenchatWindow'),
get_lang('AllowOpenChatWindowActivate '),
get_lang('Open chat in a new Window'),
get_lang('Activate open the chat in a new window '),
1
);
$group[] = $form->createElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate '), 0);
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$group[] = $form->createElement('radio', 'allow_open_chat_window', null, get_lang('Deactivate open the chat in a new window '), 0);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup = [
get_lang('Allow OpenchatWindow') => $group,
get_lang('Open chat in a new Window') => $group,
'' => $myButton,
];
$form->addPanelOption(
'chat',
get_lang('ConfigC hat'),
get_lang('Chat settings '),
$globalGroup,
'chat.png',
false,
@ -596,20 +594,20 @@ $group = [];
$group[] = $form->createElement(
'radio',
'enable_lp_auto_launch',
get_lang('LPAutoL aunch'),
get_lang('RedirectToALearningP ath'),
get_lang('Enable learning path auto-l aunch'),
get_lang('Redirect to a selected learning p ath'),
1
);
$group[] = $form->createElement(
'radio',
'enable_lp_auto_launch',
get_lang('LPAutoL aunch'),
get_lang('RedirectToTheLearningPathL ist'),
get_lang('Enable learning path auto-l aunch'),
get_lang('Redirect to the learning paths l ist'),
2
);
$group[] = $form->createElement('radio', 'enable_lp_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang('LPAutoL aunch')] = $group;
$globalGroup[get_lang('Enable learning path auto-l aunch')] = $group;
if (api_get_setting('allow_course_theme') == 'true') {
// Allow theme into Learning path
@ -617,19 +615,19 @@ if (api_get_setting('allow_course_theme') == 'true') {
$group[] = $form->createElement(
'radio',
'allow_learning_path_theme',
get_lang('AllowLearningPathTheme '),
get_lang('AllowLearningPathTheme Allow'),
get_lang('Enable course themes '),
get_lang('Enable course themes Allow'),
1
);
$group[] = $form->createElement(
'radio',
'allow_learning_path_theme',
null,
get_lang('AllowLearningPathTheme Disallow'),
get_lang('Enable course themes Disallow'),
0
);
$globalGroup[get_lang("AllowLearningPathTheme ")] = $group;
$globalGroup[get_lang("Enable course themes ")] = $group;
}
$allowLPReturnLink = api_get_setting('allow_lp_return_link');
@ -638,26 +636,26 @@ if ($allowLPReturnLink === 'true') {
$form->createElement(
'radio',
'lp_return_link',
get_lang('LpReturnL ink'),
get_lang('RedirectToTheLearningPathL ist'),
get_lang('Learning path return l ink'),
get_lang('Redirect to the learning paths l ist'),
1
),
$form->createElement(
'radio',
'lp_return_link',
null,
get_lang('RedirectToCourseH ome'),
get_lang('Redirect to Course h ome'),
0
),
$form->createElement(
'radio',
'lp_return_link',
null,
get_lang('MyC ourses'),
get_lang('My c ourses'),
2
),
];
$globalGroup[get_lang("LpReturnL ink")] = $group;
$globalGroup[get_lang("Learning path return l ink")] = $group;
}
$exerciseInvisible = api_get_setting('exercise_invisible_in_session');
@ -670,7 +668,7 @@ if ($exerciseInvisible === 'true' &&
$form->createElement(
'radio',
'exercise_invisible_in_session',
get_lang('ExerciseI nvisibleInSession'),
get_lang('Testi nvisibleInSession'),
get_lang('Yes'),
1
),
@ -683,11 +681,11 @@ if ($exerciseInvisible === 'true' &&
),
];
$globalGroup[get_lang("ExerciseI nvisibleInSession")] = $group;
$globalGroup[get_lang("Testi nvisibleInSession")] = $group;
}
if ($isEditable) {
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup[] = $myButton;
} else {
// Is it allowed to edit the course settings?
@ -699,7 +697,7 @@ if ($isEditable) {
$form->addPanelOption(
'config_lp',
get_lang('Config Learnpath'),
get_lang('Learning path settings '),
$globalGroup,
'scorms.png',
false,
@ -714,23 +712,23 @@ if (api_get_configuration_value('allow_exercise_auto_launch')) {
$group[] = $form->createElement(
'radio',
'enable_exercise_auto_launch',
get_lang('ExerciseAutoLaunch '),
get_lang('RedirectToE xercise'),
get_lang('Auto-launch for exercises '),
get_lang('Redirect to the selected e xercise'),
1
);
$group[] = $form->createElement(
'radio',
'enable_exercise_auto_launch',
get_lang('ExerciseAutoLaunch '),
get_lang('RedirectToTheExerciseL ist'),
get_lang('Auto-launch for exercises '),
get_lang('Redirect to the exercises l ist'),
2
);
$group[] = $form->createElement('radio', 'enable_exercise_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang("ExerciseAutoLaunch ")] = $group;
$globalGroup[get_lang("Auto-launch for exercises ")] = $group;
if ($isEditable) {
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup[] = $myButton;
} else {
// Is it allowed to edit the course settings?
@ -742,7 +740,7 @@ if (api_get_configuration_value('allow_exercise_auto_launch')) {
$form->addPanelOption(
'config_exercise',
get_lang('Exercise '),
get_lang('Test '),
$globalGroup,
'quiz.png',
false,
@ -755,41 +753,41 @@ $group = [];
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
get_lang('InfoAboutAdvanceInsideHomeCours e'),
get_lang('DisplayAboutLastDoneAdvance '),
get_lang('Information on thematic advance on course homepag e'),
get_lang('Display information about the last completed topic '),
1
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DisplayAboutNextAdvanceNotDone '),
get_lang('Display information about the next uncompleted topic '),
2
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DisplayAboutNextAdvanceNotDone AndLastDoneAdvance'),
get_lang('Display information about the next uncompleted topic AndLastDoneAdvance'),
3
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DoNotDisplayAnyAdvance '),
get_lang('Do not display progress '),
0
);
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup = [
get_lang('InfoAboutAdvanceInsideHomeCours e') => $group,
get_lang('Information on thematic advance on course homepag e') => $group,
'' => $myButton,
];
$form->addPanelOption(
'thematic',
get_lang('ThematicAdvanceC onfiguration'),
get_lang('Thematic advance c onfiguration'),
$globalGroup,
'course_progress.png',
false,
@ -801,15 +799,15 @@ if (api_get_setting('allow_public_certificates') === 'true') {
$group[] = $form->createElement(
'radio',
'allow_public_certificates',
get_lang('AllowPublicCertificates '),
get_lang('Learner certificates are public '),
get_lang('Yes'),
1
);
$group[] = $form->createElement('radio', 'allow_public_certificates', null, get_lang('No'), 0);
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup = [
get_lang('AllowPublicCertificates ') => $group,
get_lang('Learner certificates are public ') => $group,
'' => $myButton,
];
@ -825,10 +823,10 @@ if (api_get_setting('allow_public_certificates') === 'true') {
// Forum settings
$group = [
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('RedirectToForumL ist'), 1),
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('Redirect to forums l ist'), 1),
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('Disabled'), 2),
];
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
// Forum settings
$groupNotification = [
@ -842,9 +840,9 @@ $addUsers = [
];
$globalGroup = [
get_lang('EnableForumAutoL aunch') => $group,
get_lang('HideForumN otifications') => $groupNotification,
get_lang('SubscribeUsersToAllForumN otifications') => $addUsers,
get_lang('Enable forum auto-l aunch') => $group,
get_lang('Hide forum n otifications') => $groupNotification,
get_lang('Subscribe automatically all users to all forum n otifications') => $addUsers,
'' => $myButton,
];
@ -859,24 +857,24 @@ $form->addPanelOption(
// Student publication
$group = [
$form->createElement('radio', 'show_score', null, get_lang('NewVisible '), 0),
$form->createElement('radio', 'show_score', null, get_lang('NewUnvisible '), 1),
$form->createElement('radio', 'show_score', null, get_lang('New documents are visible for all users '), 0),
$form->createElement('radio', 'show_score', null, get_lang('New documents are only visible for the teacher(s) '), 1),
];
$group2 = [
$form->createElement('radio', 'student_delete_own_publication', null, get_lang('Yes'), 1),
$form->createElement('radio', 'student_delete_own_publication', null, get_lang('No'), 0),
];
$myButton = $form->addButtonSave(get_lang('SaveS ettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save s ettings'), 'submit_save', true);
$globalGroup = [
get_lang('DefaultUpload ') => $group,
get_lang('StudentAllowedToDeleteOwnPublication ') => $group2,
get_lang('Default setting for the visibility of newly posted files ') => $group,
get_lang('Allow learners to delete their own publications ') => $group2,
'' => $myButton,
];
$form->addPanelOption(
'student-publication',
get_lang('StudentPublication s'),
get_lang('Assignment s'),
$globalGroup,
'work.png',
false,
@ -979,7 +977,7 @@ if ($form->validate() && $isEditable) {
api_warn_hosting_contact('hosting_limit_active_courses');
Display::addFlash(
Display::return_message(get_lang('PortalActiveCoursesLimitReached '))
Display::return_message(get_lang('Sorry, this installation has an active courses limit, which has now been reached. You can still create new courses, but only if you hide/disable at least one existing active course. To do this, edit a course from the administration courses list, and change the visibility to \'hidden\', then try creating this course again. To increase the maximum number of active courses allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan. '))
);
$url = api_get_path(WEB_CODE_PATH).'course_info/infocours.php?'.api_get_cidreq();
@ -1039,7 +1037,7 @@ if ($form->validate() && $isEditable) {
$courseParams = api_get_cidreq();
$cidReset = true;
$cidReq = $course_code;
Display::addFlash(Display::return_message(get_lang('Updated ')));
Display::addFlash(Display::return_message(get_lang('Update successful ')));
$url = api_get_path(WEB_CODE_PATH).'course_info/infocours.php?'.$courseParams;
header("Location: $url");
@ -1048,7 +1046,7 @@ if ($form->validate() && $isEditable) {
if ($show_delete_watermark_text_message) {
Display::addFlash(
Display::return_message(get_lang('FileD eleted'), 'normal')
Display::return_message(get_lang('File d eleted'), 'normal')
);
}