$page->assign('survey_old', Survey::retrieveList('o'));
$page->assign('survey_modes', Survey::getModes(false));
} else {
+ $id = intval($id);
$survey = Survey::retrieveSurvey($id); // retrieves all survey object structure
if ($survey == null) {
$this->show_error($page, "Sondage ".$id." introuvable.", 'admin');
if ($id == -1) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'admin');
}
+ $id = intval($id);
require_once dirname(__FILE__).'/survey/survey.inc.php';
$survey = Survey::retrieveSurvey($id); // retrieves the survey in database
$this->clear_session(); // cleans session (in case there would have been a problem before)
if ($id == -1) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'admin');
}
+ $id = intval($id);
require_once dirname(__FILE__).'/survey/survey.inc.php';
$surveyInfo = Survey::retrieveSurveyInfo($id); // retrieves information about the survey (does not retrieve and unserialize the object structure)
if ($surveyInfo == null) {
if ($id == -1) {
return $this->show_error($page, "Un identifiant de sondage doit être précisé.", 'admin');
}
+ $id = intval($id);
require_once dirname(__FILE__).'/survey/survey.inc.php';
$surveyInfo = Survey::retrieveSurveyInfo($id); // retrieves information about the survey (does not retrieve and unserialize the object structure)
if ($surveyInfo == null) {
// {{{ questions manipulation functions
public function addQuestion($i, $c)
{
+ $i = intval($i);
if ($this->valid || $i > count($this->questions)) {
return false;
} else {
public function delQuestion($i)
{
+ $i = intval($i);
if ($this->valid || !array_key_exists($i, $this->questions)) {
return false;
} else {