// {{{ static function retrieveSurveyReq() : gets a survey request to validate
public static function retrieveSurveyReq($id)
{
- require_once 'validations.inc.php';
$surveyreq = Validate::get_request_by_id($id);
if ($surveyreq == null) {
return null;
// {{{ function proposeSurvey() : stores a proposition of survey in database (before validation)
public function proposeSurvey()
{
- require_once 'validations.inc.php';
$surveyreq = new SurveyReq($this->title, $this->description, $this->end, $this->mode, $this->promos, $this->questions, S::user());
return $surveyreq->submit();
}
WHERE id={?};';
return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->end, $this->mode, $this->promos, $this->id);
} else {
- require_once 'validations.inc.php';
$surveyreq = Validate::get_request_by_id($this->id);
if ($surveyreq == null) {
return false;