Fix link to redirect to the correct page see BT#14957

pull/2729/head
Julio Montoya 7 years ago
parent 4733577fbc
commit acf09fc56b
  1. 2
      main/survey/create_meeting.php
  2. 9
      main/survey/fillsurvey.php
  3. 4
      main/survey/meeting.php
  4. 5
      main/survey/surveyUtil.class.php

@ -146,7 +146,7 @@ if ($form->validate()) {
} }
// Redirecting to the survey page (whilst showing the return message) // Redirecting to the survey page (whilst showing the return message)
header('Location: '.api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$return['id'].'&'.api_get_cidreq()); header('Location: '.api_get_path(WEB_CODE_PATH).'survey/survey_list.php?'.api_get_cidreq());
exit; exit;
} else { } else {
// Displaying the header // Displaying the header

@ -204,6 +204,15 @@ if (empty($survey_data)) {
} }
$survey_data['survey_id'] = $survey_invitation['survey_id']; $survey_data['survey_id'] = $survey_invitation['survey_id'];
if ($survey_data['survey_type'] == '3') {
header('Location: '.
api_get_path(WEB_CODE_PATH).
'survey/meeting.php?cidReq='.$courseInfo['code'].'&id_session='.$sessionId.'&invitationcode='.Security::remove_XSS($invitationcode)
);
exit;
}
// Storing the answers // Storing the answers
if (count($_POST) > 0) { if (count($_POST) > 0) {
if ($survey_data['survey_type'] === '0') { if ($survey_data['survey_type'] === '0') {

@ -9,9 +9,9 @@ $userId = api_get_user_id();
$courseInfo = api_get_course_info(); $courseInfo = api_get_course_info();
$surveyId = isset($_REQUEST['survey_id']) ? (int) $_REQUEST['survey_id'] : 0; $surveyId = isset($_REQUEST['survey_id']) ? (int) $_REQUEST['survey_id'] : 0;
$invitationcode = isset($_REQUEST['invitationcode']) ? Database::escape_string($_REQUEST['invitationcode']) : 0;
if (!api_is_allowed_to_edit()) { if (!api_is_allowed_to_edit() || !empty($invitationcode)) {
$invitationcode = isset($_REQUEST['invitationcode']) ? Database::escape_string($_REQUEST['invitationcode']) : 0;
$table_survey_invitation = Database::get_course_table(TABLE_SURVEY_INVITATION); $table_survey_invitation = Database::get_course_table(TABLE_SURVEY_INVITATION);
$table_survey = Database::get_course_table(TABLE_SURVEY); $table_survey = Database::get_course_table(TABLE_SURVEY);

@ -3157,7 +3157,6 @@ class SurveyUtil
api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey[0].'&'.api_get_cidreq() api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey[0].'&'.api_get_cidreq()
); );
} }
} }
// Validation when belonging to a session // Validation when belonging to a session
@ -3373,10 +3372,6 @@ class SurveyUtil
); );
$url = api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?course='.$_course['sysCode'] $url = api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?course='.$_course['sysCode']
.'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'&id_session='.$row['session_id']; .'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'&id_session='.$row['session_id'];
if ($row['survey_type'] == 3) {
$url = api_get_path(WEB_CODE_PATH).'survey/meeting.php?course='.$_course['sysCode']
.'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'&id_session='.$row['session_id'];
}
echo '<a href="'.$url.'"> echo '<a href="'.$url.'">
'.$row['title'] '.$row['title']
.'</a></td>'; .'</a></td>';

Loading…
Cancel
Save