From 472e8090b9c4a8a4ff903793d75fe8bfc6fe34f3 Mon Sep 17 00:00:00 2001 From: Colin Kiegel Date: Thu, 2 Apr 2015 22:49:40 +0200 Subject: [PATCH] Remove duplicate ilExerciseException --- .../classes/class.ilExerciseException.php | 30 ------------------- .../classes/class.ilExerciseXMLParser.php | 2 +- .../exceptions/class.ilExerciseException.php | 8 +++-- .../class.ilSoapExerciseAdministration.php | 4 +-- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 Modules/Exercise/classes/class.ilExerciseException.php diff --git a/Modules/Exercise/classes/class.ilExerciseException.php b/Modules/Exercise/classes/class.ilExerciseException.php deleted file mode 100644 index c355c87c76b0..000000000000 --- a/Modules/Exercise/classes/class.ilExerciseException.php +++ /dev/null @@ -1,30 +0,0 @@ - -* @version $Id: class.ilExerciseException.php 12992 2007-01-25 10:04:26Z rkuester $ -* @ingroup ModulesExercise -*/ -class ilExerciseException extends ilException -{ - public static $ID_MISMATCH = 0; - public static $ID_DEFLATE_METHOD_MISMATCH = 1; - /** - * A message isn't optional as in build in class Exception - * - * @access public - * - */ - public function __construct($a_message,$a_code = 0) - { - parent::__construct($a_message,$a_code); - } -} - -?> diff --git a/Modules/Exercise/classes/class.ilExerciseXMLParser.php b/Modules/Exercise/classes/class.ilExerciseXMLParser.php index f95347811b09..e685df766711 100644 --- a/Modules/Exercise/classes/class.ilExerciseXMLParser.php +++ b/Modules/Exercise/classes/class.ilExerciseXMLParser.php @@ -3,7 +3,7 @@ include_once 'classes/class.ilSaxParser.php'; include_once 'Services/Tracking/classes/class.ilChangeEvent.php'; -include_once 'Modules/Exercise/classes/class.ilExerciseException.php'; +include_once 'Modules/Exercise/exceptions/class.ilExerciseException.php'; include_once 'Modules/Exercise/classes/class.ilExerciseXMLWriter.php'; /** diff --git a/Modules/Exercise/exceptions/class.ilExerciseException.php b/Modules/Exercise/exceptions/class.ilExerciseException.php index 28ac07b261ea..ea7f6a879eef 100644 --- a/Modules/Exercise/exceptions/class.ilExerciseException.php +++ b/Modules/Exercise/exceptions/class.ilExerciseException.php @@ -6,20 +6,22 @@ /** * Exercise exceptions class * - * @author Alex Killing + * @author Alex Killing , Roland Küstermann * @version $Id$ * */ class ilExerciseException extends ilException { + public static $ID_MISMATCH = 0; + public static $ID_DEFLATE_METHOD_MISMATCH = 1; /** * Constructor * * @param string $a_message message */ - public function __construct($a_message) + public function __construct($a_message, $a_code = 0) { - parent::__construct($a_message); + parent::__construct($a_message, $a_code); } } ?> diff --git a/webservice/soap/classes/class.ilSoapExerciseAdministration.php b/webservice/soap/classes/class.ilSoapExerciseAdministration.php index 3bbf786e943e..f5c9c543a16c 100644 --- a/webservice/soap/classes/class.ilSoapExerciseAdministration.php +++ b/webservice/soap/classes/class.ilSoapExerciseAdministration.php @@ -84,7 +84,7 @@ function addExercise ($sid, $target_id, $exercise_xml) // create object, put it into the tree and use the parser to update the settings include_once './Modules/Exercise/classes/class.ilObjExercise.php'; include_once './Modules/Exercise/classes/class.ilExerciseXMLParser.php'; - include_once './Modules/Exercise/classes/class.ilExerciseException.php'; + include_once './Modules/Exercise/exceptions/class.ilExerciseException.php'; $exercise = new ilObjExercise(); @@ -170,7 +170,7 @@ function updateExercise ($sid, $ref_id, $exercise_xml) } include_once './Modules/Exercise/classes/class.ilExerciseXMLParser.php'; - include_once './Modules/Exercise/classes/class.ilExerciseException.php'; + include_once './Modules/Exercise/exceptions/class.ilExerciseException.php'; $exerciseXMLParser = new ilExerciseXMLParser($exercise, $exercise_xml, $obj_id); try