|
@@ -21,9 +21,6 @@ $this_section = SECTION_COURSES;
|
|
|
|
|
|
$nameTools = get_lang('ModifInfo');
|
|
|
|
|
|
-/* Libraries */
|
|
|
-require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';
|
|
|
-
|
|
|
api_protect_course_script(true);
|
|
|
api_block_anonymous_users();
|
|
|
|
|
@@ -39,7 +36,9 @@ $course_access_settings = CourseManager :: get_access_settings($course_code);
|
|
|
|
|
|
//LOGIC FUNCTIONS
|
|
|
function is_settings_editable() {
|
|
|
- return isset($GLOBALS['course_info_is_editable']) && $GLOBALS['course_info_is_editable'];
|
|
|
+ //@todo check this setting This course_info_is_editable is defined where?
|
|
|
+ //return isset($GLOBALS['course_info_is_editable']) && $GLOBALS['course_info_is_editable'];
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/* MAIN CODE */
|
|
@@ -249,7 +248,7 @@ $form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class=
|
|
|
$form->addElement('html', '</div></div>');
|
|
|
|
|
|
// USER RIGHTS
|
|
|
-$form->addElement('html', '<div> <h3>'.Display::return_icon('user.png', Security::remove_XSS(get_lang('UserRights')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('UserRights')).'</h3><div>');
|
|
|
+$form->addElement('html', '<div><h3>'.Display::return_icon('user.png', Security::remove_XSS(get_lang('UserRights')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('UserRights')).'</h3><div>');
|
|
|
|
|
|
$group = array();
|
|
|
$group[]=$form->createElement('radio', 'allow_user_edit_agenda', get_lang('AllowUserEditAgenda'), get_lang('AllowUserEditAgendaActivate'), 1);
|
|
@@ -303,7 +302,6 @@ if (api_get_setting('allow_course_theme') == 'true') {
|
|
|
$group[]=$form->createElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1);
|
|
|
$group[]=$form->createElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0);
|
|
|
$form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")), '');
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if (is_settings_editable()) {
|
|
@@ -317,6 +315,20 @@ if (is_settings_editable()) {
|
|
|
}
|
|
|
$form->addElement('html', '</div></div>');
|
|
|
|
|
|
+
|
|
|
+//Exercise
|
|
|
+$form->addElement('html', '<div><h3>'.Display::return_icon('quiz.png', Security::remove_XSS(get_lang('Exercises')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Exercises')).'</h3><div>');
|
|
|
+
|
|
|
+$group = array();
|
|
|
+$group[]=$form->createElement('radio', 'allow_fast_exercise_edition', get_lang('AllowFastExerciseEdition'), get_lang('Yes'), 1);
|
|
|
+$group[]=$form->createElement('radio', 'allow_fast_exercise_edition', get_lang('AllowFastExerciseEdition'), get_lang('No'), 0);
|
|
|
+
|
|
|
+$form->addGroup($group, '', array(get_lang("AllowFastExerciseEdition")), '');
|
|
|
+
|
|
|
+$form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
|
|
|
+$form->addElement('html', '</div></div>');
|
|
|
+
|
|
|
+
|
|
|
// THEMATIC ADVANCE SETTINGS
|
|
|
$form->addElement('html', '<div><h3>'.Display::return_icon('course_progress.png', Security::remove_XSS(get_lang('ThematicAdvanceConfiguration')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('ThematicAdvanceConfiguration')).'</h3><div>');
|
|
|
|
|
@@ -328,12 +340,9 @@ $group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse',
|
|
|
$form->addGroup($group, '', array(get_lang("InfoAboutAdvanceInsideHomeCourse")), '');
|
|
|
|
|
|
$form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
|
|
|
-
|
|
|
$form->addElement('html', '</div></div>');
|
|
|
|
|
|
-
|
|
|
// Certificate settings
|
|
|
-
|
|
|
if (api_get_setting('allow_public_certificates')=='true') {
|
|
|
$form->addElement('html', '<div><h3>'.Display::return_icon('certificate.png', Security::remove_XSS(get_lang('Certificates')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Certificates')).'</h3><div>');
|
|
|
$group = array();
|
|
@@ -401,6 +410,7 @@ $values['email_alert_students_on_new_homework'] = api_get_course_setting('em
|
|
|
$values['enable_lp_auto_launch'] = api_get_course_setting('enable_lp_auto_launch');
|
|
|
$values['pdf_export_watermark_text'] = api_get_course_setting('pdf_export_watermark_text');
|
|
|
$values['allow_public_certificates'] = api_get_course_setting('allow_public_certificates');
|
|
|
+$values['allow_fast_exercise_edition'] = api_get_course_setting('allow_fast_exercise_edition') == 1 ? 1 : 0;
|
|
|
|
|
|
$app_plugin->set_course_settings_defaults($values);
|
|
|
|