Change sorting order on ML display to use sort_name.
[platal.git] / modules / survey / question.inc.php
index bd206ad..4a6cdc7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2011 Polytechnique.org                              *
+ *  Copyright (C) 2003-2014 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -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);
     }
@@ -178,5 +174,5 @@ class SurveyQuestionGroup extends SurveyQuestion implements SurveyQuestionContai
     }
 }
 
-// vim:set et sw=4 sts=4 ts=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 foldmethod=marker fenc=utf-8:
 ?>