X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fsurvey%2Fquestion.inc.php;h=f8cde84a9e37da53c0f60962d1b5467874608406;hb=d82359a556779137f8a90d0312b3098a2db6f482;hp=c29af368838fd8f7bd3e8da071b12b1e3782ad20;hpb=a43cdc7aab599efc9ebc698e91c131d3a40d6bee;p=platal.git diff --git a/modules/survey/question.inc.php b/modules/survey/question.inc.php index c29af36..f8cde84 100644 --- a/modules/survey/question.inc.php +++ b/modules/survey/question.inc.php @@ -47,11 +47,7 @@ class SurveyQuestion extends PlDBTableEntry public static function instanceForType(Survey $survey, $type) { - $file = dirname(__FILE__) . '/' . $type . '.inc.php'; - if (!file_exists($file)) { - throw new Exception("Unknown question type \"$type\""); - } - require_once $file; + require_once dirname(__FILE__) . '/' . $type . '.inc.php'; $class = 'SurveyQuestion' . $type; return new $class($survey); } @@ -91,19 +87,6 @@ class SurveyQuestion extends PlDBTableEntry } return $answer; } - - public function export() - { - $export = parent::export(); - if (isset($export['parameters'])) { - foreach ($export['parameters'] as $key=>$value) { - $export[$key] = $value; - } - unset($export['parameters']); - } - return $export; - } - } class SurveyQuestionGroup extends SurveyQuestion implements SurveyQuestionContainer