Add session id in URL to fix survey error see BT#13870

pull/2458/head
jmontoyaa 8 years ago
parent e7f7264248
commit 4cc1ce0570
  1. 4
      main/survey/surveyUtil.class.php
  2. 2
      main/survey/survey_invite.php

@ -3249,7 +3249,8 @@ class SurveyUtil
ICON_SIZE_TINY ICON_SIZE_TINY
); );
echo '<a href="'.api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?course='.$_course['sysCode'] echo '<a href="'.api_get_path(WEB_CODE_PATH).'survey/fillsurvey.php?course='.$_course['sysCode']
.'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'">'.$row['title'] .'&invitationcode='.$row['invitation_code'].'&cidReq='.$_course['sysCode'].'&id_session='.$row['session_id'].'">
'.$row['title']
.'</a></td>'; .'</a></td>';
} else { } else {
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
@ -3287,7 +3288,6 @@ class SurveyUtil
); );
echo '<td class="text-center">'.($efvMandatory['value'] ? get_lang('Yes') : get_lang('No')).'</td>'; echo '<td class="text-center">'.($efvMandatory['value'] ? get_lang('Yes') : get_lang('No')).'</td>';
} }
echo '</tr>'; echo '</tr>';
} }
echo '</tbody>'; echo '</tbody>';

@ -163,7 +163,7 @@ if (api_is_multiple_url_enabled()) {
} }
// Show the URL that can be used by users to fill a survey without invitation // Show the URL that can be used by users to fill a survey without invitation
$auto_survey_link = $portal_url.'main/survey/fillsurvey.php?course='.$_course['sysCode'].'&invitationcode=auto&scode='.$survey_data['survey_code']; $auto_survey_link = $portal_url.'main/survey/fillsurvey.php?course='.$_course['sysCode'].'&invitationcode=auto&scode='.$survey_data['survey_code'].'&id_session='.$survey_data['session_id'];
$form->addElement('label', null, get_lang('AutoInviteLink')); $form->addElement('label', null, get_lang('AutoInviteLink'));
$form->addElement('label', null, $auto_survey_link); $form->addElement('label', null, $auto_survey_link);

Loading…
Cancel
Save