From 6b65c500b1f5e5e121808a44b77643c5599f7d08 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 17 Aug 2017 15:04:03 -0500 Subject: [PATCH] Avoid show form field for survey results and 9 lang variale - refs BT#13203 --- main/survey/create_new_survey.php | 7 ++++++- main/survey/survey_question.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/main/survey/create_new_survey.php b/main/survey/create_new_survey.php index 15c17e6127..f7686aabba 100755 --- a/main/survey/create_new_survey.php +++ b/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)); diff --git a/main/survey/survey_question.php b/main/survey/survey_question.php index 72dfe58f2a..a80578bd0a 100644 --- a/main/survey/survey_question.php +++ b/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??