Эх сурвалжийг харах

Avoid show form field for survey results and 9 lang variale - refs BT#13203

Angel Fernando Quiroz Campos 7 жил өмнө
parent
commit
6b65c500b1

+ 6 - 1
main/survey/create_new_survey.php

@@ -153,7 +153,12 @@ $visibleResults = array(
     SURVEY_VISIBLE_TUTOR_STUDENT => get_lang('CoachAndStudent'),
     SURVEY_VISIBLE_PUBLIC => get_lang('Everyone')
 );
-$form->addElement('select', 'visible_results', get_lang('ResultsVisibility'), $visibleResults);
+
+if (api_get_configuration_value('hide_survey_reporting_button')) {
+    $form->addLabel(get_lang('ResultsVisibility'), get_lang('FeatureDisabledByAdministrator'));
+} else {
+    $form->addElement('select', 'visible_results', get_lang('ResultsVisibility'), $visibleResults);
+}
 //$defaults['visible_results'] = 0;
 $form->addElement('html_editor', 'survey_introduction', get_lang('SurveyIntroduction'), null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false));
 $form->addElement('html_editor', 'survey_thanks', get_lang('SurveyThanks'), null, array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false));

+ 1 - 1
main/survey/survey_question.php

@@ -77,7 +77,7 @@ class survey_question
 
         if (api_get_configuration_value('allow_required_survey_questions') &&
             in_array($_GET['type'], ['yesno', 'multiplechoice'])) {
-            $form->addCheckBox('is_required', get_lang('IsRequired'), get_lang('Yes'));
+            $form->addCheckBox('is_required', get_lang('IsMandatory'), get_lang('Yes'));
         }
 
         // When survey type = 1??