4require_once
'Services/Component/classes/class.ilPlugin.php';
5require_once
'Modules/Test/classes/class.ilTestExportFilename.php';
116 if (!is_string($format_id)) {
117 throw new ilException(
'The format must be of type string.');
120 if (!strlen($format_id)) {
124 if (strtolower($format_id) != $format_id) {
125 throw new ilException(
'Please use a lowercase format.');
128 if (in_array($format_id, self::$reserved_formats)) {
129 throw new ilException(
'The format must not be one of: ' . implode(
', ', self::$reserved_formats));
138 final public function export()
146 $ilCtrl =
$DIC[
'ilCtrl'];
149 throw new ilException(
'Incomplete object configuration. Please pass an instance of ilObjTest before calling the export!');
155 if ($this->
txt($e->getMessage()) ==
'-' .
$e->getMessage() .
'-') {
160 $ilCtrl->redirectByClass(
'iltestexportgui');
163 ilUtil::sendSuccess(
$lng->txt(
'exp_file_created'),
true);
164 $ilCtrl->redirectByClass(
'iltestexportgui');
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_var)
Get Language Variable (prefix will be prepended automatically)
Abstract parent class for all event hook plugin classes.
getComponentType()
Get Component Type.
getComponentName()
Get Component Name.
slotInit()
Object initialization done by slot.
getFormatLabel()
This method should return a human readable label for your export.
buildExportFile(ilTestExportFilename $export_path)
This method is called if the user wants to export a test of YOUR export type If you throw an exceptio...
getFormatIdentifier()
A unique identifier which describes your export type, e.g.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.