From a25a9ae68d1c2b8938dbdaf8e05557670e89ffae Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Tue, 9 Jul 2024 14:52:44 +0200 Subject: [PATCH] Survey: remove code for mulitlingual survey from Chamilo 1 that do not work on Chamilo 2 and is not a good option for reimplementation, better use translate HTML in the question's and answer's edition - refs BT#21790 --- public/main/survey/fillsurvey.php | 38 ------------------------------- 1 file changed, 38 deletions(-) diff --git a/public/main/survey/fillsurvey.php b/public/main/survey/fillsurvey.php index 93daeeefd4..287344ab4d 100644 --- a/public/main/survey/fillsurvey.php +++ b/public/main/survey/fillsurvey.php @@ -196,44 +196,6 @@ $logInfo = [ Event::registerLog($logInfo); $survey_invitation['survey_id'] = $surveyId; -// the following code is commented for the moment because -// in Chamilo 2 we can have various survey with the same code -// for the multi-language functionnality for a survey if needed -// it will need to be reimplemented in a different way. -// The code is commented for the moment because it blocks -// the normal use when many surveys have the same code. -/* -// Checking if there is another survey with this code. -// If this is the case there will be a language choice -$sql = "SELECT * FROM $table_survey - WHERE - code = '".Database::escape_string($survey->getCode())."'"; -$result = Database::query($sql); - -if (Database::num_rows($result) > 1) { - if (isset($_POST['language'])) { - $survey_invitation['survey_id'] = $_POST['language']; - } else { - Display::display_header(get_lang('Surveys')); - $frmLangUrl = api_get_self().'?'.api_get_cidreq().'&' - .http_build_query([ - 'course' => Security::remove_XSS($_GET['course']), - 'invitationcode' => Security::remove_XSS($_GET['invitationcode']), - ]); - - echo '
'; - echo ''; - echo ''; - echo '
'; - Display::display_footer(); - exit(); - } -} - */ // Checking time availability SurveyManager::checkTimeAvailability($survey);