Adding anonymous survey link generation (disabling api_is_allowed_to_edit) see #5851

skala
Julio Montoya 12 years ago
parent 5c1cd3bbcf
commit 21af874ebc
  1. 7
      main/survey/generate_link.php
  2. 3
      main/survey/link.php

@ -9,7 +9,7 @@ if (!api_is_allowed_to_edit(false, true)) {
$survey_id = isset($_REQUEST['survey_id']) ? intval($_REQUEST['survey_id']) : null;
if (empty($survey_id)) {
if (empty($suvrey_id)) {
api_not_allowed(true);
}
$survey_data = survey_manager::get_survey($survey_id);
@ -30,5 +30,10 @@ echo '<div class="row">';
echo '</div>';
echo '<div class="span12">';
echo get_lang('GenerateSurveyLinkExplanation');
echo '<pre>';
echo $link;
echo '</pre>';
echo '</div>';
echo '</div>';

@ -2,9 +2,10 @@
require_once '../inc/global.inc.php';
/*
if (!api_is_allowed_to_edit(false, true)) {
api_not_allowed(true);
}
}*/
$survey_id = isset($_REQUEST['l']) ? intval($_REQUEST['l']) : null;

Loading…
Cancel
Save