diff --git a/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentHtmlPurifier.php b/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentHtmlPurifier.php index 363a81b7b8a3..f8c3b1d2786e 100755 --- a/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentHtmlPurifier.php +++ b/components/ILIAS/Accessibility/classes/Document/class.ilAccessibilityDocumentHtmlPurifier.php @@ -32,7 +32,7 @@ public function __construct(array $allowedTags = null, string $cacheDirectory = $this->cacheDirectory = $cacheDirectory; if (null === $allowedTags) { - $allowedTags = ilObjAdvancedEditing::_getUsedHTMLTags('textarea'); + $allowedTags = ilRTESettings::_getUsedHTMLTags('textarea'); } $this->allowedTags = $allowedTags; diff --git a/components/ILIAS/Accordion/Accordion.php b/components/ILIAS/Accordion/Accordion.php index 59477bd07f57..c7643057fd31 100644 --- a/components/ILIAS/Accordion/Accordion.php +++ b/components/ILIAS/Accordion/Accordion.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class Accordion implements Component\Component { public function init( diff --git a/components/ILIAS/Accordion/classes/class.StandardGUIRequest.php b/components/ILIAS/Accordion/classes/class.StandardGUIRequest.php index 5469a9df40a6..bb756ad5af21 100755 --- a/components/ILIAS/Accordion/classes/class.StandardGUIRequest.php +++ b/components/ILIAS/Accordion/classes/class.StandardGUIRequest.php @@ -20,6 +20,9 @@ use ILIAS\Repository\BaseGUIRequest; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class StandardGUIRequest { use BaseGUIRequest; diff --git a/components/ILIAS/Accordion/classes/class.ilAccordionGUI.php b/components/ILIAS/Accordion/classes/class.ilAccordionGUI.php index 915d39c257cc..91c1ee525d31 100755 --- a/components/ILIAS/Accordion/classes/class.ilAccordionGUI.php +++ b/components/ILIAS/Accordion/classes/class.ilAccordionGUI.php @@ -19,6 +19,7 @@ /** * Accordion user interface class * @author Alexander Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilAccordionGUI { diff --git a/components/ILIAS/Accordion/classes/class.ilAccordionPropertiesStorageGUI.php b/components/ILIAS/Accordion/classes/class.ilAccordionPropertiesStorageGUI.php index dc750ad92e85..a47ba309d99e 100755 --- a/components/ILIAS/Accordion/classes/class.ilAccordionPropertiesStorageGUI.php +++ b/components/ILIAS/Accordion/classes/class.ilAccordionPropertiesStorageGUI.php @@ -19,6 +19,7 @@ /** * Saves (mostly asynchronously) user properties of accordions * @author Alexander Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilAccordionPropertiesStorageGUI implements ilCtrlBaseClassInterface { diff --git a/components/ILIAS/AdvancedEditing/AdvancedEditing.php b/components/ILIAS/AdvancedEditing/AdvancedEditing.php deleted file mode 100644 index 7d9a94e066ad..000000000000 --- a/components/ILIAS/AdvancedEditing/AdvancedEditing.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class ilObjAdvancedEditing extends ilObject -{ - public ilSetting $setting; - - public function __construct( - int $a_id = 0, - bool $a_call_by_reference = true - ) { - global $DIC; - - $this->lng = $DIC->language(); - $this->setting = new ilSetting("advanced_editing"); - $this->type = "adve"; - parent::__construct($a_id, $a_call_by_reference); - } - - /** - * Returns an array of all allowed HTML tags for text editing - * @param string $a_module Name of the module or object which uses the tags - * @return array HTML tags - */ - public static function _getUsedHTMLTags(string $a_module = ""): array - { - $setting = new ilSetting("advanced_editing"); - $tags = $setting->get("advanced_editing_used_html_tags_" . $a_module, ''); - if ($tags !== '') { - $usedtags = unserialize($tags, ["allowed_classes" => false]); - } elseif ($a_module === 'frm_post' || $a_module === 'exc_ass') { - $usedtags = array( - "a", - "blockquote", - "br", - "code", - "div", - "em", - "img", - "li", - "ol", - "p", - "strong", - "u", - "ul", - "span" - ); - } else { - // default: everything but tables - $usedtags = array( - "a", - "blockquote", - "br", - "cite", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "img", - "li", - "ol", - "p", - "pre", - "span", - "strike", - "strong", - "sub", - "sup", - "u", - "ul" - ); - } - - // frm_posts need blockquote and div urgently - if ($a_module === 'frm_post') { - if (!in_array('div', $usedtags, true)) { - $usedtags[] = 'div'; - } - - if (!in_array('blockquote', $usedtags, true)) { - $usedtags[] = 'blockquote'; - } - } - - return $usedtags; - } - - /** - * Returns a string of all allowed HTML tags for text editing - * @param string $a_module Name of the module or object which uses the tags - * @return string Used HTML tags - */ - public static function _getUsedHTMLTagsAsString(string $a_module = ""): string - { - $result = ""; - $tags = self::_getUsedHTMLTags($a_module); - foreach ($tags as $tag) { - $result .= "<$tag>"; - } - return $result; - } - - /** - * Returns the identifier for the Rich Text Editor - * @return string Identifier for the Rich Text Editor - */ - public static function _getRichTextEditor(): string - { - return (new ilSetting("advanced_editing"))->get("advanced_editing_javascript_editor", "0"); - } - - public function setRichTextEditor(string $a_js_editor): void - { - $setting = new ilSetting("advanced_editing"); - $setting->set("advanced_editing_javascript_editor", $a_js_editor); - } - - /** - * Writes an array with allowed HTML tags to the ILIAS settings - * @param array $a_html_tags An array containing the allowed HTML tags - * @param string $a_module The name of the module or object which uses the tags - * @throws ilAdvancedEditingRequiredTagsException - */ - public function setUsedHTMLTags( - array $a_html_tags, - string $a_module - ): void { - $lng = $this->lng; - - if ($a_module !== '') { - $auto_added_tags = array(); - - // frm_posts need blockquote and div urgently - if ($a_module === 'frm_post') { - if (!in_array('div', $a_html_tags, true)) { - $auto_added_tags[] = 'div'; - } - - if (!in_array('blockquote', $a_html_tags, true)) { - $auto_added_tags[] = 'blockquote'; - } - } - - $setting = new ilSetting("advanced_editing"); - $setting->set("advanced_editing_used_html_tags_" . $a_module, serialize(array_merge($a_html_tags, $auto_added_tags))); - - if (count($auto_added_tags)) { - throw new ilAdvancedEditingRequiredTagsException( - sprintf( - $lng->txt('advanced_editing_required_tags'), - implode(', ', $auto_added_tags) - ) - ); - } - } - } - - /** - * Returns an array of all possible HTML tags for text editing - * @return array HTML tags - */ - public function &getHTMLTags(): array - { - $tags = array( - "a", - "blockquote", - "br", - "cite", - "code", - "dd", - "div", - "dl", - "dt", - "em", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "img", - "li", - "object", - "ol", - "p", - "param", - "pre", - "span", - "strike", - "strong", - "sub", - "sup", - "table", - "td", - "tr", - "u", - "ul", - "ruby", // Ruby Annotation XHTML module - "rbc", - "rtc", - "rb", - "rt", - "rp" - ); - return $tags; - } - - /** - * Returns an array of all possible HTML tags for text editing - * @return array HTML tags - */ - public static function _getAllHTMLTags(): array - { - return array( - "a", - "abbr", - "acronym", - "address", - "applet", - "area", - "b", - "base", - "basefont", - "bdo", - "big", - "blockquote", - "br", - "button", - "caption", - "center", - "cite", - "code", - "col", - "colgroup", - "dd", - "del", - "dfn", - "dir", - "div", - "dl", - "dt", - "em", - "fieldset", - "font", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "hr", - "i", - "iframe", - "img", - "input", - "ins", - "isindex", - "kbd", - "label", - "legend", - "li", - "link", - "map", - "menu", - "object", - "ol", - "optgroup", - "option", - "p", - "param", - "pre", - "q", - "s", - "samp", - "select", - "small", - "span", - "strike", - "strong", - "sub", - "sup", - "table", - "tbody", - "td", - "textarea", - "tfoot", - "th", - "thead", - "tr", - "tt", - "u", - "ul", - "var", - "ruby", // Ruby Annotation XHTML module - "rbc", - "rtc", - "rb", - "rt", - "rp" - ); - } - - /** - * Sets the state of the rich text editor visibility for the current user - */ - public static function _setRichTextEditorUserState(int $a_state): void - { - global $DIC; - - $ilUser = $DIC->user(); - $ilUser->writePref("show_rte", (string) $a_state); - } - - /** - * Gets the state of the rich text editor visibility for the current user - * @return int 0 if the RTE should be disabled, 1 otherwise - */ - public static function _getRichTextEditorUserState(): int - { - global $DIC; - - $ilUser = $DIC->user(); - if ($ilUser->getPref("show_rte") != '') { - return (int) $ilUser->getPref("show_rte"); - } - return 1; - } -} diff --git a/components/ILIAS/AdvancedEditing/maintenance.json b/components/ILIAS/AdvancedEditing/maintenance.json deleted file mode 100755 index f352c1dd479b..000000000000 --- a/components/ILIAS/AdvancedEditing/maintenance.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "", - "second_maintainer": "", - "implicit_maintainers": [ - "akill(149)" - ], - "coordinator": [ - "" - ], - "tester": "", - "testcase_writer": "", - "path": "Services/AdvancedEditing", - "belong_to_component": "None", - "used_in_components": [] -} \ No newline at end of file diff --git a/components/ILIAS/AdvancedEditing/service.xml b/components/ILIAS/AdvancedEditing/service.xml deleted file mode 100755 index eef808e0565f..000000000000 --- a/components/ILIAS/AdvancedEditing/service.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - adm - - - diff --git a/components/ILIAS/AdvancedEditing/tests/AdveStandardGUIRequestTest.php b/components/ILIAS/AdvancedEditing/tests/AdveStandardGUIRequestTest.php deleted file mode 100755 index 1fb28b4daf8a..000000000000 --- a/components/ILIAS/AdvancedEditing/tests/AdveStandardGUIRequestTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class AdveStandardGUIRequestTest extends TestCase -{ - protected function tearDown(): void - { - } - - protected function getRequest(array $get, array $post): \ILIAS\AdvancedEditing\StandardGUIRequest - { - $http_mock = $this->createMock(ILIAS\HTTP\Services::class); - $lng_mock = $this->createMock(ilLanguage::class); - $data = new \ILIAS\Data\Factory(); - $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock); - return new \ILIAS\AdvancedEditing\StandardGUIRequest( - $http_mock, - $refinery, - $get, - $post - ); - } - - /** - * Test group - */ - public function testGroup(): void - { - $request = $this->getRequest( - [ - "grp" => "5" - ], - [] - ); - - $this->assertEquals( - "5", - $request->getGroup() - ); - } -} diff --git a/components/ILIAS/AssessmentQuestion/AssessmentQuestion.php b/components/ILIAS/AssessmentQuestion/AssessmentQuestion.php deleted file mode 100644 index 9008dcf64f1c..000000000000 --- a/components/ILIAS/AssessmentQuestion/AssessmentQuestion.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @package components/ILIAS/AssessmentQuestion - */ -class ilAsqFactory -{ - /** - * @return ilAsqService - */ - public function service(): ilAsqService - { - return new ilAsqService(); - } - - /** - * @param integer $parentObjectId - * @return array - */ - public function getQuestionDataArray($parentObjectId): array - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - /* @var ilComponentRepository $component_repository */ - $component_repository = $DIC['component.repository']; - - $list = new ilAssQuestionList($DIC->database(), $DIC->language(), $DIC->refinery(), $component_repository); - $list->setParentObjIdsFilter([$parentObjectId]); - $list->load(); - - return $list->getQuestionDataArray(); // returns an array of arrays containing the question data - - /** - * TBD: Should we return an iterator with ilAsqQuestion instances? - * Issue: ilTable(2) does not support this kind object structure. - */ - } - - /** - * @param integer $parentObjectId - * @return ilAsqQuestion[] - */ - public function getQuestionInstances($parentObjectId): array - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - /* @var ilComponentRepository $component_repository */ - $component_repository = $DIC['component.repository']; - - $list = new ilAssQuestionList($DIC->database(), $DIC->language(), $DIC->refinery(), $component_repository); - $list->setParentObjIdsFilter(array($parentObjectId)); - $list->load(); - - $questionInstances = array(); - - foreach ($list->getQuestionDataArray() as $questionId => $questionData) { - $questionInstances[] = $this->getQuestionInstance($questionId); - } - - return $questionInstances; - } - - /** - * @param ilAsqQuestion $questionInstance - * @return ilAsqQuestionAuthoring - */ - public function getAuthoringCommandInstance($questionInstance): ilAsqQuestionAuthoring - { - $authoringGUI; /* @var ilAsqQuestionAuthoring $authoringGUI */ - - /** - * initialise $authoringGUI as an instance of the question type corresponding authoring class - * that implements ilAsqQuestionAuthoring depending on the given $questionInstance - */ - - $authoringGUI->setQuestion($questionInstance); - - return $authoringGUI; - } - - /** - * render purpose constants that are required to get corresponding presentation renderer - */ - public const RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'; // e.g. Test Player - public const RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'; // e.g. Page Editing View in Test - public const RENDER_PURPOSE_PREVIEW = 'renderPurposePreview'; // e.g. Preview Player - public const RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'; // When used for PDF rendering - public const RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'; // When used as RTE Input Content - - /** - * @param ilAsqQuestion $questionInstance - * @return ilAsqQuestionPresentation - */ - public function getQuestionPresentationInstance($questionInstance, $renderPurpose): ilAsqQuestionPresentation - { - $presentationGUI; /* @var ilAsqQuestionPresentation $presentationGUI */ - - /** - * initialise $presentationGUI as an instance of the question type corresponding presentation class - * that implements ilAsqQuestionPresentation depending on the given $questionInstance - * and depending on the given render purpose. - */ - - $presentationGUI->setQuestion($questionInstance); - - return $presentationGUI; - } - - /** - * @param integer $questionId - * @return ilAsqQuestion - */ - public function getQuestionInstance($questionId): ilAsqQuestion - { - $questionInstance; /* @var ilAsqQuestion $questionInstance */ - - /** - * initialise $questionInstance as an instance of the question type corresponding object class - * that implements ilAsqQuestion depending on the given $questionId - */ - - $questionInstance->setId($questionId); - $questionInstance->load(); - - return $questionInstance; - } - - /** - * @param string $questionId - * @return ilAsqQuestion - */ - public function getEmptyQuestionInstance($questionType): ilAsqQuestion - { - $questionInstance; /* @var ilAsqQuestion $questionInstance */ - - /** - * initialise $questionInstance as an instance of the question type corresponding object class - * that implements ilAsqQuestion depending on the given $questionType - */ - - return $questionInstance; - } - - /** - * @param integer $questionId - * @return ilAsqQuestion - */ - public function getOfflineExportableQuestionInstance($questionId, $a_image_path = null, $a_output_mode = 'presentation'): ilAsqQuestion - { - $questionInstance; /* @var ilAsqQuestion $questionInstance */ - - /** - * initialise $questionInstance as an instance of the question type corresponding object class - * that implements ilAsqQuestion depending on the given $questionId - */ - - $questionInstance->setId($questionId); - $questionInstance->load(); - - $questionInstance->setOfflineExportImagePath($a_image_path); - $questionInstance->setOfflineExportPagePresentationMode($a_output_mode); - - return $questionInstance; - } - - /** - * @param ilAsqQuestion $offlineExportableQuestionInstance - * @return ilAsqQuestionOfflinePresentationExporter - */ - public function getQuestionOfflinePresentationExporter(ilAsqQuestion $offlineExportableQuestionInstance) - { - $qstOffPresentationExporter; /* @var ilAsqQuestionOfflinePresentationExporter $qstOffPresentationExporter */ - - /** - * initialise $qstOffPresentationExporter as an instance of the question type corresponding - * object class that implements ilAsqQuestionOfflinePresentationExporter - * depending on the given $offlineExportableQuestionInstance - */ - - $qstOffPresentationExporter->setQuestion($offlineExportableQuestionInstance); - - return $qstOffPresentationExporter; - } - - /** - * @return ilAsqQuestionResourcesCollector - */ - public function getQuestionResourcesCollector() - { - /** - * this collector is able to manage all kind resources that aredepencies - * for the offline presentation of a question (like js/css, media files, mobs). - */ - - return new ilAsqQuestionResourcesCollector(); - } - - /** - * @param integer $questionId - * @param integer $solutionId - * @return ilAsqQuestionSolution - */ - public function getQuestionSolutionInstance($questionId, $solutionId): ilAsqQuestionSolution - { - $questionSolutionInstance; /* @var ilAsqQuestionSolution $questionSolutionInstance */ - - /** - * initialise $questionSolutionInstance as an instance of the question type corresponding object class - * that implements ilAsqQuestionSolution depending on the given $questionId and $solutionId - */ - $questionSolutionInstance->setQuestionId($questionId); - $questionSolutionInstance->setSolutionId($solutionId); - $questionSolutionInstance->load(); - - return $questionSolutionInstance; - } - - /** - * @param integer $questionId - * @return ilAsqQuestionSolution - */ - public function getEmptyQuestionSolutionInstance($questionId): ilAsqQuestionSolution - { - $emptySolutionInstance; /* @var ilAsqQuestionSolution $questionSolutionInstance */ - - /** - * initialise $emptySolutionInstance as an instance of the question type corresponding object class - * that implements ilAsqQuestionSolution depending on the given $questionId - */ - - $emptySolutionInstance->setQuestionId($questionId); - - return $emptySolutionInstance; - } - - /** - * @param ilAsqQuestion $questionInstance - * @param ilAsqQuestionSolution $solutionInstance - * @return ilAsqResultCalculator - */ - public function getResultCalculator(ilAsqQuestion $questionInstance, ilAsqQuestionSolution $solutionInstance): ilAsqResultCalculator - { - $resultCalculator; /* @var ilAsqResultCalculator $resultCalculator */ - - /** - * initialise $resultCalculator as an instance of the question type corresponding object class - * that implements ilAsqResultCalculator depending on the given $questionInstance and $solutionInstance - */ - - $resultCalculator->setQuestion($questionInstance); - $resultCalculator->setSolution($solutionInstance); - - return $resultCalculator; - } -} diff --git a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResourcesCollector.php b/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResourcesCollector.php deleted file mode 100755 index e6b27b6dbbb0..000000000000 --- a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResourcesCollector.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -class ilAsqQuestionResourcesCollector -{ - /** - * @var array - */ - protected $mobs = array(); - - /** - * @var array - */ - protected $mediaFiles = array(); - - /** - * @var array - */ - protected $jsFiles = array(); - - /** - * @var array - */ - protected $cssFiles = array(); - - /** - * @return array - */ - public function getMobs(): array - { - return $this->mobs; - } - - /** - * @param string $mob - */ - public function addMob(string $mob) - { - $this->mobs[] = $mob; - } - - /** - * @return array - */ - public function getMediaFiles(): array - { - return $this->mediaFiles; - } - - /** - * @param string $mediaFile - */ - public function addMediaFile(string $mediaFile) - { - $this->mediaFiles[] = $mediaFile; - } - - /** - * @return array - */ - public function getJsFiles(): array - { - return $this->jsFiles; - } - - /** - * @param string $jsFiles - */ - public function addJsFile(string $jsFile) - { - $this->jsFiles[] = $jsFile; - } - - /** - * @return array - */ - public function getCssFiles(): array - { - return $this->cssFiles; - } - - /** - * @param string $cssFiles - */ - public function setCssFile(string $cssFile) - { - $this->cssFiles[] = $cssFile; - } -} diff --git a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResult.php b/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResult.php deleted file mode 100755 index 44b9b67ceccb..000000000000 --- a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqQuestionResult.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -class ilAsqQuestionResult -{ - /** - * @var float - */ - protected $points; - - /** - * @var bool - */ - protected $correct; - - /** - * @param float $points - */ - public function setPoints(float $points) - { - $this->points = $points; - } - - /** - * @return float - */ - public function getPoints(): float - { - return $this->points; - } - - /** - * @param bool $correct - */ - public function setCorrect(bool $correct) - { - $this->correct = $correct; - } - - /** - * @return bool - */ - public function isCorrect(): bool - { - return $this->correct; - } -} diff --git a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqService.php b/components/ILIAS/AssessmentQuestion/classes/class.ilAsqService.php deleted file mode 100755 index 262cbf7ac2a9..000000000000 --- a/components/ILIAS/AssessmentQuestion/classes/class.ilAsqService.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -class ilAsqService -{ - /** - * @param ilCtrl $ctrl - * @return string - */ - public function fetchNextAuthoringCommandClass($nextClass): string - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $row = $DIC->database()->fetchAssoc($DIC->database()->queryF( - "SELECT COUNT(question_type_id) cnt FROM qpl_qst_type WHERE ctrl_class = %s", - array('text'), - array($nextClass) - )); - - if ($row['cnt']) { - // current next class is indeed an authoring ctrl class, - // return it to have the switch(nextclass) case matching - return $nextClass; - } - - // the interface that NOT represents a valid ctrl class, - // this will lead to a non matching switch(nextclass) case - return 'ilasqquestionauthoring'; - } - - /** - * @param ilQTIItem $qtiItem - * @return string - */ - public function determineQuestionTypeByQtiItem(ilQTIItem $qtiItem): string - { - // the qti service parses ILIAS question types, so use it - // although this may get changed in the future - return $qtiItem->getQuestiontype(); - } - - /** - * @param integer $parentObjectId - * @param string $questionTitle - * @return bool - */ - public function questionTitleExists($parentObjectId, $questionTitle): bool - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $row = $DIC->database()->fetchAssoc($DIC->database()->queryF( - "SELECT COUNT(question_id) cnt FROM qpl_questions WHERE obj_fi = %s AND title = %s", - array('integer', 'text'), - array($parentObjectId, $questionTitle) - )); - - return $row['cnt'] > 0; - } -} diff --git a/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionExporter.php b/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionExporter.php deleted file mode 100755 index d61d3b5ec868..000000000000 --- a/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionExporter.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -class ilAssessmentQuestionExporter extends ilXmlExporter -{ - public function getValidSchemaVersions(string $a_entity): array - { - /* export schema versions code */ - } - - public function init(): void - { - /* assessment question init code */ - } - - /** - * @param string $a_entity - * @param string $a_schema_version - * @param string $a_id - */ - public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string - { - /** - * the assessment question export does simply get the id an returns - * the qti xml representation of the question. - */ - - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $questionInstance = $DIC->question()->getQuestionInstance($a_id); - - return $questionInstance->toQtiXML(); - } -} diff --git a/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionImporter.php b/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionImporter.php deleted file mode 100755 index 8f10380ef62f..000000000000 --- a/components/ILIAS/AssessmentQuestion/classes/class.ilAssessmentQuestionImporter.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @version $Id$ - * - * @package components\ILIAS/Test(QuestionPool) - */ -class ilAssessmentQuestionImporter extends ilXmlImporter -{ - /** - * @param string $a_entity - * @param string $a_id - * @param string $a_xml - * @param ilImportMapping $a_mapping - */ - public function importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping): void - { - // TODO: Implement importXmlRepresentation() method. - } -} diff --git a/components/ILIAS/AssessmentQuestion/docs/readme.md b/components/ILIAS/AssessmentQuestion/docs/readme.md deleted file mode 100755 index 7c449d823ed0..000000000000 --- a/components/ILIAS/AssessmentQuestion/docs/readme.md +++ /dev/null @@ -1,129 +0,0 @@ -# History - -Assessment questions were once embeded in a large component called Test and Assessment. The Test Question Pool object and the Test object of ILIAS were not strictly separated and the assessment question integration was done within both components. This lead to a strong depency between the Test and the Test Question Pool object in the past. The codebase for the two modules was fully mixed up with the code for the questions. - -Today, this failure in architecture got fixed by fully separating the components and by extracting a new service AssessmentQuestion. - -Furthermore the database got decoupled since the supposed separation in two different table spaces within the former Test and Assessment component did not reflect a neccessary strict distinction. All information in the database about the assessment questions were migrated to the new table space of the AssessmentQuestion service. - -# Introduction - -This documentation describes the interfaces the AssessmentQuestion service comes with and how they are to be used by developers who want to integrate assessment questions to their components. - -The AssessmentQuestion service is designed as a component that offers complex functionality for consumers. The way other components can integrate assessment questions keeps as most flexible as possible. This means, that most of any business logic around assessment questions needs to be implemented in the consumer's code. - -The AssessmentQuestion service itself does not contain any complex logic about the handling of assessment items. This is reflected in the simple interface structure. - -The implementation of authoring processes is the only complex part. But this implementation can be easily adressed from consumers by simply forwarding to corresponding control structure classes. - -# Service Interfaces - -The AssessmentQuestion service has the following interfaces that can be used by other developers that want to integrate assessment questions to their component. - -Objects implementing `ilAsqQuestion` represents the question entity itself while objects implementing `ilAsqQuestionAuthoring` are about the authoring that can be integrated with the `executeCommand` control structure of ILIAS. - -The interface `ilAsqPresentation` provides all functionality to output a question and its additional contents. Solutions get injected to keep the presentation as modular as possible. - -The interface `ilAsqResultCalculator` provides all functionality of calculating right/wrong for a given solution as well as reached points. Having this functionality in an own object implementing this interface makes it possible for consumers to surround this kind calculators with an own proxy calculator implementing the same interface (e.g. for any score cutting options). - -The handling of solutions is defined by the interface `ilAsqQuestionSolution` so the future implementation is fully getting rid of dealing with solution values stored in row array structures that were queried from the database. - -When calculating results for an `ilAsqQuestionSolution` using the `ilAsqResultCalculator` an instance of `ilAsqQuestionResult` is returned that provides reached points as well as the state of right/wrong with corresponding getters. - -The implementation for the offline presentation of assessment questions is currently separated from the regular presentation, because it acts fully different. Therefore an `ilAsqQuestionOfflinePresentationExporter` is available, that handles the neccessary javascripts as well as collecting the required question resources (media files, mobs, additional js/css). For collecting the question resources an `ilAsqQuestionResourcesCollector` is provided by the `ilAsqFactory` that is able to collect the depencies for multiple questions at once - -# Consumer Interface - -Consumers need to implement the interface `ilAsqQuestionNavigationAware` with any object that they need to inject to any question type's presentation object. This way the question presentation gets the neccessary link used by the question presentation for any self round trip (e.g fileupload, imagemap select). - -Additionally the consuming component has an opportunity to provide any command link either as a button (like the well known check button) rendered within the question canvas or as an entry in an question actions menu (e.g. discard or postpone solution). - -# Service Factory - -For any use case other developers need to handle within their component when integrating the assessment questions, the `ilAsqFactoy` provides neccessary factory methods. Since the different interfaces of the assessment questions need to be used together, this factory is to be used in the consuming components multiple times. - -The factory is integrated into the global DIC. Use `$DIC->question()` to get an instance of ilAsqFactory. - -# Export / Import - -The assessment question service has two classes for the export and import. For the export `ilAssessmentQuestionExporter` extends `ilXmlExporter` and for the import `ilAssessmentQuestionImporter` extends `ilXmlImporter`. With these classes the assessment questions docks to the common export/import structure of ILIAS. - -Consumers of the assessment question service can declare questions as a tail depency within their `ilExporter` class. The export architecture of ILIAS will address the assessment question service and imports the questions. Consumers also need to finally process question id mappings within their `ilImporter` class. - -When consumers want to export the assessment questions as a single QTI xml file, they can simply use `ilAsqQuestion::toQTIXml()` interface methods. It is to be used for each question that needs to get exported. An overall QTI xml file can be created by simply concatinating the xml pieces got from the question instance. - -For importing assessment questions from any single QTI xml file, the QTI service is to be used to retieve a list of `QTIitem` instances. These items can be provided to an empty `ilAsqQuestion` instance to save the question to the database. - -# Service Class - -There are three requirements up to now that cannot be handled by any concrete and question type specific implementation of any assessment question interfaces. Therefore the `ilAsqService` class provides a container for methods handling this requirements. An instance of the service class can be requested using `$DIC->question()->service()`. - -* When integrating questions to any component for authoring purposes, a forwarding needs to be implemented in the component's `executeCommand()` method. To check wether any concrete question type authoring implementation is indeed the current next class in the control flow, a suitable method is provided in the `ilAsqService` class. -* Due to the use of the QTI service during imports of QTI xmls a determination of the question type based on the QTI item is required, because an empty object instance needs to be requested. Currently the question type is provided by the QTI item, but this may get changed in the future. `ilAsqService` provides a suitable method for this purpose. -* When question managing components need to copy questions within the same consumer instance a method is required to check for existing question titles. `ilAsqService` provides this message. - -# Usage of the Service - -## Authoring Consume - -Usage examples can be viewed within the file: -* components/ILIAS/AssessmentQuestion/examples/class.exObjQuestionPoolGUI.php -* components/ILIAS/AssessmentQuestion/examples/class.exQuestionsTableGUI.php -* components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolExporter.php - -## Presentation Consume - -Usage examples can be viewed within the file: -* components/ILIAS/AssessmentQuestion/examples/class.exTestPlayerGUI.php - -## Offline Export Consume - -Usage examples can be viewed within the file: -* components/ILIAS/AssessmentQuestion/examples/class.exPageContentQuestions.php - -# Decoupled Database - -Die eigentliche, notwendige Entkopplung findet in diesem Schritten statt: Verletzt der Zugriff auf Daten die geplanten Zuständigkeiten so werden diese bereinigt. Konsumenten sollen lediglich IDs von Fragen und Lösungen kennen und diese in eigener Zuständigkeit Ergebnissen zuordnen. Fragen und Lösungen benötigen keine Informationen der Konsumenten mehr. - -* Portierung der Lösungsdatenbank des Test-Objekts in den Fragenservice - * Umbenennung der tst_solutions Tabelle in asq_solution_values - * Diese Tabelle speichert weiterhin nach dem Key/Value Prinzip die Lösungsinformationen - * Zu einer Lösung gehören beliebig viele Datensätze - * Ergänzung einer Tabelle asq_solutions - * Diese Tabelle verwaltet je Teilnehmerlösung eine neue Lösungs-ID - * Die Lösungs-ID wird in asq_solution_values verwendet - * Konsumenten können die Lösungs-ID in Ergebnisdaten verwenden - * Eigentliche Entkopplung durch Umstrukturieren der IDs und Referenzen - * Die Tabelle tst_test_result wird mit einer neuen Spalte für die Lösungs-ID aktualisiert -* Abstraktion einer neuen Objektschicht zur Repräsentierung von eingereichten Lösungen - * Eine ilAsqQuestionSolution Objektinstanz repräsentiert eine Zeile in asq_solutions - * Ein ilAsqQuestionSolutionValue Objekt repräsentiert eine Zeile in asq_solution_values -* Refactoring der bestehenden Fragenklassen durch Einbindung der Lösungsobjekte - * Entfernen aller Parameter Übergaben betreffend Teilnehmer ID und Testdurchlauf - * Umstellung aller betroffenen Methoden auf Verwendung eines Ersatzparameters vom Typ ilAsqQuestionSolution -* Abstraktion einer neuen Objektschicht zur Repräsentierung von Test Results - * Eine Objekt Instanz vom Typ ilTestResult gewährt Zugriff auf ein Ergebnis eines Teilnehmers zu einer Frage - * Gleichzeitig wird über ilTestResult eine zugehörige Lösungs ID verwaltet - * Das Handling von Fragen im Test Player wird umgestellt - * Für die Anzeige einer Frage mit Lösung wird über ilTestResult die zugehörige ilAsqQuestionSolution und bestückt die GUI Klasse der Frage damit - * Rückwärts wird weiterhin die Fragen GUI die vom Teilnehmer übertragene Lösung aus den POST Parametern auslesen, dann aber eigenständig über ilAsqQuestionSolution abspeichern - * Die dabei verwendete Lösungs ID wird dem Player zur Erstellung/Aktualisierung eines Ergebnis mittels ilTestResult zurückgereicht - -# Open Questions - -* Should ilTable(2) be changed to support the Assessment Question service? - * ilTable(2) does not support list iterators - * ilTable(2) does not support row objects - -# Remaining Issues - -* The current implemenation for an offline export of questions (question presentation that acts client side) and the regular presentation implementation for questions using the solution backend of the assessment question service needs to be merged in the future - -# Future Requirements - -The following known requirements that will probably come up with the next releases of ILIAS are not completely considered in the current concept of an Assessment Question Service. But extending the current concept accordingly will be possible to integrate these visions. - -* Versioning for Assessment Questions -* Lifecycle for Assessment Questions -* Item Statistic for Assessment Questions -* Offline Rendering for Assessment Questions diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exObjQuestionPoolGUI.php b/components/ILIAS/AssessmentQuestion/examples/class.exObjQuestionPoolGUI.php deleted file mode 100755 index d00b79760774..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exObjQuestionPoolGUI.php +++ /dev/null @@ -1,152 +0,0 @@ -question()->service(). - */ - public function executeCommand() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - switch ($DIC->ctrl()->getNextClass($this)) { - case $DIC->question()->service()->fetchNextAuthoringCommandClass($DIC->ctrl()->getNextClass()): - - $questionId = 0; // Fetch questionId from Request Parameters - $backLink = ''; // Initialise with Back Link to Consumers Back-Landing Page - - $questionInstance = $DIC->question()->getQuestionInstance($questionId); - $questionAuthoringGUI = $DIC->question()->getAuthoringCommandInstance($questionInstance); - - $questionAuthoringGUI->setBackLink($backLink); - - $DIC->ctrl()->forwardCommand($questionAuthoringGUI); - } - } - - /** - * For question listings the ilAsqQuestionFactory provides a factory method to retrieve - * an array of associative question data arrays. This structure can be simply used as - * data structure for any ilTable2 implementation. - */ - public function showQuestions() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $parentObjectId = 0; // init with question pool object id - - $questionDataArray = $DIC->question()->getQuestionDataArray($parentObjectId); - - /** - * initialise any ilTable2GUI with this data array - * render initialised ilTable2GUI - */ - - $tableGUI = new exQuestionsTableGUI($this, 'showQuestions', ''); - $tableGUI->setData($questionDataArray); - - $tableHTML = $tableGUI->getHTML(); // render table - } - - /** - * When a component provides import functionality for assessment questions, it needs to make use of the - * ILIAS QTI service to get any qti xml parsed to an QTI object graph provided by the QTI service. - * - * To actually import the question as an assessment question the ilAsqQuestion interface method - * fromQtiItem can be used. To retrieve an empty ilAsqQuestion instance, the question type of the - * QtiItem needs to be determined. - * - * For the question type determination the ilAsqService class provides a corresponding method. - * An instance of the service class can be requested using $DIC->question()->service(). - */ - public function importQuestions() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $parentObjectId = 0; // init with question pool object id - - /** - * parse any qti import xml using the QTI Service and retrieve - * an array containing ilQTIItem instances - */ - $qtiItems = array(); /* @var ilQTIItem[] $qtiItems */ - - foreach ($qtiItems as $qtiItem) { - $questionType = $DIC->question()->service()->determineQuestionTypeByQtiItem($qtiItem); - $questionInstance = $DIC->question()->getEmptyQuestionInstance($questionType); - - $questionInstance->fromQtiItem($qtiItem); - $questionInstance->setParentId($parentObjectId); - $questionInstance->save(); - } - } - - /** - * When a component provides export functionality for assessment questions, it needs the ilAsqQuestion - * interface method toQtiXML to retrieve an qti item xml string. Since the QTI service does not support - * to fetch an QTI xml string based on an QTI object graph, the current implementation of returning - * the xml string itself will be kept within the toQtiXML interface method. - * - * To export one or more assessment questions the ilAsqFactory provides factory methods - * to get single or multiple ilAsqQuestion instances. - */ - public function exportQuestions() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $parentObjectId = 0; // init with question pool object id - - /** - * get questions managed by this parent object - */ - $questions = $DIC->question()->getQuestionInstances($parentObjectId); - - /** - * build QTI xml string that will be used for any kind of export - */ - - $qtiXML = ''; - - foreach ($questions as $questionInstance) { - $qtiXML .= $questionInstance->toQtiXML(); - } - } - - /** - * For the deletion of questions ilAsqQuestion provides the interface method deleteQuestion. - * The ilAsqFactory is to be used to get the ilAsqQuestion instance for any given questionId. - * A simple call to deleteQuestion deletes the question and all its data. - */ - public function deleteQuestion() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $questionId = 0; // init from GET parameters - - /** - * use the ilAsqFactory to get an ilAsqQuestion instance - * that supports the deletion process - */ - - $questionInstance = $DIC->question()->getQuestionInstance($questionId); - $questionInstance->delete(); - } -} diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exPageContentQuestions.php b/components/ILIAS/AssessmentQuestion/examples/class.exPageContentQuestions.php deleted file mode 100755 index 97c741209760..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exPageContentQuestions.php +++ /dev/null @@ -1,103 +0,0 @@ -qstResourcesCollector = $DIC->question()->getQuestionResourcesCollector(); - } - - /** - * @param $a_no_interaction // enables a kind of preview mode - * @param $a_mode // currently required by content pages - * @return array an array with a htmloffline presentation per question - */ - public function getQuestionOfflinePresentations($a_no_interaction, $a_mode) - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $questionReferences = array(); // initialise with ids of all questions embedded in the content page - - $qstOfflinePresentations = array(); - - foreach ($questionReferences as $questionRef) { - /** - * the current integration of questions in e.g. the learning module - * stores question references containing the instId and the qstId - */ - - $questionId = ilInternalLink::_extractObjIdOfTarget($questionRef); - - /** - * the consumer of offline question presentation currently needs to control - * the path for question resources like media files or mobs - */ - - $image_path = null; - if ($a_mode == "offline") { - if ($anyObjParentType == "sahs") { - $image_path = "./objects/"; - } - if ($anyObjParentType == "lm") { - $image_path = "./assessment/0/" . $questionId . "/images/"; - } - } - - /** - * the actual rendering of the question depends on an ilAsqQuestionInstance - * that got correctly configured. therefore the question instance is build - * by a corresponding ilAsqFactory method - */ - - $questionInstance = $DIC->question()->getOfflineExportableQuestionInstance( - $questionId, - $image_path, - $a_mode - ); - - /** - * the exporter for the question offline presentation can be requested from the ilAsqFactory - */ - - $qstOfflinePresentationExporter = $DIC->question()->getQuestionOfflinePresentationExporter( - $questionInstance - ); - - /** - * the ilAsqQuestionOfflinePresentationExporter returns a renderable component. - * - * an instance of ilAsqQuestionResourcesCollector needs to be injected that - * collects all kind resources the consumer needs to organize for the offline presentation. - * (js/css files, media files, mobs) - */ - - $qstOfflinePresentations[$questionId] = $qstOfflinePresentationExporter->exportQuestion( - $this->qstResourcesCollector, - $a_no_interaction - ); - } - - return $qstOfflinePresentations; - } -} diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolExporter.php b/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolExporter.php deleted file mode 100755 index 18c9c8618467..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolExporter.php +++ /dev/null @@ -1,70 +0,0 @@ - 'components/ILIAS/AssessmentQuestion', - 'entity' => 'qst', - 'ids' => $questionIds - ); - } - - return $deps; - } - - return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids); - } -} diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolImporter.php b/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolImporter.php deleted file mode 100755 index 4bfa6f6c8558..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionPoolImporter.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @version $Id$ - * - * @package components\ILIAS/Test(QuestionPool) - */ -class exQuestionPoolImporter extends ilXmlImporter -{ - /** - * @param string $a_entity - * @param string $a_id - * @param string $a_xml - * @param ilImportMapping $a_mapping - */ - public function importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping): void - { - /** - * here consumers can regularly process their own import stuff. - * - * although the assessment questions are imported by declared tail depencies, - * any consumer component can import any overall qti xml file, that was added - * to the export by the consumer itself. - */ - } - - /** - * Final processing - * @param ilImportMapping $a_mapping - * @return void - */ - public function finalProcessing(ilImportMapping $a_mapping): void - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - $maps = $a_mapping->getMappingsOfEntity("components/ILIAS/TestQuestionPool", "qpl"); - - foreach ($maps as $old => $new) { - if ($old != "new_id" && (int) $old > 0) { - $newQstIds = $a_mapping->getMapping("components/ILIAS/AssessmentQuestion", "qst", $old); - - if ($newQstIds !== false) { - $qstIds = explode(":", $newQstIds); - foreach ($qstIds as $qId) { - $qstInstance = $DIC->question()->getQuestionInstance($qId); - $qstInstance->setParentId($new); - $qstInstance->save(); - } - } - - $qstMappings = $a_mapping->getMappingsOfEntity('components/ILIAS/AssessmentQuestion', 'qst'); - - foreach ($qstMappings as $oldQstId => $newQstId) { - // process all question ids within the consumer component database, - // look for the old qst id and map to the new qst id - } - } - } - } -} diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionsTableGUI.php b/components/ILIAS/AssessmentQuestion/examples/class.exQuestionsTableGUI.php deleted file mode 100755 index f37b839402d9..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exQuestionsTableGUI.php +++ /dev/null @@ -1,44 +0,0 @@ -tpl->setVariable('QUESTION_TITLE', $a_set['title']); - - /** - * use the questionId and the ilAsqFactory to get an ilAsqQuestionAuthoring instance - * that provides interface methods to get neccessary links related to the question - */ - - $questionInstance = $DIC->question()->getQuestionInstance($a_set['questionId']); - $questionAuthoringGUI = $DIC->question()->getAuthoringCommandInstance($questionInstance); - - $previewLinkComponent = $questionAuthoringGUI->getPreviewLink(); - - $this->tpl->setVariable('QUESTION_HREF', $previewLinkComponent->getAction()); - } -} diff --git a/components/ILIAS/AssessmentQuestion/examples/class.exTestPlayerGUI.php b/components/ILIAS/AssessmentQuestion/examples/class.exTestPlayerGUI.php deleted file mode 100755 index c8497af537b5..000000000000 --- a/components/ILIAS/AssessmentQuestion/examples/class.exTestPlayerGUI.php +++ /dev/null @@ -1,190 +0,0 @@ -getParticipantSolution($questionId); - - /** - * question presentation to be answered by the examine - */ - - $questionInstance = $DIC->question()->getQuestionInstance($questionId); - $questionPresentationGUI = $DIC->question()->getQuestionPresentationInstance($questionInstance); - - $questionNavigationAware; /* @var ilAsqQuestionNavigationAware $questionNavigationAware */ - $questionPresentationGUI->setQuestionNavigation($questionNavigationAware); - - $questionPresentationGUI->setRenderPurpose(ilAsqQuestionPresentation::RENDER_PURPOSE_PLAYBACK); - - if ($participantSolutionLocked = false) { - $renderer = $questionPresentationGUI->getSolutionPresentation($participantSolution); - } else { - $renderer = $questionPresentationGUI->getQuestionPresentation($participantSolution); - } - - $playerQstPageHTML = $renderer->getContent(); - - /** - * feedback presentation for the given - */ - - if ($showFeedbacks = true && !$participantSolution->isEmpty()) { - $genericFeedbackRenderer = $questionPresentationGUI->getGenericFeedbackOutput($participantSolution); - $playerQstPageHTML .= $genericFeedbackRenderer->getContent(); - - $specificFeedbackRenderer = $questionPresentationGUI->getSpecificFeedbackOutput($participantSolution); - $playerQstPageHTML .= $specificFeedbackRenderer->getContent(); - } - - /** - * best solution presentation to be answered by the examine - */ - - if ($showBestSolution = true) { - $renderer = $questionPresentationGUI->getSolutionPresentation( - $questionInstance->getBestSolution() - ); - - $playerQstPageHTML .= $renderer->getContent(); - } - - $playerQstPageHTML; // complete question page html - } - - /** - * With the presentation of an assessment question, this question also gets submitted having any solution - * filled out by any user. With the first presentation there should be no previous user response available. - * The consuming component needs to request an empty ilAsqSolution instance for the given questionId. - * - * The ilAsqSolution interface method initFromServerRequest is to be used to initialize the object instance - * with the user response. With the current concept the newly introduced \Psr\Http\Message\ServerRequestInterface - * needs to be injected to this method, but may simply passing $_POST could be an alternative. - * This depends on the future strategy of abstracting the http server request in ILIAS. - * - * After having this solution saved, the consuming component needs to register the now available solutionId - * together with the questionId and the userId. Additionally this ilAsqSolution instance can be used - * with a question corresponding ilAsqResultCalculator to retrieve the information about right/wrong - * (used for e.g. answer status in CTM's test sequence) and reached points (used as a future ilTestResult) - * to be stored as any result within the consuming component. - * - * After the first submission of any user response the consuming component needs to provide the corresponsing - * solutionId to request the existing ilAsqSolution instance from the ilAsqFactory for every additional submit. - * - * The way harvesting and handling solution data in short: - * - post submit gets parsed by ilAsqSolution - * - ilAsqResultCalculator calculates points and right/wrong - * - the test object can use these information for different purposes - * - points can be saved as an ilTestResult referenced by the questionId and the participantId - * - right/wrong can be used for determining the correct feedbacks for the feedback loop - * - right/wrong can be used as the answer status within the CTM test sequence - */ - public function submitSolution() - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - // this can also be $_REQUEST or any other future ilias post-request handler - $serverRequestObject; /* @var \Psr\Http\Message\ServerRequestInterface $serverRequestObject */ - - $questionId = 0; // initialise with id of question that just submits - - /** - * fetch possibly existing participant solution, an empty one is required otherwise - */ - - $participantSolution = $this->getParticipantSolution($questionId); - - /** - * let the solution object instance harvest the submission post data - */ - - $participantSolution->initFromServerRequest($serverRequestObject); - - /** - * get results calculator to be used to retrieve calculated reached points - * that can be stored in a test result storage managed by the test object - */ - - $questionInstance = $DIC->question()->getQuestionInstance($questionId); - $solutionInstance = $this->getParticipantSolution($questionId); - $resultCalculator = $DIC->question()->getResultCalculator($questionInstance, $solutionInstance); - - $resultInstance = $resultCalculator->calculate(); - - /** - * handle the calculated result in any kind - */ - - // can be stored in any ilTestResult object managed by the test - $reachedPoints = $resultInstance->getPoints(); - - // can be used to differ answer status in CTM's test sequence - $isCorrect = $resultInstance->isCorrect(); - } - - /** - * this method returns either an initialised solution object instance, or and empty one, - * depending on self managed test results (handled by a future ilTestResult) - * - * @param integer $questionId - * @return ilAsqQuestionSolution - */ - public function getParticipantSolution($questionId) - { - global $DIC; /* @var ILIAS\DI\Container $DIC */ - - /** - * when the test has any test result based on an existing participant solution, - * the solution id needs to be looked up. an empty solution is returned otherwise. - */ - - $solutionId = 0; - - if ($solutionId) { - return $DIC->question()->getQuestionSolutionInstance($questionId, $solutionId); - } - - return $DIC->question()->getEmptyQuestionSolutionInstance($questionId); - } -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestion.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestion.php deleted file mode 100755 index 9f9f94fe20b2..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestion.php +++ /dev/null @@ -1,124 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestion -{ - /** - * @param $parentId - */ - public function setParentId($parentId); - - /** - * @return int - */ - public function getParentId(): int; - - /** - * @param int $questionId - */ - public function setId($questionId); - - /** - * @return int - */ - public function getId(): int; - - /** - * @return string - */ - public function getTitle(): string; - - /** - * @return string - */ - public function getComment(): string; - - /** - * @return int - */ - public function getOwner(): int; - - /** - * @return string - */ - public function getQuestionType(): string; - - /** - * @return string - */ - public function getQuestionText(): string; - - /** - * @return float - */ - public function getPoints(): float; - - /** - * @return string - */ - public function getEstimatedWorkingTime(): string; - - /** - * Loads question data - */ - public function load(); - - /** - * Save question data - */ - public function save(); - - /** - * Delete question - */ - public function delete(); - - /** - * @param ilQTIItem $qtiItem - */ - public function fromQtiItem(ilQTIItem $qtiItem); - - /** - * @return string - */ - public function toQtiXML(): string; - - /** - * @return bool - */ - public function isComplete(): bool; - - /** - * @return ilAsqQuestionSolution - */ - public function getBestSolution(): ilAsqQuestionSolution; - - /** - * @return \ILIAS\UI\Component\Component - */ - public function getSuggestedSolutionOutput(): \ILIAS\UI\Component\Component; - - /** - * @return string - */ - public function toJSON(): string; - - /** - * @param string $offlineExportImagePath - */ - public function setOfflineExportImagePath($offlineExportImagePath = null); - - /** - * @param string $offlineExportPagePresentationMode - */ - public function setOfflineExportPagePresentationMode($offlineExportPagePresentationMode = 'presentation'); -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionAuthoring.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionAuthoring.php deleted file mode 100755 index 551cc0511e68..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionAuthoring.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestionAuthoring -{ - /** - * Execute Command - */ - public function executeCommand(); - - /** - * @param ilAsqQuestion $question - */ - public function setQuestion(ilAsqQuestion $question); - - /** - * @param ilQuestionChangeListener $listener - */ - public function addQuestionChangeListener(ilQuestionChangeListener $listener); - - /** - * @param object $a_object - * @param string $a_method - * @param mixed $a_parameters - */ - public function addNewIdListener($a_object, $a_method, $a_parameters = ""); - - /** - * @param int $a_new_question_id - */ - public function callNewIdListeners($a_new_question_id); - - /** - * @param array $taxonomies - an array of taxonomy ids - */ - public function setTaxonomies($taxonomies); - - /** - * @param string $backLinkTarget - an http link - */ - public function setBackLink($backLinkTarget); - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getPreviewLink(): \ILIAS\UI\Component\Link\Link; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getEditQuestionConfigLink(): \ILIAS\UI\Component\Link\Link; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getEditQuestionPageLink(): \ILIAS\UI\Component\Link\Link; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getEditFeedbacksLink(): \ILIAS\UI\Component\Link\Link; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getEditHintsLink(): \ILIAS\UI\Component\Link\Link; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getStatisticLink(): \ILIAS\UI\Component\Link\Link; -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionNavigationAware.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionNavigationAware.php deleted file mode 100755 index 511e09070f68..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionNavigationAware.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestionNavigationAware -{ - /** - * @return \ILIAS\UI\Component\Component - */ - public function getQuestionButtonsHTML(): \ILIAS\UI\Component\Component; - - /** - * @return \ILIAS\UI\Component\Component - */ - public function getQuestionPlayerActionsHTML(): \ILIAS\UI\Component\Component; - - /** - * @return \ILIAS\UI\Component\Link\Link - */ - public function getQuestionActionHandlingLink(): \ILIAS\UI\Component\Link\Link; -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionOfflinePresentationExporter.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionOfflinePresentationExporter.php deleted file mode 100755 index d35df1ec5047..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionOfflinePresentationExporter.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestionOfflinePresentationExporter -{ - /** - * @param ilAsqQuestion $questionInstance - */ - public function setQuestion(ilAsqQuestion $questionInstance); - - /** - * @param ilAsqQuestionResourcesCollector $resourcesCollector - * @param bool $a_no_interaction - * @return \ILIAS\UI\Component\Component - */ - public function exportQuestion(ilAsqQuestionResourcesCollector $resourcesCollector, $a_no_interaction): \ILIAS\UI\Component\Component; -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionPresentation.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionPresentation.php deleted file mode 100755 index 7a6405ec3a96..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionPresentation.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestionPresentation -{ - /** - * @param ilAsqQuestion $question - */ - public function setQuestion(ilAsqQuestion $question); - - /** - * @param ilAsqQuestionSolution $solution - * @return \ILIAS\UI\Component\Component - */ - public function getQuestionPresentation(ilAsqQuestionSolution $solution): \ILIAS\UI\Component\Component; - - /** - * @param ilAsqQuestionSolution $solution - * @return \ILIAS\UI\Component\Component - */ - public function getSolutionPresentation(ilAsqQuestionSolution $solution): \ILIAS\UI\Component\Component; - - /** - * @param ilAsqQuestionSolution $solution - * @return \ILIAS\UI\Component\Component - */ - public function getGenericFeedbackOutput(ilAsqQuestionSolution $solution): \ILIAS\UI\Component\Component; - - /** - * @param ilAsqQuestionSolution $solution - * @return \ILIAS\UI\Component\Component - */ - public function getSpecificFeedbackOutput(ilAsqQuestionSolution $solution): \ILIAS\UI\Component\Component; - - /** - * @return bool - */ - public function hasInlineFeedback(): bool; - - /** - * @return bool - */ - public function isAutosaveable(): bool; - - /** - * @param ilAsqQuestionNavigationAware - */ - public function setQuestionNavigation(ilAsqQuestionNavigationAware $questionNavigationAware); -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionSolution.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionSolution.php deleted file mode 100755 index 67d09a9cadd0..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqQuestionSolution.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqQuestionSolution -{ - /** - * @param integer $solutionId - */ - public function setSolutionId($solutionId); - - /** - * @return integer - */ - public function getSolutionId(): int; - - /** - * @param integer $questionId - */ - public function setQuestionId($questionId); - - /** - * @return integer - */ - public function getQuestionId(): int; - - /** - * Loads soluton data - */ - public function load(); - - /** - * Saves solution data - */ - public function save(); - - /** - * @param \Psr\Http\Message\ServerRequestInterface $request - */ - public function initFromServerRequest(\Psr\Http\Message\ServerRequestInterface $request); - - /** - * @return bool - */ - public function isEmpty(): bool; -} diff --git a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqResultCalculator.php b/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqResultCalculator.php deleted file mode 100755 index 22804048a972..000000000000 --- a/components/ILIAS/AssessmentQuestion/interfaces/interface.ilAsqResultCalculator.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @version $Id$ - * - * @package components/ILIAS/AssessmentQuestion - */ -interface ilAsqResultCalculator -{ - /** - * @param ilAsqQuestion $question - * @return void - */ - public function setQuestion(ilAsqQuestion $question); - - /** - * @param ilAsqQuestionSolution $question - * @return void - */ - public function setSolution(ilAsqQuestionSolution $question); - - /** - * @return ilAsqQuestionResult - */ - public function calculate(): ilAsqQuestionResult; -} diff --git a/components/ILIAS/AssessmentQuestion/maintenance.json b/components/ILIAS/AssessmentQuestion/maintenance.json deleted file mode 100755 index c9a32055da7e..000000000000 --- a/components/ILIAS/AssessmentQuestion/maintenance.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "dstrassner(48931)", - "second_maintainer": "mbecker(27266)", - "implicit_maintainers": [], - "coordinator": [ - "" - ], - "tester": "SIG EA", - "testcase_writer": "Fabian(27631)", - "path": "Services/AssessmentQuestion", - "belong_to_component": "None", - "used_in_components": [ - "Test", - "TestQuestionPool", - "LearningModule" - ] -} \ No newline at end of file diff --git a/components/ILIAS/QTI/QTI.php b/components/ILIAS/AuthSOAP/AuthSOAP.php similarity index 95% rename from components/ILIAS/QTI/QTI.php rename to components/ILIAS/AuthSOAP/AuthSOAP.php index 478cce18a768..21822fe3808f 100644 --- a/components/ILIAS/QTI/QTI.php +++ b/components/ILIAS/AuthSOAP/AuthSOAP.php @@ -20,7 +20,7 @@ namespace ILIAS; -class QTI implements Component\Component +class AuthSOAP implements Component\Component { public function init( array | \ArrayAccess &$define, diff --git a/components/ILIAS/SOAPAuth/README.md b/components/ILIAS/AuthSOAP/README.md similarity index 100% rename from components/ILIAS/SOAPAuth/README.md rename to components/ILIAS/AuthSOAP/README.md diff --git a/components/ILIAS/SOAPAuth/classes/class.ilAuthProviderSoap.php b/components/ILIAS/AuthSOAP/classes/class.ilAuthProviderSoap.php similarity index 100% rename from components/ILIAS/SOAPAuth/classes/class.ilAuthProviderSoap.php rename to components/ILIAS/AuthSOAP/classes/class.ilAuthProviderSoap.php diff --git a/components/ILIAS/SOAPAuth/classes/class.ilSOAPAuth.php b/components/ILIAS/AuthSOAP/classes/class.ilAuthSOAP.php similarity index 99% rename from components/ILIAS/SOAPAuth/classes/class.ilSOAPAuth.php rename to components/ILIAS/AuthSOAP/classes/class.ilAuthSOAP.php index c29f9495cf11..3940b86855a3 100755 --- a/components/ILIAS/SOAPAuth/classes/class.ilSOAPAuth.php +++ b/components/ILIAS/AuthSOAP/classes/class.ilAuthSOAP.php @@ -18,7 +18,7 @@ declare(strict_types=1); -class ilSOAPAuth +class ilAuthSOAP { public static function testConnection(string $a_ext_uid, string $a_soap_pw, bool $a_new_user): string { diff --git a/components/ILIAS/SOAPAuth/examples/class.ilSoapDummyAuthServer.php b/components/ILIAS/AuthSOAP/examples/class.ilSoapDummyAuthServer.php similarity index 100% rename from components/ILIAS/SOAPAuth/examples/class.ilSoapDummyAuthServer.php rename to components/ILIAS/AuthSOAP/examples/class.ilSoapDummyAuthServer.php diff --git a/components/ILIAS/SOAPAuth/examples/dummy_client.php b/components/ILIAS/AuthSOAP/examples/dummy_client.php similarity index 100% rename from components/ILIAS/SOAPAuth/examples/dummy_client.php rename to components/ILIAS/AuthSOAP/examples/dummy_client.php diff --git a/components/ILIAS/SOAPAuth/examples/dummy_server.php b/components/ILIAS/AuthSOAP/examples/dummy_server.php similarity index 100% rename from components/ILIAS/SOAPAuth/examples/dummy_server.php rename to components/ILIAS/AuthSOAP/examples/dummy_server.php diff --git a/components/ILIAS/SOAPAuth/maintenance.json b/components/ILIAS/AuthSOAP/maintenance.json similarity index 90% rename from components/ILIAS/SOAPAuth/maintenance.json rename to components/ILIAS/AuthSOAP/maintenance.json index 8bc3cbb6963e..d052f3bdab92 100755 --- a/components/ILIAS/SOAPAuth/maintenance.json +++ b/components/ILIAS/AuthSOAP/maintenance.json @@ -8,7 +8,7 @@ ], "tester": "", "testcase_writer": "", - "path": "Services/SOAPAuth", + "path": "Services/AuthSOAP", "belong_to_component": "SOAP", "used_in_components": [] } \ No newline at end of file diff --git a/components/ILIAS/Types/tests/TypeTest.php b/components/ILIAS/BackgroundTasks/tests/TypeTest.php old mode 100755 new mode 100644 similarity index 100% rename from components/ILIAS/Types/tests/TypeTest.php rename to components/ILIAS/BackgroundTasks/tests/TypeTest.php diff --git a/components/ILIAS/Block/Block.php b/components/ILIAS/Block/Block.php deleted file mode 100644 index 19ea49e12a65..000000000000 --- a/components/ILIAS/Block/Block.php +++ /dev/null @@ -1,38 +0,0 @@ - - new Component\Resource\ComponentJS($this, "ilblockcallback.js"); - } -} diff --git a/components/ILIAS/Block/maintenance.json b/components/ILIAS/Block/maintenance.json deleted file mode 100755 index cd7c9d6a8806..000000000000 --- a/components/ILIAS/Block/maintenance.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "", - "second_maintainer": "", - "implicit_maintainers": [ - "" - ], - "coordinator": [ - "" - ], - "tester": "", - "testcase_writer": "", - "path": "Services/Block", - "belong_to_component": "None", - "used_in_components": [] -} \ No newline at end of file diff --git a/components/ILIAS/AdvancedEditing/classes/class.StandardGUIRequest.php b/components/ILIAS/COPage/Administration/class.StandardGUIRequest.php old mode 100755 new mode 100644 similarity index 96% rename from components/ILIAS/AdvancedEditing/classes/class.StandardGUIRequest.php rename to components/ILIAS/COPage/Administration/class.StandardGUIRequest.php index f3518f6e4be0..d50c08acae54 --- a/components/ILIAS/AdvancedEditing/classes/class.StandardGUIRequest.php +++ b/components/ILIAS/COPage/Administration/class.StandardGUIRequest.php @@ -13,7 +13,7 @@ * https://github.com/ILIAS-eLearning */ -namespace ILIAS\AdvancedEditing; +namespace ILIAS\COPage\AdvancedEditing; use ILIAS\Repository; diff --git a/components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingException.php b/components/ILIAS/COPage/Administration/class.ilObjAdvancedEditing.php similarity index 71% rename from components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingException.php rename to components/ILIAS/COPage/Administration/class.ilObjAdvancedEditing.php index 429a83559d9e..03a7beb1a8ea 100755 --- a/components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingException.php +++ b/components/ILIAS/COPage/Administration/class.ilObjAdvancedEditing.php @@ -3,21 +3,22 @@ /** * This file is part of ILIAS, a powerful learning management system * published by ILIAS open source e-Learning e.V. + * * ILIAS is licensed with the GPL-3.0, * see https://www.gnu.org/licenses/gpl-3.0.en.html * You should have received a copy of said license along with the * source code, too. + * * If this is not the case or you just want to try ILIAS, you'll find * us at: * https://www.ilias.de * https://github.com/ILIAS-eLearning - */ - -/** - * Class for advanced editing exception handling in ILIAS. * - * @author Michael Jansen - */ -class ilAdvancedEditingException extends ilException + *********************************************************************/ + +declare(strict_types=1); + +class ilObjAdvancedEditing extends ilObject { + protected string $type = 'adve'; } diff --git a/components/ILIAS/AdvancedEditing/classes/class.ilObjAdvancedEditingAccess.php b/components/ILIAS/COPage/Administration/class.ilObjAdvancedEditingAccess.php similarity index 100% rename from components/ILIAS/AdvancedEditing/classes/class.ilObjAdvancedEditingAccess.php rename to components/ILIAS/COPage/Administration/class.ilObjAdvancedEditingAccess.php diff --git a/components/ILIAS/AdvancedEditing/classes/class.ilObjAdvancedEditingGUI.php b/components/ILIAS/COPage/Administration/class.ilObjAdvancedEditingGUI.php similarity index 68% rename from components/ILIAS/AdvancedEditing/classes/class.ilObjAdvancedEditingGUI.php rename to components/ILIAS/COPage/Administration/class.ilObjAdvancedEditingGUI.php index ee58a7e0eb4f..9b0aa7a10a37 100755 --- a/components/ILIAS/AdvancedEditing/classes/class.ilObjAdvancedEditingGUI.php +++ b/components/ILIAS/COPage/Administration/class.ilObjAdvancedEditingGUI.php @@ -16,13 +16,13 @@ * *********************************************************************/ -use ILIAS\AdvancedEditing\StandardGUIRequest; +use ILIAS\COPage\AdvancedEditing\StandardGUIRequest; /** * Class ilObjAdvancedEditingGUI * * @author Helmut Schottmüller - * @ilCtrl_Calls ilObjAdvancedEditingGUI: ilPermissionGUI + * @ilCtrl_Calls ilObjAdvancedEditingGUI: ilPermissionGUI, ilRTESettingsGUI */ class ilObjAdvancedEditingGUI extends ilObjectGUI { @@ -30,6 +30,7 @@ class ilObjAdvancedEditingGUI extends ilObjectGUI protected string $cgrp = ""; protected StandardGUIRequest $std_request; protected ilComponentRepository $component_repository; + protected ilObjUser $current_user; public function __construct( $a_data, @@ -40,6 +41,7 @@ public function __construct( global $DIC; $this->component_repository = $DIC["component.repository"]; + $this->current_user = $DIC['ilUser']; $this->type = "adve"; parent::__construct($a_data, $a_id, $a_call_by_reference, false); @@ -68,6 +70,19 @@ public function executeCommand(): void $this->ctrl->forwardCommand($perm_gui); break; + case strtolower(ilRTESettingsGUI::class): + $rte_gui = new ilRTESettingsGUI( + $this->ref_id, + $this->tpl, + $this->ctrl, + $this->lng, + $this->access, + $this->current_user, + $this->tabs_gui + ); + $rte_gui->$cmd(); + break; + default: if ($cmd === null || $cmd === "" || $cmd === "view") { $cmd = "showGeneralPageEditorSettings"; @@ -95,39 +110,6 @@ public function getAdminTabs(): void $this->getTabs(); } - public function addSubtabs(): void - { - if ($this->ctrl->getNextClass() !== "ilpermissiongui" && - !in_array($this->ctrl->getCmd(), array( - "showPageEditorSettings", - "showGeneralPageEditorSettings", - "", - "view" - ), true)) { - $this->tabs_gui->addSubTabTarget( - "adve_general_settings", - $this->ctrl->getLinkTarget($this, "settings"), - array("settings", "saveSettings"), - "", - "" - ); - $this->tabs_gui->addSubTabTarget( - "adve_assessment_settings", - $this->ctrl->getLinkTarget($this, "assessment"), - array("assessment", "saveAssessmentSettings"), - "", - "" - ); - $this->tabs_gui->addSubTabTarget( - "adve_frm_post_settings", - $this->ctrl->getLinkTarget($this, "frmPost"), - array("frmPost", "saveFrmPostSettings"), - "", - "" - ); - } - } - public function addPageEditorSettingsSubtabs(): void { $this->tabs_gui->addSubTabTarget( @@ -160,7 +142,7 @@ protected function getTabs(): void $this->tabs_gui->addTarget( "adve_rte_settings", - $this->ctrl->getLinkTarget($this, "settings"), + $this->ctrl->getLinkTargetByClass([self::class, ilRTESettingsGUI::class], "settings"), array("settings","assessment", "frmPost"), "", "" @@ -175,149 +157,6 @@ protected function getTabs(): void 'ilpermissiongui' ); } - $this->addSubtabs(); - } - - public function settingsObject(): void - { - $tpl = $this->tpl; - $form = $this->getTinyForm(); - $tpl->setContent($form->getHTML()); - } - - public function getTinyForm(): ilPropertyFormGUI - { - $editor = ilObjAdvancedEditing::_getRichTextEditor(); - $form = new ilPropertyFormGUI(); - $form->setFormAction($this->ctrl->getFormAction($this)); - $form->setTitle($this->lng->txt("adve_activation")); - $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_tiny_mce"), "use_tiny"); - if ($editor === "tinymce") { - $cb->setChecked(true); - } - $form->addItem($cb); - if ($this->checkPermissionBool("write")) { - $form->addCommandButton("saveSettings", $this->lng->txt("save")); - } - - return $form; - } - - public function saveSettingsObject(): void - { - $this->checkPermission("write"); - - $form = $this->getTinyForm(); - $form->checkInput(); - - if ($form->getInput("use_tiny")) { - $this->object->setRichTextEditor("tinymce"); - } else { - $this->object->setRichTextEditor(""); - } - $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true); - - $this->ctrl->redirect($this, 'settings'); - } - - public function assessmentObject(): void - { - $form = $this->initTagsForm( - "assessment", - "saveAssessmentSettings", - "advanced_editing_assessment_settings" - ); - - $this->tpl->setContent($form->getHTML()); - } - - public function saveAssessmentSettingsObject(): void - { - $form = $this->initTagsForm( - "assessment", - "saveAssessmentSettings", - "advanced_editing_assessment_settings" - ); - if (!$this->saveTags("assessment", "assessment", $form)) { - $form->setValuesByPost(); - $this->tpl->setContent($form->getHTML()); - } - } - - public function frmPostObject(): void - { - $form = $this->initTagsForm( - "frm_post", - "saveFrmPostSettings", - "advanced_editing_frm_post_settings" - ); - - $this->tpl->setContent($form->getHTML()); - } - - public function saveFrmPostSettingsObject(): void - { - $form = $this->initTagsForm( - "frm_post", - "saveFrmPostSettings", - "advanced_editing_frm_post_settings" - ); - if (!$this->saveTags("frm_post", "frmPost", $form)) { - $form->setValuesByPost(); - $this->tpl->setContent($form->getHTML()); - } - } - - protected function initTagsForm( - string $a_id, - string $a_cmd, - string $a_title - ): ilPropertyFormGUI { - $form = new ilPropertyFormGUI(); - $form->setFormAction($this->ctrl->getFormAction($this, $a_cmd)); - $form->setTitle($this->lng->txt($a_title)); - - $alltags = $this->object->getHTMLTags(); - $alltags = array_combine($alltags, $alltags); - - $tags = new ilMultiSelectInputGUI($this->lng->txt("advanced_editing_allow_html_tags"), "html_tags"); - $tags->setHeight(400); - $tags->enableSelectAll(true); - $tags->enableSelectedFirst(true); - $tags->setOptions($alltags); - $tags->setValue(ilObjAdvancedEditing::_getUsedHTMLTags($a_id)); - $form->addItem($tags); - - if ($this->access->checkAccess("write", "", $this->object->getRefId())) { - $form->addCommandButton($a_cmd, $this->lng->txt("save")); - } - - return $form; - } - - protected function saveTags( - string $a_id, - string $a_cmd, - ilPropertyFormGUI $form - ): bool { - $this->checkPermission("write"); - try { - if ($form->checkInput()) { - $html_tags = $form->getInput("html_tags"); - // get rid of select all - if (array_key_exists(0, $html_tags) && (string) $html_tags[0] === '') { - unset($html_tags[0]); - } - $this->object->setUsedHTMLTags((array) $html_tags, $a_id); - $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true); - } else { - return false; - } - } catch (ilAdvancedEditingRequiredTagsException $e) { - $this->tpl->setOnScreenMessage('info', $e->getMessage(), true); - } - $this->ctrl->redirect($this, $a_cmd); - return true; } public function showPageEditorSettingsObject(): void diff --git a/components/ILIAS/COPage/IntLink/class.StandardGUIRequest.php b/components/ILIAS/COPage/IntLink/class.StandardGUIRequest.php index 85a45b124cb3..69d236adc6f9 100755 --- a/components/ILIAS/COPage/IntLink/class.StandardGUIRequest.php +++ b/components/ILIAS/COPage/IntLink/class.StandardGUIRequest.php @@ -20,6 +20,9 @@ use ILIAS\Repository\BaseGUIRequest; +/** + * @deprecated 10 This component will be removed with ILIAS 10 + */ class StandardGUIRequest { use BaseGUIRequest; diff --git a/components/ILIAS/COPage/IntLink/class.ilIntLinkRepItemExplorerGUI.php b/components/ILIAS/COPage/IntLink/class.ilIntLinkRepItemExplorerGUI.php index 06e9a73d35c5..aeeea239d611 100755 --- a/components/ILIAS/COPage/IntLink/class.ilIntLinkRepItemExplorerGUI.php +++ b/components/ILIAS/COPage/IntLink/class.ilIntLinkRepItemExplorerGUI.php @@ -20,6 +20,7 @@ * Internal Link: Repository Item Selector Explorer * * @author Alexander Killing + * @deprecated 10 This component will be removed with ILIAS 10 */ class ilIntLinkRepItemExplorerGUI extends ilRepositorySelectorExplorerGUI { diff --git a/components/ILIAS/COPage/IntLink/class.ilInternalLink.php b/components/ILIAS/COPage/IntLink/class.ilInternalLink.php index 393c01965122..db6f1d7ae2bf 100755 --- a/components/ILIAS/COPage/IntLink/class.ilInternalLink.php +++ b/components/ILIAS/COPage/IntLink/class.ilInternalLink.php @@ -20,6 +20,7 @@ * Class ilInternalLink * Some methods to handle internal links * @author Alexander Killing + * @deprecated 10 This component will be removed with ILIAS 10 */ class ilInternalLink { diff --git a/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php b/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php index 719238cb583d..c9cda9a49b1f 100755 --- a/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php +++ b/components/ILIAS/COPage/IntLink/class.ilInternalLinkGUI.php @@ -21,6 +21,7 @@ /** * Internal link selector * @author Alexander Killing + * @deprecated 10 This component will be removed with ILIAS 10 */ class ilInternalLinkGUI { diff --git a/components/ILIAS/COPage/IntLink/class.ilLinkTargetObjectExplorerGUI.php b/components/ILIAS/COPage/IntLink/class.ilLinkTargetObjectExplorerGUI.php index 7f28a0152af6..5f7b3992b8f6 100755 --- a/components/ILIAS/COPage/IntLink/class.ilLinkTargetObjectExplorerGUI.php +++ b/components/ILIAS/COPage/IntLink/class.ilLinkTargetObjectExplorerGUI.php @@ -19,6 +19,7 @@ /** * Internal Link: Repository Item Selector Explorer * @author Alexander Killing + * @deprecated 10 This component will be removed with ILIAS 10 */ class ilLinkTargetObjectExplorerGUI extends ilRepositorySelectorExplorerGUI { diff --git a/components/ILIAS/COPage/service.xml b/components/ILIAS/COPage/service.xml index 63036614d25c..66bb1ff5466d 100755 --- a/components/ILIAS/COPage/service.xml +++ b/components/ILIAS/COPage/service.xml @@ -41,4 +41,10 @@ + + + adm + + diff --git a/components/ILIAS/CSV/CSV.php b/components/ILIAS/CSV/CSV.php index 23509d3dd2c8..0fcb468116e5 100644 --- a/components/ILIAS/CSV/CSV.php +++ b/components/ILIAS/CSV/CSV.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class CSV implements Component\Component { public function init( diff --git a/components/ILIAS/CSV/classes/class.ilCSVReader.php b/components/ILIAS/CSV/classes/class.ilCSVReader.php index bd730a9e266d..13339590c847 100755 --- a/components/ILIAS/CSV/classes/class.ilCSVReader.php +++ b/components/ILIAS/CSV/classes/class.ilCSVReader.php @@ -16,6 +16,9 @@ * *********************************************************************/ +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class ilCSVReader { /** diff --git a/components/ILIAS/CSV/classes/class.ilCSVUtil.php b/components/ILIAS/CSV/classes/class.ilCSVUtil.php deleted file mode 100755 index 0249b8e03b28..000000000000 --- a/components/ILIAS/CSV/classes/class.ilCSVUtil.php +++ /dev/null @@ -1,73 +0,0 @@ - $entry) { - $surround = false; - if ($quoteAll) { - $surround = true; - } - if (str_contains($entry, '"')) { - $entry = str_replace('"', '""', $entry); - $surround = true; - } - if (str_contains($entry, $separator)) { - $surround = true; - } - if ($compatibleWithMSExcel) { - // replace all CR LF with LF (for Excel for Windows compatibility - $entry = str_replace(chr(13) . chr(10), chr(10), $entry); - } - if ($surround) { - if ($outUTF8) { - $resultarray[$rowindex] = '"' . $entry . '"'; - } else { - - $resultarray[$rowindex] = iconv('UTF-8', 'ISO-8859-1', '"' . $entry . '"'); - } - } elseif ($outUTF8) { - $resultarray[$rowindex] = $entry; - } else { - $resultarray[$rowindex] = iconv('UTF-8', 'ISO-8859-1', $entry); - } - } - return $resultarray; - } -} diff --git a/components/ILIAS/CSV/classes/class.ilCSVWriter.php b/components/ILIAS/CSV/classes/class.ilCSVWriter.php index e4209c28e322..2f7cac0ec578 100755 --- a/components/ILIAS/CSV/classes/class.ilCSVWriter.php +++ b/components/ILIAS/CSV/classes/class.ilCSVWriter.php @@ -16,6 +16,9 @@ * *********************************************************************/ +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class ilCSVWriter { private string $csv = ''; diff --git a/components/ILIAS/CSV/classes/maintenance.json b/components/ILIAS/CSV/maintenance.json similarity index 100% rename from components/ILIAS/CSV/classes/maintenance.json rename to components/ILIAS/CSV/maintenance.json diff --git a/components/ILIAS/CSV/classes/service.xml b/components/ILIAS/CSV/service.xml similarity index 100% rename from components/ILIAS/CSV/classes/service.xml rename to components/ILIAS/CSV/service.xml diff --git a/components/ILIAS/Cache_/Cache_.php b/components/ILIAS/Cache_/Cache_.php deleted file mode 100644 index edbf41ea3ee6..000000000000 --- a/components/ILIAS/Cache_/Cache_.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class ilExampleCache extends ilCache -{ - public function __construct() - { - parent::__construct("ServicesCache", "Example", false); - $this->setExpiresAfter(5); // only five seconds to make a hit - } -} diff --git a/components/ILIAS/Cache_/maintenance.json b/components/ILIAS/Cache_/maintenance.json deleted file mode 100755 index a7e0daceef1b..000000000000 --- a/components/ILIAS/Cache_/maintenance.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "akill(149)", - "second_maintainer": "", - "implicit_maintainers": [ - "" - ], - "coordinator": [ - "" - ], - "tester": "", - "testcase_writer": "", - "path": "components/ILIAS/Cache_", - "belong_to_component": "None", - "used_in_components": [ - "News", - "Calendar" - ] -} \ No newline at end of file diff --git a/components/ILIAS/Cache_/tests/ilCacheTest.php b/components/ILIAS/Cache_/tests/ilCacheTest.php deleted file mode 100755 index 283e4fa1e630..000000000000 --- a/components/ILIAS/Cache_/tests/ilCacheTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class ilCacheTest extends TestCase -{ - // PHP8-Review: Redundant method override - protected function setUp(): void - { - parent::setUp(); - } - - protected function tearDown(): void - { - } - - /** - * Test set expires - */ - public function testSetExpires() - { - $ex_cache = new ilExampleCache(); - - $this->assertEquals( - 5, - $ex_cache->getExpiresAfter() - ); - } -} diff --git a/components/ILIAS/Chart/Chart.php b/components/ILIAS/Chart/Chart.php index cda4b660f5ee..f9ff4e1c1959 100644 --- a/components/ILIAS/Chart/Chart.php +++ b/components/ILIAS/Chart/Chart.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class Chart implements Component\Component { public function init( diff --git a/components/ILIAS/Chart/classes/class.ilChart.php b/components/ILIAS/Chart/classes/class.ilChart.php index 83e485db35b2..7d8a6c1d0688 100755 --- a/components/ILIAS/Chart/classes/class.ilChart.php +++ b/components/ILIAS/Chart/classes/class.ilChart.php @@ -16,6 +16,7 @@ /** * Abstract Chart generator base class * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ abstract class ilChart { diff --git a/components/ILIAS/Chart/classes/class.ilChartData.php b/components/ILIAS/Chart/classes/class.ilChartData.php index 3cb303bd00a6..2a9f3b0f2c4e 100755 --- a/components/ILIAS/Chart/classes/class.ilChartData.php +++ b/components/ILIAS/Chart/classes/class.ilChartData.php @@ -16,6 +16,7 @@ /** * Abstract chart data series base class * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ abstract class ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartDataBars.php b/components/ILIAS/Chart/classes/class.ilChartDataBars.php index 0d8767c5e279..b7905b37858d 100755 --- a/components/ILIAS/Chart/classes/class.ilChartDataBars.php +++ b/components/ILIAS/Chart/classes/class.ilChartDataBars.php @@ -17,6 +17,7 @@ * Chart data bars series * * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartDataBars extends ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartDataLines.php b/components/ILIAS/Chart/classes/class.ilChartDataLines.php index db3166bf3af3..adfbe704abd0 100755 --- a/components/ILIAS/Chart/classes/class.ilChartDataLines.php +++ b/components/ILIAS/Chart/classes/class.ilChartDataLines.php @@ -17,6 +17,7 @@ * Chart data lines series * * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartDataLines extends ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartDataPie.php b/components/ILIAS/Chart/classes/class.ilChartDataPie.php index 0b7ec3de24b5..d8d22af2e3c4 100755 --- a/components/ILIAS/Chart/classes/class.ilChartDataPie.php +++ b/components/ILIAS/Chart/classes/class.ilChartDataPie.php @@ -16,6 +16,7 @@ /** * Chart data pie series * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartDataPie extends ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartDataPoints.php b/components/ILIAS/Chart/classes/class.ilChartDataPoints.php index 852b87adb038..e9f3e12c4735 100755 --- a/components/ILIAS/Chart/classes/class.ilChartDataPoints.php +++ b/components/ILIAS/Chart/classes/class.ilChartDataPoints.php @@ -16,6 +16,7 @@ /** * Chart data points series * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartDataPoints extends ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartDataSpider.php b/components/ILIAS/Chart/classes/class.ilChartDataSpider.php index 8125a64d1bc0..73fbafb8e502 100755 --- a/components/ILIAS/Chart/classes/class.ilChartDataSpider.php +++ b/components/ILIAS/Chart/classes/class.ilChartDataSpider.php @@ -16,6 +16,7 @@ /** * Chart data spider series * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartDataSpider extends ilChartData { diff --git a/components/ILIAS/Chart/classes/class.ilChartGrid.php b/components/ILIAS/Chart/classes/class.ilChartGrid.php index caf2987496d1..1303654d9950 100755 --- a/components/ILIAS/Chart/classes/class.ilChartGrid.php +++ b/components/ILIAS/Chart/classes/class.ilChartGrid.php @@ -16,6 +16,7 @@ /** * Generator for grid-based charts * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartGrid extends ilChart { diff --git a/components/ILIAS/Chart/classes/class.ilChartLegend.php b/components/ILIAS/Chart/classes/class.ilChartLegend.php index abfaaf25dd7c..15b65004bd7c 100755 --- a/components/ILIAS/Chart/classes/class.ilChartLegend.php +++ b/components/ILIAS/Chart/classes/class.ilChartLegend.php @@ -16,6 +16,7 @@ /** * Chart legend * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartLegend { diff --git a/components/ILIAS/Chart/classes/class.ilChartPie.php b/components/ILIAS/Chart/classes/class.ilChartPie.php index e3eb1a271472..15ef6176f435 100755 --- a/components/ILIAS/Chart/classes/class.ilChartPie.php +++ b/components/ILIAS/Chart/classes/class.ilChartPie.php @@ -16,6 +16,7 @@ /** * Generator for pie charts * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartPie extends ilChart { diff --git a/components/ILIAS/Chart/classes/class.ilChartSpider.php b/components/ILIAS/Chart/classes/class.ilChartSpider.php index 79d418f0ad31..dc2f4d3b9bc1 100755 --- a/components/ILIAS/Chart/classes/class.ilChartSpider.php +++ b/components/ILIAS/Chart/classes/class.ilChartSpider.php @@ -16,6 +16,7 @@ /** * Generator for spider charts * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilChartSpider extends ilChart { diff --git a/components/ILIAS/Block/Service/class.InternalDataService.php b/components/ILIAS/Container/Block/Service/class.InternalDataService.php similarity index 96% rename from components/ILIAS/Block/Service/class.InternalDataService.php rename to components/ILIAS/Container/Block/Service/class.InternalDataService.php index fa2512cdd7dd..6767f0d135e2 100755 --- a/components/ILIAS/Block/Service/class.InternalDataService.php +++ b/components/ILIAS/Container/Block/Service/class.InternalDataService.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; /** * Block data service diff --git a/components/ILIAS/Block/Service/class.InternalDomainService.php b/components/ILIAS/Container/Block/Service/class.InternalDomainService.php similarity index 97% rename from components/ILIAS/Block/Service/class.InternalDomainService.php rename to components/ILIAS/Container/Block/Service/class.InternalDomainService.php index 7ab901f14e18..7f625d11cbe1 100755 --- a/components/ILIAS/Block/Service/class.InternalDomainService.php +++ b/components/ILIAS/Container/Block/Service/class.InternalDomainService.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; use ILIAS\DI\Container; use ILIAS\Repository\GlobalDICDomainServices; diff --git a/components/ILIAS/Block/Service/class.InternalGUIService.php b/components/ILIAS/Container/Block/Service/class.InternalGUIService.php similarity index 97% rename from components/ILIAS/Block/Service/class.InternalGUIService.php rename to components/ILIAS/Container/Block/Service/class.InternalGUIService.php index 3b20fc4a6a16..77f403f97b6c 100755 --- a/components/ILIAS/Block/Service/class.InternalGUIService.php +++ b/components/ILIAS/Container/Block/Service/class.InternalGUIService.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; use ILIAS\DI\Container; use ILIAS\Repository\GlobalDICGUIServices; diff --git a/components/ILIAS/Block/Service/class.InternalRepoService.php b/components/ILIAS/Container/Block/Service/class.InternalRepoService.php similarity index 94% rename from components/ILIAS/Block/Service/class.InternalRepoService.php rename to components/ILIAS/Container/Block/Service/class.InternalRepoService.php index 1089db320f50..b2d2a3a7dd2f 100755 --- a/components/ILIAS/Block/Service/class.InternalRepoService.php +++ b/components/ILIAS/Container/Block/Service/class.InternalRepoService.php @@ -18,9 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; - -use ILIAS\Block\BlockSessionRepository; +namespace ILIAS\Container\Block; /** * Block repo service diff --git a/components/ILIAS/Block/Service/class.InternalService.php b/components/ILIAS/Container/Block/Service/class.InternalService.php similarity index 98% rename from components/ILIAS/Block/Service/class.InternalService.php rename to components/ILIAS/Container/Block/Service/class.InternalService.php index e619d278cd6a..62adcc248388 100755 --- a/components/ILIAS/Block/Service/class.InternalService.php +++ b/components/ILIAS/Container/Block/Service/class.InternalService.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; use ILIAS\DI\Container; diff --git a/components/ILIAS/Block/Service/class.Service.php b/components/ILIAS/Container/Block/Service/class.Service.php similarity index 96% rename from components/ILIAS/Block/Service/class.Service.php rename to components/ILIAS/Container/Block/Service/class.Service.php index 8db7b73d2a84..951e241cf5a5 100755 --- a/components/ILIAS/Block/Service/class.Service.php +++ b/components/ILIAS/Container/Block/Service/class.Service.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; use ILIAS\DI\Container; diff --git a/components/ILIAS/Block/classes/class.BlockManager.php b/components/ILIAS/Container/Block/class.BlockManager.php similarity index 96% rename from components/ILIAS/Block/classes/class.BlockManager.php rename to components/ILIAS/Container/Block/class.BlockManager.php index 5866a953a4c2..937ba48dd8f6 100755 --- a/components/ILIAS/Block/classes/class.BlockManager.php +++ b/components/ILIAS/Container/Block/class.BlockManager.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; /** * @author Alexander Killing diff --git a/components/ILIAS/Block/classes/class.BlockSessionRepository.php b/components/ILIAS/Container/Block/class.BlockSessionRepository.php similarity index 97% rename from components/ILIAS/Block/classes/class.BlockSessionRepository.php rename to components/ILIAS/Container/Block/class.BlockSessionRepository.php index df0e85fd1a97..1f7f2cb9975f 100755 --- a/components/ILIAS/Block/classes/class.BlockSessionRepository.php +++ b/components/ILIAS/Container/Block/class.BlockSessionRepository.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; /** * Stores repository clipboard data diff --git a/components/ILIAS/Block/classes/class.StandardGUIRequest.php b/components/ILIAS/Container/Block/class.StandardGUIRequest.php similarity index 98% rename from components/ILIAS/Block/classes/class.StandardGUIRequest.php rename to components/ILIAS/Container/Block/class.StandardGUIRequest.php index 1e8a01ade439..da143656b6a7 100755 --- a/components/ILIAS/Block/classes/class.StandardGUIRequest.php +++ b/components/ILIAS/Container/Block/class.StandardGUIRequest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -namespace ILIAS\Block; +namespace ILIAS\Container\Block; use ILIAS\Repository\BaseGUIRequest; diff --git a/components/ILIAS/Block/classes/class.ilBlockGUI.php b/components/ILIAS/Container/Block/class.ilBlockGUI.php similarity index 99% rename from components/ILIAS/Block/classes/class.ilBlockGUI.php rename to components/ILIAS/Container/Block/class.ilBlockGUI.php index 8b274047718e..19a7d261f932 100755 --- a/components/ILIAS/Block/classes/class.ilBlockGUI.php +++ b/components/ILIAS/Container/Block/class.ilBlockGUI.php @@ -62,8 +62,8 @@ abstract class ilBlockGUI protected \ILIAS\UI\Renderer $renderer; protected Factory $factory; protected object $gui_object; - protected \ILIAS\Block\StandardGUIRequest $request; - protected \ILIAS\Block\BlockManager $block_manager; + protected \ILIAS\Container\Block\StandardGUIRequest $request; + protected \ILIAS\Container\Block\BlockManager $block_manager; private \ILIAS\HTTP\GlobalHttpState $http; protected bool $repositorymode = false; @@ -101,7 +101,7 @@ public function __construct() $this->renderer = $DIC->ui()->renderer(); $this->http = $DIC->http(); - $block_service = new ILIAS\Block\Service($DIC); + $block_service = new ILIAS\Container\Block\Service($DIC); $this->block_manager = $block_service->internal() ->domain() ->block(); diff --git a/components/ILIAS/Block/classes/class.ilBlockSetting.php b/components/ILIAS/Container/Block/class.ilBlockSetting.php similarity index 100% rename from components/ILIAS/Block/classes/class.ilBlockSetting.php rename to components/ILIAS/Container/Block/class.ilBlockSetting.php diff --git a/components/ILIAS/Block/classes/class.ilColumnGUI.php b/components/ILIAS/Container/Block/class.ilColumnGUI.php similarity index 99% rename from components/ILIAS/Block/classes/class.ilColumnGUI.php rename to components/ILIAS/Container/Block/class.ilColumnGUI.php index eea49f8198be..72377e5e3a5c 100755 --- a/components/ILIAS/Block/classes/class.ilColumnGUI.php +++ b/components/ILIAS/Container/Block/class.ilColumnGUI.php @@ -45,7 +45,7 @@ class ilColumnGUI protected string $coltype; protected ilDashboardSidePanelSettingsRepository $dash_side_panel_settings; protected ?ItemPresentationManager $item_presentation = null; - protected \ILIAS\Block\StandardGUIRequest $request; + protected \ILIAS\Container\Block\StandardGUIRequest $request; protected ilCtrl $ctrl; protected ilLanguage $lng; protected ilObjUser $user; @@ -191,7 +191,7 @@ public function __construct( $this->setColType($a_col_type); $this->setSide($a_side); - $block_service = new ILIAS\Block\Service($DIC); + $block_service = new ILIAS\Container\Block\Service($DIC); $this->request = $block_service->internal() ->gui() ->standardRequest(); @@ -228,7 +228,7 @@ public static function getCmdSide(): ?string { global $DIC; - $block_service = new ILIAS\Block\Service($DIC); + $block_service = new ILIAS\Container\Block\Service($DIC); $request = $block_service->internal() ->gui() ->standardRequest(); @@ -298,7 +298,7 @@ public static function getScreenMode(): string $ilCtrl = $DIC->ctrl(); - $block_service = new ILIAS\Block\Service($DIC); + $block_service = new ILIAS\Container\Block\Service($DIC); $request = $block_service->internal() ->gui() ->standardRequest(); diff --git a/components/ILIAS/Block/classes/class.ilCustomBlock.php b/components/ILIAS/Container/Block/class.ilCustomBlock.php similarity index 100% rename from components/ILIAS/Block/classes/class.ilCustomBlock.php rename to components/ILIAS/Container/Block/class.ilCustomBlock.php diff --git a/components/ILIAS/Container/Container.php b/components/ILIAS/Container/Container.php index 3f3091917d7d..1ec3ee99c8e4 100644 --- a/components/ILIAS/Container/Container.php +++ b/components/ILIAS/Container/Container.php @@ -36,5 +36,7 @@ public function init( new Component\Resource\ComponentJS($this, "Container.js"); $contribute[Component\Resource\PublicAsset::class] = fn() => new Component\Resource\ComponentJS($this, "ilClassification.js"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\ComponentJS($this, "ilblockcallback.js"); } } diff --git a/components/ILIAS/Block/resources/ilblockcallback.js b/components/ILIAS/Container/resources/ilblockcallback.js similarity index 100% rename from components/ILIAS/Block/resources/ilblockcallback.js rename to components/ILIAS/Container/resources/ilblockcallback.js diff --git a/components/ILIAS/Block/templates/default/tpl.block.html b/components/ILIAS/Container/templates/default/tpl.block.html similarity index 100% rename from components/ILIAS/Block/templates/default/tpl.block.html rename to components/ILIAS/Container/templates/default/tpl.block.html diff --git a/components/ILIAS/Block/templates/default/tpl.column.html b/components/ILIAS/Container/templates/default/tpl.column.html similarity index 100% rename from components/ILIAS/Block/templates/default/tpl.column.html rename to components/ILIAS/Container/templates/default/tpl.column.html diff --git a/components/ILIAS/Block/tests/BlockSessionRepositoryTest.php b/components/ILIAS/Container/tests/Block/BlockSessionRepositoryTest.php similarity index 80% rename from components/ILIAS/Block/tests/BlockSessionRepositoryTest.php rename to components/ILIAS/Container/tests/Block/BlockSessionRepositoryTest.php index be69065f346e..fc4180b262fc 100755 --- a/components/ILIAS/Block/tests/BlockSessionRepositoryTest.php +++ b/components/ILIAS/Container/tests/Block/BlockSessionRepositoryTest.php @@ -9,12 +9,12 @@ */ class BlockSessionRepositoryTest extends TestCase { - protected \ILIAS\Block\BlockSessionRepository $repo; + protected \ILIAS\Container\Block\BlockSessionRepository $repo; protected function setUp(): void { parent::setUp(); - $this->repo = new \ILIAS\Block\BlockSessionRepository(); + $this->repo = new \ILIAS\Container\Block\BlockSessionRepository(); } protected function tearDown(): void diff --git a/components/ILIAS/CopyWizard/CopyWizard.php b/components/ILIAS/CopyWizard/CopyWizard.php deleted file mode 100644 index 0fd325108a32..000000000000 --- a/components/ILIAS/CopyWizard/CopyWizard.php +++ /dev/null @@ -1,40 +0,0 @@ - - new Component\Resource\ComponentJS($this, "ilContainer.js"); - $contribute[Component\Resource\PublicAsset::class] = fn() => - new Component\Resource\ComponentJS($this, "ilCopyRedirection.js"); - } -} diff --git a/components/ILIAS/CopyWizard/maintenance.json b/components/ILIAS/CopyWizard/maintenance.json deleted file mode 100755 index c8c68d5bc9ba..000000000000 --- a/components/ILIAS/CopyWizard/maintenance.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "", - "second_maintainer": "", - "implicit_maintainers": [ - "" - ], - "coordinator": [ - "" - ], - "tester": "", - "testcase_writer": "", - "path": "Services/CopyWizard", - "belong_to_component": "None", - "used_in_components": [] -} \ No newline at end of file diff --git a/components/ILIAS/CopyWizard/tests/ilCopyWizardOptionsTest.php b/components/ILIAS/CopyWizard/tests/ilCopyWizardOptionsTest.php deleted file mode 100755 index e40034ab9f3e..000000000000 --- a/components/ILIAS/CopyWizard/tests/ilCopyWizardOptionsTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @ingroup ServicesCopyWizard - */ -class ilCopyWizardOptionsTest extends TestCase -{ - protected $backupGlobals = false; - - protected Container $dic; - - protected function setUp(): void - { - $this->initCopyWizardDependencies(); - parent::setUp(); - } - - public function testSingleton(): void - { - $first = ilCopyWizardOptions::_getInstance(0); - $second = ilCopyWizardOptions::_getInstance(0); - $this->assertTrue($first === $second); - } - - - /** - * @param string $name - * @param mixed $value - */ - protected function setGlobalVariable(string $name, $value): void - { - global $DIC; - - $GLOBALS[$name] = $value; - unset($DIC[$name]); - $DIC[$name] = static function (Container $c) use ($value) { - return $value; - }; - } - - protected function initCopyWizardDependencies(): void - { - $this->dic = new Container(); - $GLOBALS['DIC'] = $this->dic; - - $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class)); - $this->setGlobalVariable('tree', $this->createMock(ilTree::class)); - } -} diff --git a/components/ILIAS/DataSet/DataSet.php b/components/ILIAS/DataSet/DataSet.php deleted file mode 100644 index 093f9efb6105..000000000000 --- a/components/ILIAS/DataSet/DataSet.php +++ /dev/null @@ -1,37 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/ILIAS/DidacticTemplate/DidacticTemplate.php b/components/ILIAS/DidacticTemplate/DidacticTemplate.php index 7dac6f61835e..c737c851516f 100644 --- a/components/ILIAS/DidacticTemplate/DidacticTemplate.php +++ b/components/ILIAS/DidacticTemplate/DidacticTemplate.php @@ -32,6 +32,9 @@ public function init( array | \ArrayAccess &$pull, array | \ArrayAccess &$internal, ): void { - // ... + $contribute[\ILIAS\Setup\Agent::class] = static fn() => + new \ilDidacticTemplateSetupAgent( + $pull[\ILIAS\Refinery\Factory::class] + ); } } diff --git a/components/ILIAS/Multilingualism/classes/class.StandardGUIRequest.php b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.StandardGUIRequest.php similarity index 96% rename from components/ILIAS/Multilingualism/classes/class.StandardGUIRequest.php rename to components/ILIAS/DidacticTemplate/classes/Multilingualism/class.StandardGUIRequest.php index b884b54a5701..572b8c368aa0 100755 --- a/components/ILIAS/Multilingualism/classes/class.StandardGUIRequest.php +++ b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.StandardGUIRequest.php @@ -16,7 +16,7 @@ * *********************************************************************/ -namespace ILIAS\Multilingualism; +namespace ILIAS\DidacticTemplate\Multilingualism; use ILIAS\Repository\BaseGUIRequest; diff --git a/components/ILIAS/Multilingualism/classes/class.ilMultilingualism.php b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualism.php similarity index 97% rename from components/ILIAS/Multilingualism/classes/class.ilMultilingualism.php rename to components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualism.php index 60595c70215a..a86e303c26fa 100755 --- a/components/ILIAS/Multilingualism/classes/class.ilMultilingualism.php +++ b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualism.php @@ -216,7 +216,7 @@ public function read(): void { $this->setLanguages(array()); $set = $this->db->query( - "SELECT * FROM il_translations " . + "SELECT * FROM il_dt_translations " . " WHERE id = " . $this->db->quote($this->getObjId(), "integer") . " AND id_type = " . $this->db->quote($this->getType(), "text") ); @@ -233,7 +233,7 @@ public function read(): void public function delete(): void { $this->db->manipulate( - "DELETE FROM il_translations " . + "DELETE FROM il_dt_translations " . " WHERE id = " . $this->db->quote($this->getObjId(), "integer") . " AND id_type = " . $this->db->quote($this->getType(), "text") ); @@ -244,7 +244,7 @@ public function save(): void $this->delete(); foreach ($this->getLanguages() as $l => $trans) { - $this->db->manipulate($t = "INSERT INTO il_translations " . + $this->db->manipulate($t = "INSERT INTO il_dt_translations " . "(id, id_type, title, description, lang_code, lang_default) VALUES (" . $this->db->quote($this->getObjId(), "integer") . "," . $this->db->quote($this->getType(), "text") . "," . diff --git a/components/ILIAS/Multilingualism/classes/class.ilMultilingualismGUI.php b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualismGUI.php similarity index 99% rename from components/ILIAS/Multilingualism/classes/class.ilMultilingualismGUI.php rename to components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualismGUI.php index e5880cff56e3..adb1b5c931f8 100755 --- a/components/ILIAS/Multilingualism/classes/class.ilMultilingualismGUI.php +++ b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualismGUI.php @@ -25,7 +25,7 @@ */ class ilMultilingualismGUI { - protected \ILIAS\Multilingualism\StandardGUIRequest $request; + protected \ILIAS\DidacticTemplate\Multilingualism\StandardGUIRequest $request; protected ilLanguage $lng; protected ilCtrl $ctrl; protected ilGlobalTemplateInterface $tpl; diff --git a/components/ILIAS/Multilingualism/classes/class.ilMultilingualismTableGUI.php b/components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualismTableGUI.php similarity index 100% rename from components/ILIAS/Multilingualism/classes/class.ilMultilingualismTableGUI.php rename to components/ILIAS/DidacticTemplate/classes/Multilingualism/class.ilMultilingualismTableGUI.php diff --git a/components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngineSetupAgent.php b/components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplate11DBUpdateSteps.php similarity index 53% rename from components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngineSetupAgent.php rename to components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplate11DBUpdateSteps.php index 9d954003d0c7..f6bd62ce7396 100755 --- a/components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngineSetupAgent.php +++ b/components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplate11DBUpdateSteps.php @@ -16,18 +16,23 @@ * *********************************************************************/ -declare(strict_types=1); - -use ILIAS\Setup\Agent\NullAgent; -use ILIAS\Setup; -use ILIAS\Refinery\Transformation; - -class ilWorkflowEngineSetupAgent extends NullAgent +class ilDidacticTemplate11DBUpdateSteps implements \ilDatabaseUpdateSteps { - use Setup\Agent\HasNoNamedObjective; + protected \ilDBInterface $db; + + public function prepare(\ilDBInterface $db): void + { + $this->db = $db; + } - public function getArrayToConfigTransformation(): Transformation + public function step_1(): void { - throw new \LogicException("Agent has no config."); + if ($this->db->tableExists('il_translations') + && !$this->db->tableExists('il_dt_translations')) { + $this->db->renameTable( + 'il_translations', + 'il_dt_translations' + ); + } } } diff --git a/components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplateSetupAgent.php b/components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplateSetupAgent.php new file mode 100755 index 000000000000..1602ac63adb1 --- /dev/null +++ b/components/ILIAS/DidacticTemplate/classes/Setup/class.ilDidacticTemplateSetupAgent.php @@ -0,0 +1,40 @@ + + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilException extends Exception { diff --git a/components/ILIAS/Exercise/Assignment/class.ilExAssignmentEditorGUI.php b/components/ILIAS/Exercise/Assignment/class.ilExAssignmentEditorGUI.php index a58ea3bf0b35..b69f1327da60 100755 --- a/components/ILIAS/Exercise/Assignment/class.ilExAssignmentEditorGUI.php +++ b/components/ILIAS/Exercise/Assignment/class.ilExAssignmentEditorGUI.php @@ -36,6 +36,7 @@ class ilExAssignmentEditorGUI protected ?int $ref_id = null; protected ilAccessHandler $access; protected \ILIAS\Exercise\InternalGUIService $gui; + protected ilObjUser $user; protected ilCtrl $ctrl; protected ilTabsGUI $tabs; protected ilLanguage $lng; @@ -71,6 +72,7 @@ public function __construct( /** @var \ILIAS\DI\Container $DIC */ global $DIC; + $this->user = $DIC->user(); $this->ctrl = $DIC->ctrl(); $this->tabs = $DIC->tabs(); $this->lng = $DIC->language(); @@ -393,7 +395,7 @@ protected function initAssignmentForm( $desc_input = new ilTextAreaInputGUI($lng->txt("exc_instruction"), "instruction"); $desc_input->setRows(20); - if (ilObjAdvancedEditing::_getRichTextEditor() === "tinymce") { + if ((new ilRTESettings($this->lng, $this->user))->getRichTextEditor() === "tinymce") { $desc_input->setUseRte(true); $desc_input->setRteTagSet("mini"); } diff --git a/components/ILIAS/Exercise/Submission/class.ilExSubmissionBaseGUI.php b/components/ILIAS/Exercise/Submission/class.ilExSubmissionBaseGUI.php index 8d7f49827f9b..1bce5450e60c 100755 --- a/components/ILIAS/Exercise/Submission/class.ilExSubmissionBaseGUI.php +++ b/components/ILIAS/Exercise/Submission/class.ilExSubmissionBaseGUI.php @@ -33,6 +33,7 @@ abstract class ilExSubmissionBaseGUI protected \ILIAS\Exercise\Notification\NotificationManager $notification; protected \ILIAS\Exercise\InternalDomainService $domain; protected \ILIAS\Exercise\InternalGUIService $gui; + protected ilObjUser $user; protected ilCtrl $ctrl; protected ilTabsGUI $tabs_gui; protected ilLanguage $lng; @@ -59,6 +60,7 @@ public function __construct( $this->gui = $service->gui(); $this->domain = $service->domain(); + $this->user = $this->domain->user(); $this->ctrl = $this->gui->ctrl(); $this->tabs_gui = $this->gui->tabs(); $this->lng = $this->domain->lng(); diff --git a/components/ILIAS/Exercise/Submission/class.ilExSubmissionTextGUI.php b/components/ILIAS/Exercise/Submission/class.ilExSubmissionTextGUI.php index 8507878cb490..d060fa14bf4d 100755 --- a/components/ILIAS/Exercise/Submission/class.ilExSubmissionTextGUI.php +++ b/components/ILIAS/Exercise/Submission/class.ilExSubmissionTextGUI.php @@ -126,7 +126,7 @@ protected function initAssignmentTextForm( $form->addItem($text); - if (ilObjAdvancedEditing::_getRichTextEditor() === "tinymce") { + if ((new ilRTESettings($this->lng, $this->user))->getRichTextEditor() === "tinymce") { $text->setUseRte(true); $text->setRteTagSet("mini"); } @@ -202,7 +202,7 @@ public function updateAssignmentTextObject( // we are not using a purifier, so we have to set the valid RTE tags // :TODO: $rte = $form->getItemByPostVar("atxt"); - $rte->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("exc_ass")); + $rte->setRteTags(ilRTESettings::_getUsedHTMLTags("exc_ass")); if ($form->checkInput()) { $text = trim($form->getInput("atxt")); diff --git a/components/ILIAS/DataSet/classes/class.IRSSContainerExportConfig.php b/components/ILIAS/Export/DataSet/class.IRSSContainerExportConfig.php similarity index 100% rename from components/ILIAS/DataSet/classes/class.IRSSContainerExportConfig.php rename to components/ILIAS/Export/DataSet/class.IRSSContainerExportConfig.php diff --git a/components/ILIAS/DataSet/classes/class.ilDataSet.php b/components/ILIAS/Export/DataSet/class.ilDataSet.php similarity index 100% rename from components/ILIAS/DataSet/classes/class.ilDataSet.php rename to components/ILIAS/Export/DataSet/class.ilDataSet.php diff --git a/components/ILIAS/DataSet/classes/class.ilDataSetImportParser.php b/components/ILIAS/Export/DataSet/class.ilDataSetImportParser.php similarity index 100% rename from components/ILIAS/DataSet/classes/class.ilDataSetImportParser.php rename to components/ILIAS/Export/DataSet/class.ilDataSetImportParser.php diff --git a/components/ILIAS/DataSet/tests/DataSetImportParserTest.php b/components/ILIAS/Export/tests/DataSet/DataSetImportParserTest.php similarity index 100% rename from components/ILIAS/DataSet/tests/DataSetImportParserTest.php rename to components/ILIAS/Export/tests/DataSet/DataSetImportParserTest.php diff --git a/components/ILIAS/Form/Form.php b/components/ILIAS/Form/Form.php index 62e0e8e991a2..b059834501e2 100644 --- a/components/ILIAS/Form/Form.php +++ b/components/ILIAS/Form/Form.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 12 This component will be removed with ILIAS 12 + */ class Form implements Component\Component { public function init( diff --git a/components/ILIAS/Form/classes/class.ilAdvSelectInputGUI.php b/components/ILIAS/Form/classes/class.ilAdvSelectInputGUI.php index a6bda1e3ddf8..6b5e75645413 100755 --- a/components/ILIAS/Form/classes/class.ilAdvSelectInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilAdvSelectInputGUI.php @@ -24,6 +24,7 @@ * to a normal selection list, when javascript is disabled. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilAdvSelectInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilAlphabetInputGUI.php b/components/ILIAS/Form/classes/class.ilAlphabetInputGUI.php index 026e090fb81c..6db9ebe0ddca 100755 --- a/components/ILIAS/Form/classes/class.ilAlphabetInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilAlphabetInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilAlphabetInputGUI extends ilFormPropertyGUI implements ilToolbarItem { diff --git a/components/ILIAS/Form/classes/class.ilBirthdayInputGUI.php b/components/ILIAS/Form/classes/class.ilBirthdayInputGUI.php index 8c29ed911650..ce0196a3ac42 100755 --- a/components/ILIAS/Form/classes/class.ilBirthdayInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilBirthdayInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilBirthdayInputGUI extends ilDateTimeInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilCSSRectInputGUI.php b/components/ILIAS/Form/classes/class.ilCSSRectInputGUI.php index b9dffd64f4cb..7e9edc00422b 100755 --- a/components/ILIAS/Form/classes/class.ilCSSRectInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCSSRectInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCSSRectInputGUI extends ilSubEnabledFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilCheckboxGroupInputGUI.php b/components/ILIAS/Form/classes/class.ilCheckboxGroupInputGUI.php index 64651576527f..0bf0d99931dd 100755 --- a/components/ILIAS/Form/classes/class.ilCheckboxGroupInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCheckboxGroupInputGUI.php @@ -22,6 +22,7 @@ * This class represents a property in a property form. * * @author Helmut Schottmüller + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCheckboxGroupInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem, ilToolbarItem { diff --git a/components/ILIAS/Form/classes/class.ilCheckboxInputGUI.php b/components/ILIAS/Form/classes/class.ilCheckboxInputGUI.php index e7e9e35811a0..0f28047f0312 100755 --- a/components/ILIAS/Form/classes/class.ilCheckboxInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCheckboxInputGUI.php @@ -22,6 +22,7 @@ * This class represents a checkbox property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCheckboxInputGUI extends ilSubEnabledFormPropertyGUI implements ilToolbarItem, ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilCheckboxOption.php b/components/ILIAS/Form/classes/class.ilCheckboxOption.php index 6fd2f06f8eb6..7192be3ee5e6 100755 --- a/components/ILIAS/Form/classes/class.ilCheckboxOption.php +++ b/components/ILIAS/Form/classes/class.ilCheckboxOption.php @@ -22,6 +22,7 @@ * This class represents an option in a checkbox group * * @author Helmut Schottmüller + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCheckboxOption extends ilRadioOption { diff --git a/components/ILIAS/Form/classes/class.ilColorPickerInputGUI.php b/components/ILIAS/Form/classes/class.ilColorPickerInputGUI.php index 256512a034a0..ac098791bcdb 100755 --- a/components/ILIAS/Form/classes/class.ilColorPickerInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilColorPickerInputGUI.php @@ -22,6 +22,7 @@ * Color picker form for selecting color hexcodes using yui library * * @author Stefan Meyer + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilColorPickerInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilCombinationInputGUI.php b/components/ILIAS/Form/classes/class.ilCombinationInputGUI.php index 8290c9911de7..0f967db88098 100755 --- a/components/ILIAS/Form/classes/class.ilCombinationInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCombinationInputGUI.php @@ -22,6 +22,7 @@ * This class represents a number property in a property form. * * @author Jörg Lützenkirchen + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCombinationInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilCountrySelectInputGUI.php b/components/ILIAS/Form/classes/class.ilCountrySelectInputGUI.php index cba244abc08d..4b1c981070fa 100755 --- a/components/ILIAS/Form/classes/class.ilCountrySelectInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCountrySelectInputGUI.php @@ -22,6 +22,7 @@ * This class represents a selection list property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCountrySelectInputGUI extends ilSelectInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilCustomInputGUI.php b/components/ILIAS/Form/classes/class.ilCustomInputGUI.php index ec9f95231282..838cb943433e 100755 --- a/components/ILIAS/Form/classes/class.ilCustomInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilCustomInputGUI.php @@ -23,6 +23,7 @@ * * @author Alexander Killing * @deprecated Deprecated since 4.4, inherit directly from InputGUI instead + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilCustomInputGUI extends ilSubEnabledFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilDateDurationInputGUI.php b/components/ILIAS/Form/classes/class.ilDateDurationInputGUI.php index 3ee777f266a5..b4162bef6cdf 100755 --- a/components/ILIAS/Form/classes/class.ilDateDurationInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilDateDurationInputGUI.php @@ -22,6 +22,7 @@ * input GUI for a time span (start and end date) * * @author Stefan Meyer + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilDateDurationInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilDateTimeInputGUI.php b/components/ILIAS/Form/classes/class.ilDateTimeInputGUI.php index ea1d9e177fe0..7f0d9959bb1a 100755 --- a/components/ILIAS/Form/classes/class.ilDateTimeInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilDateTimeInputGUI.php @@ -22,6 +22,7 @@ * This class represents a date/time property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilDateTimeInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem, ilToolbarItem { diff --git a/components/ILIAS/Form/classes/class.ilDurationInputGUI.php b/components/ILIAS/Form/classes/class.ilDurationInputGUI.php index 1bd5521f6425..f3b728226f78 100755 --- a/components/ILIAS/Form/classes/class.ilDurationInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilDurationInputGUI.php @@ -22,6 +22,7 @@ * This class represents a duration (typical hh:mm:ss) property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilDurationInputGUI extends ilFormPropertyGUI { @@ -150,7 +151,7 @@ public function getShowSeconds(): bool public function setValueByArray(array $a_values): void { $values = ($a_values[$this->getPostVar()] ?? []); - $value_or_zero = fn ($part) => array_key_exists($part, $values ?? []) ? (int) $values[$part] : 0; + $value_or_zero = fn($part) => array_key_exists($part, $values ?? []) ? (int) $values[$part] : 0; $this->setMonths($value_or_zero("MM")); $this->setDays($value_or_zero("dd")); $this->setHours($value_or_zero("hh")); @@ -354,7 +355,7 @@ public function getValueInSeconds(): int public function getPostValueForComparison(): int { $values = $this->getInput(); - $value_or_zero = fn ($part) => array_key_exists($part, $values ?? []) ? (int) $values[$part] : 0; + $value_or_zero = fn($part) => array_key_exists($part, $values ?? []) ? (int) $values[$part] : 0; $value = 0; if ($this->getShowMonths()) { $value += $value_or_zero("MM") * 30 * 24 * 60 * 60; diff --git a/components/ILIAS/Form/classes/class.ilEMailInputGUI.php b/components/ILIAS/Form/classes/class.ilEMailInputGUI.php index 89c8cc21452b..f78239c8f9e2 100755 --- a/components/ILIAS/Form/classes/class.ilEMailInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilEMailInputGUI.php @@ -21,6 +21,7 @@ /** * This class represents a email property in a property form. * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilEMailInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilFileInputGUI.php b/components/ILIAS/Form/classes/class.ilFileInputGUI.php index 1b4f3cd2d46f..e5947f1e7cdd 100755 --- a/components/ILIAS/Form/classes/class.ilFileInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilFileInputGUI.php @@ -26,6 +26,7 @@ * This class represents a file property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFileInputGUI extends ilSubEnabledFormPropertyGUI implements ilToolbarItem { diff --git a/components/ILIAS/Form/classes/class.ilFileWizardInputGUI.php b/components/ILIAS/Form/classes/class.ilFileWizardInputGUI.php index 2219c814dd16..5b542a0ba719 100755 --- a/components/ILIAS/Form/classes/class.ilFileWizardInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilFileWizardInputGUI.php @@ -24,6 +24,7 @@ * This class represents a file wizard property in a property form. * * @author Helmut Schottmüller + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFileWizardInputGUI extends ilFileInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilFormGUI.php b/components/ILIAS/Form/classes/class.ilFormGUI.php index 2b8d48dbdf21..690237fa09e4 100755 --- a/components/ILIAS/Form/classes/class.ilFormGUI.php +++ b/components/ILIAS/Form/classes/class.ilFormGUI.php @@ -21,6 +21,7 @@ /** * This class represents a form user interface * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFormGUI { diff --git a/components/ILIAS/Form/classes/class.ilFormPropertyDispatchGUI.php b/components/ILIAS/Form/classes/class.ilFormPropertyDispatchGUI.php index f71f2b27e4ee..1afc87d87497 100755 --- a/components/ILIAS/Form/classes/class.ilFormPropertyDispatchGUI.php +++ b/components/ILIAS/Form/classes/class.ilFormPropertyDispatchGUI.php @@ -24,6 +24,7 @@ * * @author Alexander Killing * @ilCtrl_Calls ilFormPropertyDispatchGUI: + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFormPropertyDispatchGUI { diff --git a/components/ILIAS/Form/classes/class.ilFormPropertyGUI.php b/components/ILIAS/Form/classes/class.ilFormPropertyGUI.php index 351d85fc5324..43a9fd9d5b19 100755 --- a/components/ILIAS/Form/classes/class.ilFormPropertyGUI.php +++ b/components/ILIAS/Form/classes/class.ilFormPropertyGUI.php @@ -26,6 +26,7 @@ * This class represents a property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilFormSectionHeaderGUI.php b/components/ILIAS/Form/classes/class.ilFormSectionHeaderGUI.php index ed69e0569f52..bfd655cb3bbc 100755 --- a/components/ILIAS/Form/classes/class.ilFormSectionHeaderGUI.php +++ b/components/ILIAS/Form/classes/class.ilFormSectionHeaderGUI.php @@ -22,6 +22,7 @@ * This class represents a section header in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFormSectionHeaderGUI { diff --git a/components/ILIAS/Form/classes/class.ilFormulaInputGUI.php b/components/ILIAS/Form/classes/class.ilFormulaInputGUI.php index b3045608a738..f35527bfda97 100755 --- a/components/ILIAS/Form/classes/class.ilFormulaInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilFormulaInputGUI.php @@ -22,6 +22,7 @@ * This class represents a formula text property in a property form. * * @author Helmut Schottmüller + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilFormulaInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilHiddenInputGUI.php b/components/ILIAS/Form/classes/class.ilHiddenInputGUI.php index e956c846ba04..a949e3068253 100755 --- a/components/ILIAS/Form/classes/class.ilHiddenInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilHiddenInputGUI.php @@ -22,6 +22,7 @@ * This class represents a hidden form property in a property form. * * @author Roland Küstermann (rkuestermann@mps.de) + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilHiddenInputGUI extends ilFormPropertyGUI implements ilToolbarItem { diff --git a/components/ILIAS/Form/classes/class.ilImageFileInputGUI.php b/components/ILIAS/Form/classes/class.ilImageFileInputGUI.php index 72ce6ea12aff..e585b1648eb8 100755 --- a/components/ILIAS/Form/classes/class.ilImageFileInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilImageFileInputGUI.php @@ -23,6 +23,7 @@ * This class represents an image file property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilImageFileInputGUI extends ilFileInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilLinkInputGUI.php b/components/ILIAS/Form/classes/class.ilLinkInputGUI.php index 64c3cc712e9b..3b4429b61336 100755 --- a/components/ILIAS/Form/classes/class.ilLinkInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilLinkInputGUI.php @@ -25,6 +25,7 @@ * * @ilCtrl_IsCalledBy ilLinkInputGUI: ilFormPropertyDispatchGUI * @ilCtrl_Calls ilLinkInputGUI: ilInternalLinkGUI + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilLinkInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilLocationInputGUI.php b/components/ILIAS/Form/classes/class.ilLocationInputGUI.php index 2ddb6bc59ab9..a5ee3da31c93 100755 --- a/components/ILIAS/Form/classes/class.ilLocationInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilLocationInputGUI.php @@ -22,6 +22,7 @@ * This class represents a location property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilLocationInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilMultiSelectInputGUI.php b/components/ILIAS/Form/classes/class.ilMultiSelectInputGUI.php index cb9782df734e..812b2ecd8437 100755 --- a/components/ILIAS/Form/classes/class.ilMultiSelectInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilMultiSelectInputGUI.php @@ -22,6 +22,7 @@ * This class represents a multi selection list property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilMultiSelectInputGUI extends ilFormPropertyGUI implements ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilNestedListInputGUI.php b/components/ILIAS/Form/classes/class.ilNestedListInputGUI.php index 35b7b1ed0656..2049f6e1951f 100755 --- a/components/ILIAS/Form/classes/class.ilNestedListInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilNestedListInputGUI.php @@ -22,6 +22,7 @@ * This class represents a (nested) list of checkboxes (could be extended for radio items, too) * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilNestedListInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilNonEditableValueGUI.php b/components/ILIAS/Form/classes/class.ilNonEditableValueGUI.php index abd240e886b0..bddfd89c65c7 100755 --- a/components/ILIAS/Form/classes/class.ilNonEditableValueGUI.php +++ b/components/ILIAS/Form/classes/class.ilNonEditableValueGUI.php @@ -22,6 +22,7 @@ * This class represents a non editable value in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilNonEditableValueGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem, ilMultiValuesItem { diff --git a/components/ILIAS/Form/classes/class.ilNumberInputGUI.php b/components/ILIAS/Form/classes/class.ilNumberInputGUI.php index 6bfd44d35229..fe28efd10e60 100755 --- a/components/ILIAS/Form/classes/class.ilNumberInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilNumberInputGUI.php @@ -22,6 +22,7 @@ * This class represents a number property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilNumberInputGUI extends ilSubEnabledFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilPasswordInputGUI.php b/components/ILIAS/Form/classes/class.ilPasswordInputGUI.php index 7f3a17f48647..5b626cd76863 100755 --- a/components/ILIAS/Form/classes/class.ilPasswordInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilPasswordInputGUI.php @@ -22,6 +22,7 @@ * This class represents a password property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilPasswordInputGUI extends ilSubEnabledFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilPropertyFormGUI.php b/components/ILIAS/Form/classes/class.ilPropertyFormGUI.php index 6186bd773838..3e101ec9880c 100755 --- a/components/ILIAS/Form/classes/class.ilPropertyFormGUI.php +++ b/components/ILIAS/Form/classes/class.ilPropertyFormGUI.php @@ -26,6 +26,7 @@ * * @author Alexander Killing * @ilCtrl_Calls ilPropertyFormGUI: ilFormPropertyDispatchGUI + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilPropertyFormGUI extends ilFormGUI { diff --git a/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php b/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php index a4f0f10f1162..8008f4ef2761 100755 --- a/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php @@ -22,6 +22,7 @@ * This class represents a property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRadioGroupInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilRadioOption.php b/components/ILIAS/Form/classes/class.ilRadioOption.php index 9fa44840dbf0..9831e6e077cf 100755 --- a/components/ILIAS/Form/classes/class.ilRadioOption.php +++ b/components/ILIAS/Form/classes/class.ilRadioOption.php @@ -22,6 +22,7 @@ * This class represents an option in a radio group * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRadioOption { diff --git a/components/ILIAS/Form/classes/class.ilRegExpInputGUI.php b/components/ILIAS/Form/classes/class.ilRegExpInputGUI.php index 018e0b04894a..5cc161f4c104 100755 --- a/components/ILIAS/Form/classes/class.ilRegExpInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRegExpInputGUI.php @@ -22,6 +22,7 @@ * This class represents a regular expression input property in a property form. * * @author Roland Küstermann + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRegExpInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilRepositorySelector2InputGUI.php b/components/ILIAS/Form/classes/class.ilRepositorySelector2InputGUI.php index 6f64d7a987ae..673b4fa50fae 100755 --- a/components/ILIAS/Form/classes/class.ilRepositorySelector2InputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRepositorySelector2InputGUI.php @@ -23,6 +23,7 @@ * * @author Alexander Killing * @ilCtrl_IsCalledBy ilRepositorySelector2InputGUI: ilFormPropertyDispatchGUI + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRepositorySelector2InputGUI extends ilExplorerSelectInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilRepositorySelectorInputGUI.php b/components/ILIAS/Form/classes/class.ilRepositorySelectorInputGUI.php index 11241b7fddee..d10fc434d388 100755 --- a/components/ILIAS/Form/classes/class.ilRepositorySelectorInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRepositorySelectorInputGUI.php @@ -26,6 +26,7 @@ * * @author Alexander Killing * @ilCtrl_IsCalledBy ilRepositorySelectorInputGUI: ilFormPropertyDispatchGUI + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRepositorySelectorInputGUI extends ilFormPropertyGUI implements ilTableFilterItem { diff --git a/components/ILIAS/Form/classes/class.ilRoleAutoCompleteInputGUI.php b/components/ILIAS/Form/classes/class.ilRoleAutoCompleteInputGUI.php index 9000b331a255..77df2ec5f573 100755 --- a/components/ILIAS/Form/classes/class.ilRoleAutoCompleteInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRoleAutoCompleteInputGUI.php @@ -22,6 +22,7 @@ * This class represents a role + autocomplete feature form input * * @author Stefan Meyer + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilRoleAutoCompleteInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilSelectBuilderInputGUI.php b/components/ILIAS/Form/classes/class.ilSelectBuilderInputGUI.php index 4c4dd590dc61..c8ed26c30d8d 100755 --- a/components/ILIAS/Form/classes/class.ilSelectBuilderInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilSelectBuilderInputGUI.php @@ -23,6 +23,7 @@ * udf field, ... * * @author Stefan Meyer + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilSelectBuilderInputGUI extends ilTextWizardInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilSelectInputGUI.php b/components/ILIAS/Form/classes/class.ilSelectInputGUI.php index 9225b7fe3054..74c433c8196d 100755 --- a/components/ILIAS/Form/classes/class.ilSelectInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilSelectInputGUI.php @@ -22,6 +22,7 @@ * This class represents a selection list property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilSelectInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem, ilToolbarItem, ilMultiValuesItem { diff --git a/components/ILIAS/Form/classes/class.ilSubEnabledFormPropertyGUI.php b/components/ILIAS/Form/classes/class.ilSubEnabledFormPropertyGUI.php index 9202ebc7979c..5c5728080eb8 100755 --- a/components/ILIAS/Form/classes/class.ilSubEnabledFormPropertyGUI.php +++ b/components/ILIAS/Form/classes/class.ilSubEnabledFormPropertyGUI.php @@ -22,6 +22,7 @@ * This class represents a property that may include a sub form * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilSubEnabledFormPropertyGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php index 285b7905e302..a87c1430ae2f 100755 --- a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text area property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilTextAreaInputGUI extends ilSubEnabledFormPropertyGUI { @@ -43,6 +44,7 @@ class ilTextAreaInputGUI extends ilSubEnabledFormPropertyGUI protected bool $usePurifier = false; protected ?ilHtmlPurifierInterface $Purifier = null; protected ?string $root_block_element = null; + private ilObjUser $user; protected array $rte_tag_set = array( "mini" => array("strong", "em", "u", "ol", "li", "ul", "blockquote", "a", "p", "span", "br"), // #13286/#17981 @@ -81,6 +83,7 @@ public function __construct( global $DIC; $this->lng = $DIC->language(); + $this->user = $DIC->user(); parent::__construct($a_title, $a_postvar); $this->setType("textarea"); $this->setRteTagSet("standard"); @@ -358,7 +361,15 @@ public function insert(ilTemplate $a_tpl): void } if (count($this->rteSupport) >= 3) { - $rte->addRTESupport($this->rteSupport["obj_id"], $this->rteSupport["obj_type"], $this->rteSupport["module"], false, $this->rteSupport['cfg_template']); + $rte->addRTESupport( + $this->lng, + $this->user, + $this->rteSupport["obj_id"], + $this->rteSupport["obj_type"], + $this->rteSupport["module"], + false, + $this->rteSupport['cfg_template'] + ); } else { // disable all plugins for mini-tagset if (!array_diff($this->getRteTags(), $this->getRteTagSet("mini"))) { diff --git a/components/ILIAS/Form/classes/class.ilTextInputGUI.php b/components/ILIAS/Form/classes/class.ilTextInputGUI.php index 88153d540e6c..6d58518cca58 100755 --- a/components/ILIAS/Form/classes/class.ilTextInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilTextInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilTextInputGUI extends ilSubEnabledFormPropertyGUI implements ilTableFilterItem, ilToolbarItem, ilMultiValuesItem { diff --git a/components/ILIAS/Form/classes/class.ilTextWizardInputGUI.php b/components/ILIAS/Form/classes/class.ilTextWizardInputGUI.php index 89100c2467fa..6270bc22bb82 100755 --- a/components/ILIAS/Form/classes/class.ilTextWizardInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilTextWizardInputGUI.php @@ -22,6 +22,7 @@ * This class represents a text wizard property in a property form. * * @author Helmut Schottmüller + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilTextWizardInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilUriInputGUI.php b/components/ILIAS/Form/classes/class.ilUriInputGUI.php index 70dc0bcc0817..743e000fd15a 100755 --- a/components/ILIAS/Form/classes/class.ilUriInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilUriInputGUI.php @@ -24,6 +24,7 @@ * Legacy Uri input * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilUriInputGUI extends ilTextInputGUI { diff --git a/components/ILIAS/Form/classes/class.ilUserLoginInputGUI.php b/components/ILIAS/Form/classes/class.ilUserLoginInputGUI.php index 58dc3a0190ab..aa963af8d491 100755 --- a/components/ILIAS/Form/classes/class.ilUserLoginInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilUserLoginInputGUI.php @@ -22,6 +22,7 @@ * This class represents a user login property in a property form. * * @author Alexander Killing + * @deprecated 12 This component will be removed with ILIAS 12 */ class ilUserLoginInputGUI extends ilFormPropertyGUI { diff --git a/components/ILIAS/Forum/classes/Purifier/class.ilHtmlForumPostPurifier.php b/components/ILIAS/Forum/classes/Purifier/class.ilHtmlForumPostPurifier.php index 1e8208ee0719..af1aa0a0b7f9 100755 --- a/components/ILIAS/Forum/classes/Purifier/class.ilHtmlForumPostPurifier.php +++ b/components/ILIAS/Forum/classes/Purifier/class.ilHtmlForumPostPurifier.php @@ -32,7 +32,7 @@ protected function getPurifierConfigInstance(): HTMLPurifier_Config $config->set('Cache.SerializerPath', ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory()); $config->set('HTML.Doctype', 'XHTML 1.0 Strict'); - $tags = ilObjAdvancedEditing::_getUsedHTMLTags('frm_post'); + $tags = ilRTESettings::_getUsedHTMLTags('frm_post'); $tags = $this->makeElementListTinyMceCompliant($tags); $config->set('HTML.AllowedElements', $this->removeUnsupportedElements($tags)); $config->set('HTML.ForbiddenAttributes', 'div@style'); diff --git a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php index ed84b94360cd..01c5f581b630 100755 --- a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php +++ b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php @@ -2314,10 +2314,10 @@ static function (string $id) use ($form_id): string { (function () { const button = document.getElementById('$id'); if (!button) return; - + const form = document.getElementById('form_$form_id'); if (!form) return; - + button.addEventListener('click', (event) => { event.preventDefault(); form.submit(); @@ -2599,7 +2599,7 @@ private function initReplyEditForm(): void ); if ($show_rte) { - ilObjAdvancedEditing::_setRichTextEditorUserState($show_rte); + (new ilRTESettings($this->lng, $this->user))->setRichTextEditorUserState($show_rte); } if ($quotingAllowed) { @@ -3604,12 +3604,12 @@ static function (ilForumPost $post) use ($draft): bool { document.querySelectorAll('.ilFrmPostContent img').forEach((img) => { const maxWidth = img.getAttribute('width'); const maxHeight = img.getAttribute('height'); - + if (maxWidth) { img.style.maxWidth = maxWidth + 'px'; img.removeAttribute('width'); } - + if (maxHeight) { img.style.maxHeight = maxHeight + 'px'; img.removeAttribute('height'); @@ -4602,7 +4602,7 @@ protected function initHeaderAction(?string $sub_type = null, ?int $sub_id = nul (function () { const button = document.getElementById('$id'); if (!button) return; - + const modalDialog = button.closest('.modal-dialog'); if (!modalDialog) return; @@ -5805,10 +5805,10 @@ static function (string $id) use ($form_id): string { (function () { const button = document.getElementById('$id'); if (!button) return; - + const form = document.getElementById('$form_id'); if (!form) return; - + button.addEventListener('click', (event) => { event.preventDefault(); form.submit(); diff --git a/components/ILIAS/History/History.php b/components/ILIAS/History/History.php index 74f4ef73d015..83e94a2893a9 100644 --- a/components/ILIAS/History/History.php +++ b/components/ILIAS/History/History.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class History implements Component\Component { public function init( diff --git a/components/ILIAS/History/classes/class.ilHistory.php b/components/ILIAS/History/classes/class.ilHistory.php index f911214be8e6..65154e6b8682 100755 --- a/components/ILIAS/History/classes/class.ilHistory.php +++ b/components/ILIAS/History/classes/class.ilHistory.php @@ -20,6 +20,7 @@ * This class methods for maintain history enties for objects * * @author Alexander Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilHistory { diff --git a/components/ILIAS/History/classes/class.ilHistoryTableGUI.php b/components/ILIAS/History/classes/class.ilHistoryTableGUI.php index 849bb69ab5be..b5c437a06d15 100755 --- a/components/ILIAS/History/classes/class.ilHistoryTableGUI.php +++ b/components/ILIAS/History/classes/class.ilHistoryTableGUI.php @@ -20,6 +20,7 @@ * Lists History entrys in chronological order * * @author Fabian Wolf + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilHistoryTableGUI extends ilTable2GUI { diff --git a/components/ILIAS/ILIASObject/ILIASObject.php b/components/ILIAS/ILIASObject/ILIASObject.php index 1820eb87ae9c..07a477437438 100644 --- a/components/ILIAS/ILIASObject/ILIASObject.php +++ b/components/ILIAS/ILIASObject/ILIASObject.php @@ -36,5 +36,9 @@ public function init( new \ILIAS\Object\Setup\ilObjectSetupAgent( $pull[\ILIAS\Refinery\Factory::class] ); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\ComponentJS($this, "ilContainer.js"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\ComponentJS($this, "ilCopyRedirection.js"); } } diff --git a/components/ILIAS/CopyWizard/classes/class.ilCopyWizardOptions.php b/components/ILIAS/ILIASObject/classes/CopyWizard/class.ilCopyWizardOptions.php similarity index 100% rename from components/ILIAS/CopyWizard/classes/class.ilCopyWizardOptions.php rename to components/ILIAS/ILIASObject/classes/CopyWizard/class.ilCopyWizardOptions.php diff --git a/components/ILIAS/ILIASObject/classes/class.ilListItemAccessCache.php b/components/ILIAS/ILIASObject/classes/class.ilListItemAccessCache.php deleted file mode 100755 index a51c489db6f3..000000000000 --- a/components/ILIAS/ILIASObject/classes/class.ilListItemAccessCache.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ -class ilListItemAccessCache extends ilCache -{ - public static bool $disabled = false; - - protected ilSetting $settings; - - public function __construct() - { - global $DIC; - - $this->settings = $DIC->settings(); - parent::__construct("ServicesObject", "CheckAccess"); - $this->setExpiresAfter(0); - self::$disabled = true; - } - - /** - * Check if cache is disabled - */ - public function isDisabled(): bool - { - return self::$disabled or parent::isDisabled(); - } - - /** - * Read an entry - */ - protected function readEntry(string $id): bool - { - if (!$this->isDisabled()) { - return parent::readEntry($id); - } - return false; - } - - - /** - * Id is user_id:ref_id, we store ref_if additionally - */ - public function storeEntry( - string $id, - string $value, - ?int $int_key1 = null, - ?int $int_key2 = null, - ?string $text_key1 = null, - ?string $text_key2 = null - ): void { - if (!$this->isDisabled()) { - parent::storeEntry($id, $value, $int_key1); - } - } - - /** - * This one can be called, e.g. - */ - public function deleteByRefId(int $ref_id): void - { - parent::deleteByAdditionalKeys($ref_id); - } -} diff --git a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php index 2fd824b52bf3..73371f4548a8 100755 --- a/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php +++ b/components/ILIAS/ILIASObject/classes/class.ilObjectListGUI.php @@ -2696,17 +2696,6 @@ public function adminCommandsIncluded(): bool return $this->adm_commands_included; } - public function storeAccessCache(): void - { - if ($this->acache->getLastAccessStatus() == 'miss' && !$this->prevent_access_caching) { - $this->acache->storeEntry( - $this->user->getId() . ':' . $this->ref_id, - serialize($this->access_cache), - $this->ref_id - ); - } - } - /** * Get all item information (title, commands, description) in HTML */ @@ -2739,16 +2728,6 @@ public function getListItemHTML( } } - // read from cache - $this->acache = new ilListItemAccessCache(); - $cres = $this->acache->getEntry($this->user->getId() . ':' . $ref_id); - if ($this->acache->getLastAccessStatus() == 'hit') { - $this->access_cache = unserialize($cres); - } else { - // write to cache - $this->storeAccessCache(); - } - // visible check if (!$this->checkCommandAccess('visible', '', $ref_id, '', $obj_id)) { $this->resetCustomData(); diff --git a/components/ILIAS/CopyWizard/resources/ilContainer.js b/components/ILIAS/ILIASObject/resources/ilContainer.js similarity index 100% rename from components/ILIAS/CopyWizard/resources/ilContainer.js rename to components/ILIAS/ILIASObject/resources/ilContainer.js diff --git a/components/ILIAS/CopyWizard/resources/ilCopyRedirection.js b/components/ILIAS/ILIASObject/resources/ilCopyRedirection.js similarity index 100% rename from components/ILIAS/CopyWizard/resources/ilCopyRedirection.js rename to components/ILIAS/ILIASObject/resources/ilCopyRedirection.js diff --git a/components/ILIAS/CopyWizard/templates/default/tpl.copy_wizard_block.html b/components/ILIAS/ILIASObject/templates/default/tpl.copy_wizard_block.html old mode 100755 new mode 100644 similarity index 100% rename from components/ILIAS/CopyWizard/templates/default/tpl.copy_wizard_block.html rename to components/ILIAS/ILIASObject/templates/default/tpl.copy_wizard_block.html diff --git a/components/ILIAS/Exceptions/classes/class.ilDelegatingHandler.php b/components/ILIAS/Init/classes/ErrorHandling/class.ilDelegatingHandler.php similarity index 100% rename from components/ILIAS/Exceptions/classes/class.ilDelegatingHandler.php rename to components/ILIAS/Init/classes/ErrorHandling/class.ilDelegatingHandler.php diff --git a/components/ILIAS/Exceptions/classes/class.ilPlainTextHandler.php b/components/ILIAS/Init/classes/ErrorHandling/class.ilPlainTextHandler.php similarity index 100% rename from components/ILIAS/Exceptions/classes/class.ilPlainTextHandler.php rename to components/ILIAS/Init/classes/ErrorHandling/class.ilPlainTextHandler.php diff --git a/components/ILIAS/Exceptions/classes/class.ilSoapExceptionHandler.php b/components/ILIAS/Init/classes/ErrorHandling/class.ilSoapExceptionHandler.php similarity index 100% rename from components/ILIAS/Exceptions/classes/class.ilSoapExceptionHandler.php rename to components/ILIAS/Init/classes/ErrorHandling/class.ilSoapExceptionHandler.php diff --git a/components/ILIAS/Exceptions/classes/class.ilTestingHandler.php b/components/ILIAS/Init/classes/ErrorHandling/class.ilTestingHandler.php similarity index 100% rename from components/ILIAS/Exceptions/classes/class.ilTestingHandler.php rename to components/ILIAS/Init/classes/ErrorHandling/class.ilTestingHandler.php diff --git a/components/ILIAS/LegalDocuments/classes/HTMLPurifier.php b/components/ILIAS/LegalDocuments/classes/HTMLPurifier.php index 44008c11f2ad..9110c029f941 100755 --- a/components/ILIAS/LegalDocuments/classes/HTMLPurifier.php +++ b/components/ILIAS/LegalDocuments/classes/HTMLPurifier.php @@ -20,7 +20,7 @@ namespace ILIAS\LegalDocuments; -use ilObjAdvancedEditing; +use ilRTESettings; use ilHtmlPurifierAbstractLibWrapper; use HTMLPurifier_Config; use Closure; @@ -44,7 +44,7 @@ public function __construct( ?Closure $create_config = null ) { $this->cache_directory = $cache_directory ?? ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory(); - $this->allowed_tags = $allowed_tags ?? ilObjAdvancedEditing::_getUsedHTMLTags('textarea'); + $this->allowed_tags = $allowed_tags ?? ilRTESettings::_getUsedHTMLTags('textarea'); $this->create_config = $create_config ?? HTMLPurifier_Config::createDefault(...); parent::__construct(); } diff --git a/components/ILIAS/Link/Link.php b/components/ILIAS/Link/Link.php index ef4dce938acb..c34686ca1ea6 100644 --- a/components/ILIAS/Link/Link.php +++ b/components/ILIAS/Link/Link.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class Link implements Component\Component { public function init( diff --git a/components/ILIAS/Link/classes/class.ilLinkifyUtil.php b/components/ILIAS/Link/classes/class.ilLinkifyUtil.php index 9a3a6d5cb1a9..9702ed6805f3 100755 --- a/components/ILIAS/Link/classes/class.ilLinkifyUtil.php +++ b/components/ILIAS/Link/classes/class.ilLinkifyUtil.php @@ -21,6 +21,7 @@ /** * Linkify utility class * @author Alexander Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilLinkifyUtil { diff --git a/components/ILIAS/Multilingualism/Multilingualism.php b/components/ILIAS/Multilingualism/Multilingualism.php deleted file mode 100644 index 67d40f35d3e0..000000000000 --- a/components/ILIAS/Multilingualism/Multilingualism.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class MultilingualismStandardGUIRequestTest extends TestCase -{ - protected function tearDown(): void - { - } - - protected function getRequest(array $get, array $post): \ILIAS\Multilingualism\StandardGUIRequest - { - $http_mock = $this->createMock(ILIAS\HTTP\Services::class); - $lng_mock = $this->createMock(ilLanguage::class); - $data = new \ILIAS\Data\Factory(); - $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock); - return new \ILIAS\Multilingualism\StandardGUIRequest( - $http_mock, - $refinery, - $get, - $post - ); - } - - public function testRefId(): void - { - $request = $this->getRequest( - [ - ], - [ - "lang" => [ - "en" => "English", - "de" => "German" - ] - ] - ); - - $this->assertEquals( - [ - "en" => "English", - "de" => "German" - ], - $request->getLanguages() - ); - } -} diff --git a/components/ILIAS/Cache_/classes/class.ilCache.php b/components/ILIAS/News/classes/class.ilCache.php similarity index 100% rename from components/ILIAS/Cache_/classes/class.ilCache.php rename to components/ILIAS/News/classes/class.ilCache.php diff --git a/components/ILIAS/PermanentLink/PermanentLink.php b/components/ILIAS/PermanentLink/PermanentLink.php index 99ec79e8bec9..083013566c37 100644 --- a/components/ILIAS/PermanentLink/PermanentLink.php +++ b/components/ILIAS/PermanentLink/PermanentLink.php @@ -20,6 +20,10 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + * + */ class PermanentLink implements Component\Component { public function init( diff --git a/components/ILIAS/PermanentLink/classes/class.ilLink.php b/components/ILIAS/PermanentLink/classes/class.ilLink.php index e4b87a2b38d2..17b8c23e7ea1 100755 --- a/components/ILIAS/PermanentLink/classes/class.ilLink.php +++ b/components/ILIAS/PermanentLink/classes/class.ilLink.php @@ -20,7 +20,7 @@ use ILIAS\Data\ReferenceId; /** - * @deprecated Use ILIAS\components\StaticURL instead + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilLink { diff --git a/components/ILIAS/QTI/maintenance.json b/components/ILIAS/QTI/maintenance.json deleted file mode 100755 index a89c22091fd1..000000000000 --- a/components/ILIAS/QTI/maintenance.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "", - "second_maintainer": "", - "implicit_maintainers": [], - "coordinator": [ - "" - ], - "tester": "", - "testcase_writer": "", - "path": "Services/QTI", - "belong_to_component": "None", - "used_in_components": [ - "AssessmentQuestion" - ] -} \ No newline at end of file diff --git a/components/ILIAS/QTI/phpunit.xml b/components/ILIAS/QTI/phpunit.xml deleted file mode 100755 index 1a700edc3c54..000000000000 --- a/components/ILIAS/QTI/phpunit.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - classes - - - - - - - ./test/ilServicesQTISuite.php - - - - - diff --git a/components/ILIAS/QTI/tests/ilQTIMatImageSecurityTest.php b/components/ILIAS/QTI/tests/ilQTIMatImageSecurityTest.php deleted file mode 100755 index 44d1d25bbf1f..000000000000 --- a/components/ILIAS/QTI/tests/ilQTIMatImageSecurityTest.php +++ /dev/null @@ -1,43 +0,0 @@ -assertInstanceOf( - ilQtiMatImageSecurity::class, - new ilQtiMatImageSecurity( - $this->image(), - $this->createMock(\ILIAS\TestQuestionPool\Questions\Files\QuestionFiles::class) - ) - ); - } - - private function image(): ilQTIMatimage - { - $image = $this->getMockBuilder(ilQTIMatimage::class)->disableOriginalConstructor()->getMock(); - $image->expects(self::exactly(2))->method('getRawContent')->willReturn('Ayayay'); - - return $image; - } -} diff --git a/components/ILIAS/RTE/classes/class.ilRTE.php b/components/ILIAS/RTE/classes/class.ilRTE.php index c99c98303418..7885a8ed2a38 100755 --- a/components/ILIAS/RTE/classes/class.ilRTE.php +++ b/components/ILIAS/RTE/classes/class.ilRTE.php @@ -19,6 +19,7 @@ declare(strict_types=1); use ILIAS\HTTP\Agent\AgentDetermination; +use ILIAS\Language\Language; /** * Rich Text Editor base class @@ -100,6 +101,8 @@ public function removeButton(string $a_button_name): void } public function addRTESupport( + Language $lng, + ilObjUser $user, int $obj_id, string $obj_type, string $a_module = '', @@ -124,7 +127,8 @@ public function addCustomRTESupport(int $obj_id, string $obj_type, array $tags): public static function _getRTEClassname(): string { - $editor = ilObjAdvancedEditing::_getRichTextEditor(); + global $DIC; + $editor = (new ilRTESettings($DIC['lng'], $DIC['ilUser']))->getRichTextEditor(); if (strtolower($editor) === 'tinymce') { return ilTinyMCE::class; } diff --git a/components/ILIAS/RTE/classes/class.ilRTESettingsGUI.php b/components/ILIAS/RTE/classes/class.ilRTESettingsGUI.php new file mode 100755 index 000000000000..c2d33da8947a --- /dev/null +++ b/components/ILIAS/RTE/classes/class.ilRTESettingsGUI.php @@ -0,0 +1,215 @@ + + */ +class ilRTESettingsGUI +{ + private ilRTESettings $settings; + + public function __construct( + private readonly int $ref_id, + private readonly ilGlobalTemplateInterface $tpl, + private readonly ilCtrlInterface $ctrl, + private readonly Language $lng, + private readonly ilAccessHandler $access, + ilObjUser $current_user, + ilTabsGUI $tabs_gui + ) { + $this->settings = new ilRTESettings($this->lng, $current_user); + $this->addSubTabs($tabs_gui); + } + + private function addSubtabs(ilTabsGUI $tabs_gui): void + { + $tabs_gui->addSubTabTarget( + 'adve_general_settings', + $this->ctrl->getLinkTargetByClass([ilObjAdvancedEditingGUI::class, self::class], 'settings'), + ['settings', 'saveSettings'], + '', + '' + ); + $tabs_gui->addSubTabTarget( + 'adve_assessment_settings', + $this->ctrl->getLinkTargetByClass([ilObjAdvancedEditingGUI::class, self::class], 'assessment'), + ['assessment', 'saveAssessmentSettings'], + '', + '' + ); + $tabs_gui->addSubTabTarget( + 'adve_frm_post_settings', + $this->ctrl->getLinkTargetByClass([ilObjAdvancedEditingGUI::class, self::class], 'frmPost'), + ['frmPost', 'saveFrmPostSettings'], + '', + '' + ); + } + + public function settings(): void + { + $tpl = $this->tpl; + $form = $this->getTinyForm(); + $tpl->setContent($form->getHTML()); + } + + public function getTinyForm(): ilPropertyFormGUI + { + $form = new ilPropertyFormGUI(); + $form->setFormAction($this->ctrl->getFormAction($this)); + $form->setTitle($this->lng->txt("adve_activation")); + $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_tiny_mce"), "use_tiny"); + if ($this->settings->getRichTextEditor() === "tinymce") { + $cb->setChecked(true); + } + $form->addItem($cb); + if ($this->access->checkAccess('write', '', $this->ref_id)) { + $form->addCommandButton("saveSettings", $this->lng->txt("save")); + } + + return $form; + } + + public function saveSettings(): void + { + if (!$this->access->checkAccess('write', '', $this->ref_id)) { + $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_perm_read'), true); + return; + } + + $form = $this->getTinyForm(); + $form->checkInput(); + + if ($form->getInput('use_tiny')) { + $this->settings->setRichTextEditor('tinymce'); + } else { + $this->settings->setRichTextEditor(''); + } + $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true); + + $this->ctrl->redirect($this, 'settings'); + } + + public function assessment(): void + { + $form = $this->initTagsForm( + "assessment", + "saveAssessmentSettings", + "advanced_editing_assessment_settings" + ); + + $this->tpl->setContent($form->getHTML()); + } + + public function saveAssessmentSettings(): void + { + $form = $this->initTagsForm( + "assessment", + "saveAssessmentSettings", + "advanced_editing_assessment_settings" + ); + if (!$this->saveTags("assessment", "assessment", $form)) { + $form->setValuesByPost(); + $this->tpl->setContent($form->getHTML()); + } + } + + public function frmPost(): void + { + $form = $this->initTagsForm( + "frm_post", + "saveFrmPostSettings", + "advanced_editing_frm_post_settings" + ); + + $this->tpl->setContent($form->getHTML()); + } + + public function saveFrmPostSettings(): void + { + $form = $this->initTagsForm( + "frm_post", + "saveFrmPostSettings", + "advanced_editing_frm_post_settings" + ); + if (!$this->saveTags("frm_post", "frmPost", $form)) { + $form->setValuesByPost(); + $this->tpl->setContent($form->getHTML()); + } + } + + protected function initTagsForm( + string $a_id, + string $a_cmd, + string $a_title + ): ilPropertyFormGUI { + $form = new ilPropertyFormGUI(); + $form->setFormAction($this->ctrl->getFormAction($this, $a_cmd)); + $form->setTitle($this->lng->txt($a_title)); + + $tags = new ilMultiSelectInputGUI($this->lng->txt("advanced_editing_allow_html_tags"), "html_tags"); + $tags->setHeight(400); + $tags->enableSelectAll(true); + $tags->enableSelectedFirst(true); + $tags->setOptions( + array_combine($this->settings->getAllAvailableHTMLTags(), $this->settings->getAllAvailableHTMLTags()) + ); + $tags->setValue(ilRTESettings::_getUsedHTMLTags($a_id)); + $form->addItem($tags); + + if ($this->access->checkAccess('write', '', $this->ref_id)) { + $form->addCommandButton($a_cmd, $this->lng->txt("save")); + } + + return $form; + } + + protected function saveTags( + string $a_id, + string $a_cmd, + ilPropertyFormGUI $form + ): bool { + if (!$this->access->checkAccess('write', '', $this->ref_id)) { + $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_perm_read'), true); + return false; + } + try { + if ($form->checkInput()) { + $html_tags = $form->getInput("html_tags"); + // get rid of select all + if (array_key_exists(0, $html_tags) && (string) $html_tags[0] === '') { + unset($html_tags[0]); + } + $this->settings->setUsedHTMLTags((array) $html_tags, $a_id); + $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true); + } else { + return false; + } + } catch (ilAdvancedEditingRequiredTagsException $e) { + $this->tpl->setOnScreenMessage('info', $e->getMessage(), true); + } + $this->ctrl->redirect($this, $a_cmd); + return true; + } +} diff --git a/components/ILIAS/RTE/classes/class.ilTinyMCE.php b/components/ILIAS/RTE/classes/class.ilTinyMCE.php index 6f32e2a72ff3..1f0f3f96e62b 100755 --- a/components/ILIAS/RTE/classes/class.ilTinyMCE.php +++ b/components/ILIAS/RTE/classes/class.ilTinyMCE.php @@ -18,6 +18,8 @@ declare(strict_types=1); +use ILIAS\Language\Language; + /** * Tiny MCE editor class * @@ -75,21 +77,24 @@ public function getPlugins(): array } public function addRTESupport( + Language $lng, + ilObjUser $user, int $obj_id, string $obj_type, string $a_module = '', bool $allowFormElements = false, ?string $cfg_template = null ): void { + $settings = new ilRTESettings($lng, $user); if ($this->browser->isMobile()) { - ilObjAdvancedEditing::_setRichTextEditorUserState(0); + $settings->setRichTextEditorUserState(0); } else { - ilObjAdvancedEditing::_setRichTextEditorUserState(1); + $settings->setRichTextEditorUserState(1); } if ( - ilObjAdvancedEditing::_getRichTextEditorUserState() !== 0 && - strcmp(ilObjAdvancedEditing::_getRichTextEditor(), "0") !== 0 + $settings->getRichTextEditorUserState() !== 0 && + strcmp($settings->getRichTextEditor(), '0') !== 0 ) { $tpl = new ilTemplate( ($cfg_template ?? "tpl.tinymce.js"), @@ -98,7 +103,7 @@ public function addRTESupport( "components/ILIAS/RTE" ); - $tags = ilObjAdvancedEditing::_getUsedHTMLTags($a_module); + $tags = ilRTESettings::_getUsedHTMLTags($a_module); if ($allowFormElements) { $tpl->touchBlock("formelements"); } diff --git a/components/ILIAS/RTE/classes/ilRTESettings.php b/components/ILIAS/RTE/classes/ilRTESettings.php new file mode 100755 index 000000000000..ad2dcde4bdc0 --- /dev/null +++ b/components/ILIAS/RTE/classes/ilRTESettings.php @@ -0,0 +1,224 @@ +advanced_editing = new ilSetting('advanced_editing'); + } + + public static function _getUsedHTMLTags(string $module = ''): array + { + $tags = (new ilSetting('advanced_editing'))->get('advanced_editing_used_html_tags_' . $module, ''); + + if ($tags === '') { + if ($module === 'frm_post' || $module === 'exc_ass') { + return self::DEFAULT_FORUM_AND_EXERCISE_TAGS; + } + return self::DEFAULT_TAGS; + } + + $usedtags = unserialize($tags, ['allowed_classes' => false]); + if ($module !== 'frm_post') { + return $usedtags; + } + + if (!in_array('div', $usedtags, true)) { + $usedtags[] = 'div'; + } + + if (!in_array('blockquote', $usedtags, true)) { + $usedtags[] = 'blockquote'; + } + + return $usedtags; + } + + public static function _getUsedHTMLTagsAsString(string $module = ''): string + { + return array_reduce( + self::_getUsedHTMLTags(), + static fn(string $c, string $v): string => $c . '<$v>', + '' + ); + } + + public function getRichTextEditor(): string + { + return $this->advanced_editing->get('advanced_editing_javascript_editor', '0'); + } + + public function setRichTextEditor(string $js_editor): void + { + $this->advanced_editing->set('advanced_editing_javascript_editor', $js_editor); + } + + public function setUsedHTMLTags( + array $html_tags, + string $module + ): void { + if ($module === '') { + return; + } + + $auto_added_tags = []; + if ($module === 'frm_post') { + if (!in_array('div', $html_tags, true)) { + $auto_added_tags[] = 'div'; + } + + if (!in_array('blockquote', $html_tags, true)) { + $auto_added_tags[] = 'blockquote'; + } + } + + $this->advanced_editing->set( + 'advanced_editing_used_html_tags_' . $module, + serialize(array_merge($html_tags, $auto_added_tags)) + ); + + if ($auto_added_tags !== []) { + throw new ilAdvancedEditingRequiredTagsException( + sprintf( + $this->lng->txt('advanced_editing_required_tags'), + implode(', ', $auto_added_tags) + ) + ); + } + } + + public function getAllAvailableHTMLTags(): array + { + return self::ALL_AVAILABLE_TAGS; + } + + public function setRichTextEditorUserState(int $state): void + { + $this->current_user->writePref('show_rte', (string) $state); + } + + public function getRichTextEditorUserState(): int + { + + if ($this->current_user->getPref('show_rte') !== '') { + return (int) $this->current_user->getPref('show_rte'); + } + return 1; + } +} diff --git a/components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingRequiredTagsException.php b/components/ILIAS/RTE/exceptions/class.ilAdvancedEditingRequiredTagsException.php similarity index 87% rename from components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingRequiredTagsException.php rename to components/ILIAS/RTE/exceptions/class.ilAdvancedEditingRequiredTagsException.php index 48668d448e35..5fd397d182a6 100755 --- a/components/ILIAS/AdvancedEditing/exceptions/class.ilAdvancedEditingRequiredTagsException.php +++ b/components/ILIAS/RTE/exceptions/class.ilAdvancedEditingRequiredTagsException.php @@ -18,6 +18,6 @@ * * @author Michael Jansen */ -class ilAdvancedEditingRequiredTagsException extends ilAdvancedEditingException +class ilAdvancedEditingRequiredTagsException extends ilException { } diff --git a/components/ILIAS/SOAPAuth/SOAPAuth.php b/components/ILIAS/SOAPAuth/SOAPAuth.php deleted file mode 100644 index 1efcc55e1729..000000000000 --- a/components/ILIAS/SOAPAuth/SOAPAuth.php +++ /dev/null @@ -1,37 +0,0 @@ -getInput("heading"), true, - ilObjAdvancedEditing::_getUsedHTMLTagsAsString("survey") + ilRTESettings::_getUsedHTMLTagsAsString("survey") ), $form->getInput("insertbefore") ); diff --git a/components/ILIAS/Survey/Settings/class.SettingsFormGUI.php b/components/ILIAS/Survey/Settings/class.SettingsFormGUI.php index dabd72ece86a..12e5d37315d1 100755 --- a/components/ILIAS/Survey/Settings/class.SettingsFormGUI.php +++ b/components/ILIAS/Survey/Settings/class.SettingsFormGUI.php @@ -313,7 +313,7 @@ public function withBeforeStart( $intro->setRows(10); $intro->setCols(80); $intro->setInfo($lng->txt("survey_introduction_info")); - if (\ilObjAdvancedEditing::_getRichTextEditor() === "tinymce") { + if ((new \ilRTESettings($this->domain_service->lng(), $this->domain_service->user()))->getRichTextEditor() === "tinymce") { $intro->setUseRte(true); $intro->setRteTagSet("mini"); } @@ -431,7 +431,7 @@ public function withAfterEnd( $finalstatement->setValue($survey->prepareTextareaOutput($survey->getOutro())); $finalstatement->setRows(10); $finalstatement->setCols(80); - if (\ilObjAdvancedEditing::_getRichTextEditor() === "tinymce") { + if ((new \ilRTESettings($this->domain_service->lng(), $this->domain_service->user()))->getRichTextEditor() === "tinymce") { $finalstatement->setUseRte(true); $finalstatement->setRteTagSet("mini"); } diff --git a/components/ILIAS/Survey/classes/class.ilObjSurvey.php b/components/ILIAS/Survey/classes/class.ilObjSurvey.php index bd08694220d9..c236c54658bd 100755 --- a/components/ILIAS/Survey/classes/class.ilObjSurvey.php +++ b/components/ILIAS/Survey/classes/class.ilObjSurvey.php @@ -3430,7 +3430,7 @@ public function cloneTextblocks( ): void { foreach ($mapping as $original_id => $new_id) { $textblock = $this->getTextblock($original_id); - $this->saveHeading(ilUtil::stripSlashes($textblock, true, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("survey")), $new_id); + $this->saveHeading(ilUtil::stripSlashes($textblock, true, ilRTESettings::_getUsedHTMLTagsAsString("survey")), $new_id); } } diff --git a/components/ILIAS/SurveyQuestionPool/Questions/class.SurveyQuestionGUI.php b/components/ILIAS/SurveyQuestionPool/Questions/class.SurveyQuestionGUI.php index e5d53d817aa5..d7fd4f56276f 100755 --- a/components/ILIAS/SurveyQuestionPool/Questions/class.SurveyQuestionGUI.php +++ b/components/ILIAS/SurveyQuestionPool/Questions/class.SurveyQuestionGUI.php @@ -258,7 +258,7 @@ protected function initEditForm(): ilPropertyFormGUI $question->setRequired(true); $question->setRows(10); $question->setCols(80); - if (ilObjAdvancedEditing::_getRichTextEditor() === "tinymce") { + if ((new \ilRTESettings($this->lng, $this->user))->getRichTextEditor() === "tinymce") { $question->setUseRte(true); $question->setRteTagSet("mini"); } diff --git a/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByParticipantGUI.php b/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByParticipantGUI.php index f69ea8c6d7a2..cdc0f4d1715e 100755 --- a/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByParticipantGUI.php +++ b/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByParticipantGUI.php @@ -270,7 +270,7 @@ private function saveManScoringParticipantScreen(bool $redirect = true): bool $feedback_text = \ilUtil::stripSlashes( (string) $form->getItemByPostVar("question__{$question_id}__feedback")->getValue(), false, - \ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment") + \ilRTESettings::_getUsedHTMLTagsAsString("assessment") ); $this->object->saveManualFeedback( diff --git a/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByQuestionGUI.php b/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByQuestionGUI.php index ca2ba386c984..3cd504371eda 100755 --- a/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByQuestionGUI.php +++ b/components/ILIAS/Test/src/Scoring/Manual/class.TestScoringByQuestionGUI.php @@ -198,7 +198,7 @@ protected function saveManScoringByQuestion(): void $feedback_text = \ilUtil::stripSlashes( $form->getInput('feedback'), false, - \ilObjAdvancedEditing::_getUsedHTMLTagsAsString('assessment') + \ilRTESettings::_getUsedHTMLTagsAsString('assessment') ); } if ($new_reached_points !== $previously_reached_points) { @@ -496,7 +496,7 @@ private function initJavascript(): void $this->tpl->addJavaScript($math_jax_setting->get('path_to_mathjax')); } - if (\ilObjAdvancedEditing::_getRichTextEditor() === 'tinymce') { + if ((new \ilRTESettings($this->lng, $this->user))->getRichTextEditor() === 'tinymce') { $this->initTinymce(); } } diff --git a/components/ILIAS/QTI/classes/class.ilQTIAssessment.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIAssessment.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIAssessment.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIAssessment.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIAssessmentcontrol.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIAssessmentcontrol.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIAssessmentcontrol.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIAssessmentcontrol.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIConditionvar.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIConditionvar.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIConditionvar.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIConditionvar.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIDecvar.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIDecvar.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIDecvar.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIDecvar.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIDisplayfeedback.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIDisplayfeedback.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIDisplayfeedback.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIDisplayfeedback.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIFlowMat.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIFlowMat.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIFlowMat.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIFlowMat.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIItem.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIItem.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIItem.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIItem.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIItemfeedback.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIItemfeedback.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIItemfeedback.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIItemfeedback.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIMatapplet.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMatapplet.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIMatapplet.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMatapplet.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIMaterial.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMaterial.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIMaterial.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMaterial.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIMatimage.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMatimage.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIMatimage.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMatimage.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIMattext.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMattext.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIMattext.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIMattext.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIObjectives.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIObjectives.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIObjectives.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIObjectives.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIOutcomes.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIOutcomes.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIOutcomes.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIOutcomes.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIParser.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIParser.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIParser.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIParser.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIPresentation.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIPresentation.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIPresentation.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIPresentation.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIPresentationMaterial.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIPresentationMaterial.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIPresentationMaterial.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIPresentationMaterial.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIRenderChoice.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderChoice.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIRenderChoice.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderChoice.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIRenderFib.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderFib.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIRenderFib.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderFib.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIRenderHotspot.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderHotspot.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIRenderHotspot.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRenderHotspot.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIRespcondition.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRespcondition.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIRespcondition.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIRespcondition.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIResponse.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponse.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIResponse.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponse.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIResponseLabel.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponseLabel.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIResponseLabel.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponseLabel.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIResponseVar.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponseVar.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIResponseVar.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResponseVar.php diff --git a/components/ILIAS/QTI/classes/class.ilQTIResprocessing.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResprocessing.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTIResprocessing.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTIResprocessing.php diff --git a/components/ILIAS/QTI/classes/class.ilQTISection.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTISection.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTISection.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTISection.php diff --git a/components/ILIAS/QTI/classes/class.ilQTISetvar.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTISetvar.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQTISetvar.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQTISetvar.php diff --git a/components/ILIAS/QTI/classes/class.ilQtiMatImageSecurity.php b/components/ILIAS/TestQuestionPool/classes/QTI/class.ilQtiMatImageSecurity.php similarity index 100% rename from components/ILIAS/QTI/classes/class.ilQtiMatImageSecurity.php rename to components/ILIAS/TestQuestionPool/classes/QTI/class.ilQtiMatImageSecurity.php diff --git a/components/ILIAS/TestQuestionPool/classes/class.assClozeTestGUI.php b/components/ILIAS/TestQuestionPool/classes/class.assClozeTestGUI.php index 7a6ffa7a133b..c1eea143d962 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assClozeTestGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assClozeTestGUI.php @@ -331,7 +331,7 @@ public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form): ilPro if (!$this->object->getSelfAssessmentEditingMode()) { if ($this->object->getAdditionalContentEditingMode() !== assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_IPE) { $cloze_text->setUseRte(true); - $cloze_text->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment")); + $cloze_text->setRteTags(ilRTESettings::_getUsedHTMLTags("assessment")); } } else { $cloze_text->setRteTags(ilAssSelfAssessmentQuestionFormatter::getSelfAssessmentTags()); diff --git a/components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php b/components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php index 9158098ce747..7edfae0b5fc2 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assLongMenuGUI.php @@ -188,7 +188,7 @@ public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form): ilPro $long_menu_text->setCols(80); if (!$this->object->getSelfAssessmentEditingMode()) { if ($this->object->getAdditionalContentEditingMode() == assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_RTE) { - $long_menu_text->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment")); + $long_menu_text->setRteTags(ilRTESettings::_getUsedHTMLTags("assessment")); $long_menu_text->setRTESupport($this->object->getId(), "qpl", "assessment"); $long_menu_text->setUseRte(true); } diff --git a/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php b/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php index 2dbcca71e2c0..23f6ba0add86 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php @@ -912,7 +912,7 @@ public function addBasicQuestionFormProperties(ilPropertyFormGUI $form): void if (!$this->object->getSelfAssessmentEditingMode()) { if ($this->object->getAdditionalContentEditingMode() !== assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_IPE) { $question->setUseRte(true); - $question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags('assessment')); + $question->setRteTags(ilRTESettings::_getUsedHTMLTags('assessment')); $question->setRTESupport($this->object->getId(), 'qpl', 'assessment'); } } else { @@ -1969,7 +1969,7 @@ protected function cleanupAnswerText(array $answer_text, bool $is_rte): array return ilArrayUtil::stripSlashesRecursive( $answer_text, false, - ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment") + ilRTESettings::_getUsedHTMLTagsAsString("assessment") ); } diff --git a/components/ILIAS/TestQuestionPool/classes/class.assTextQuestion.php b/components/ILIAS/TestQuestionPool/classes/class.assTextQuestion.php index ff9ad77c4a11..b6e94b5d421e 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assTextQuestion.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assTextQuestion.php @@ -410,7 +410,7 @@ protected function getSolutionSubmit(): string { $text = $this->questionpool_request->string('TEXT', ''); - $text = ilObjAdvancedEditing::_getRichTextEditor() === 'tinymce' + $text = (new ilRTESettings($this->lng, $this->current_user))->setRichTextEditor() === 'tinymce' ? ilUtil::stripSlashes($text, false) : htmlentities($text); diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilAssHtmlPurifier.php b/components/ILIAS/TestQuestionPool/classes/class.ilAssHtmlPurifier.php index cc1f0e3f465c..1b0e17635d50 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilAssHtmlPurifier.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilAssHtmlPurifier.php @@ -61,6 +61,6 @@ private function getAllowedElements(): array private function getElementsUsedForAdvancedEditing(): array { - return ilObjAdvancedEditing::_getUsedHTMLTags($this->getPurifierType()); + return ilRTESettings::_getUsedHTMLTags($this->getPurifierType()); } } diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php b/components/ILIAS/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php index ef7779e2b6c9..ab067aeefbfa 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php @@ -170,7 +170,7 @@ private function buildForm(ilAssQuestionHint $questionHint = null): ilPropertyFo $areaInp->setUseRte(true); } - $areaInp->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment")); + $areaInp->setRteTags(ilRTESettings::_getUsedHTMLTags("assessment")); $areaInp->setRTESupport($this->question_obj->getId(), 'qpl', 'assessment'); diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php b/components/ILIAS/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php index 592174b56777..d9f50a2d9bfb 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilKprimChoiceWizardInputGUI.php @@ -454,7 +454,7 @@ private function cleanupAnswerText(array $answer_text, bool $is_rte): array return ilArrayUtil::stripSlashesRecursive( $answer_text, false, - ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment") + ilRTESettings::_getUsedHTMLTagsAsString("assessment") ); } diff --git a/components/ILIAS/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php b/components/ILIAS/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php index 6c74d1c17061..6d68bba51e8f 100755 --- a/components/ILIAS/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php +++ b/components/ILIAS/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php @@ -253,7 +253,7 @@ final protected function buildFeedbackContentFormProperty(string $label, string if (!$this->questionOBJ->getPreventRteUsage()) { $property->setUseRte(true); - $property->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment")); + $property->setRteTags(ilRTESettings::_getUsedHTMLTags("assessment")); $property->setRTESupport($this->questionOBJ->getId(), "qpl", "assessment"); } else { $property->setRteTags(ilAssSelfAssessmentQuestionFormatter::getSelfAssessmentTags()); diff --git a/components/ILIAS/QTI/exceptions/class.ilQtiException.php b/components/ILIAS/TestQuestionPool/exceptions/QTI/class.ilQtiException.php similarity index 100% rename from components/ILIAS/QTI/exceptions/class.ilQtiException.php rename to components/ILIAS/TestQuestionPool/exceptions/QTI/class.ilQtiException.php diff --git a/components/ILIAS/QTI/interfaces/interface.ilQTIFlowMatAware.php b/components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIFlowMatAware.php similarity index 100% rename from components/ILIAS/QTI/interfaces/interface.ilQTIFlowMatAware.php rename to components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIFlowMatAware.php diff --git a/components/ILIAS/QTI/interfaces/interface.ilQTIMaterialAware.php b/components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIMaterialAware.php similarity index 100% rename from components/ILIAS/QTI/interfaces/interface.ilQTIMaterialAware.php rename to components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIMaterialAware.php diff --git a/components/ILIAS/QTI/interfaces/interface.ilQTIPresentationMaterialAware.php b/components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIPresentationMaterialAware.php similarity index 100% rename from components/ILIAS/QTI/interfaces/interface.ilQTIPresentationMaterialAware.php rename to components/ILIAS/TestQuestionPool/interfaces/QTI/interface.ilQTIPresentationMaterialAware.php diff --git a/components/ILIAS/QTI/tests/bootstrap.php b/components/ILIAS/TestQuestionPool/tests/QTI/bootstrap.php similarity index 100% rename from components/ILIAS/QTI/tests/bootstrap.php rename to components/ILIAS/TestQuestionPool/tests/QTI/bootstrap.php diff --git a/components/ILIAS/QTI/tests/ilQTIAssessmentTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIAssessmentTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIAssessmentTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIAssessmentTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIAssessmentcontrolTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIAssessmentcontrolTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIAssessmentcontrolTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIAssessmentcontrolTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIConditionvarTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIConditionvarTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIConditionvarTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIConditionvarTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIDecvarTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIDecvarTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIDecvarTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIDecvarTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIDisplayfeedbackTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIDisplayfeedbackTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIDisplayfeedbackTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIDisplayfeedbackTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIFlowMatTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIFlowMatTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIFlowMatTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIFlowMatTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIItemTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIItemTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIItemTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIItemTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIItemfeedbackTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIItemfeedbackTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIItemfeedbackTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIItemfeedbackTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIMatappletTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMatappletTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIMatappletTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMatappletTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIMaterialTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMaterialTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIMaterialTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMaterialTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIMatimageTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMatimageTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIMatimageTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMatimageTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIMattextTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMattextTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIMattextTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIMattextTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIObjectivesTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIObjectivesTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIObjectivesTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIObjectivesTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIOutcomesTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIOutcomesTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIOutcomesTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIOutcomesTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIParserTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIParserTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIParserTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIParserTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIPresentationMaterialTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIPresentationMaterialTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIPresentationMaterialTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIPresentationMaterialTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIPresentationTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIPresentationTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIPresentationTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIPresentationTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIRenderChoiceTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderChoiceTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIRenderChoiceTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderChoiceTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIRenderFibTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderFibTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIRenderFibTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderFibTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIRenderHotspotTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderHotspotTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIRenderHotspotTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRenderHotspotTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIRespconditionTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRespconditionTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIRespconditionTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIRespconditionTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIResponseLabelTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseLabelTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIResponseLabelTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseLabelTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIResponseTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIResponseTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIResponseVarTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseVarTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIResponseVarTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResponseVarTest.php diff --git a/components/ILIAS/QTI/tests/ilQTIResprocessingTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResprocessingTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTIResprocessingTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTIResprocessingTest.php diff --git a/components/ILIAS/QTI/tests/ilQTISectionTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTISectionTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTISectionTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTISectionTest.php diff --git a/components/ILIAS/QTI/tests/ilQTISetvarTest.php b/components/ILIAS/TestQuestionPool/tests/QTI/ilQTISetvarTest.php similarity index 100% rename from components/ILIAS/QTI/tests/ilQTISetvarTest.php rename to components/ILIAS/TestQuestionPool/tests/QTI/ilQTISetvarTest.php diff --git a/components/ILIAS/Types/README.md b/components/ILIAS/Types/README.md deleted file mode 100755 index 3b308433a1c0..000000000000 --- a/components/ILIAS/Types/README.md +++ /dev/null @@ -1 +0,0 @@ -# Types \ No newline at end of file diff --git a/components/ILIAS/Types/Types.php b/components/ILIAS/Types/Types.php deleted file mode 100644 index d39519d6597b..000000000000 --- a/components/ILIAS/Types/Types.php +++ /dev/null @@ -1,37 +0,0 @@ -processCSVRow($headerrow) . "\n"); foreach ($data as $row) { $csvrow = []; foreach ($settings as $header) { // standard fields @@ -202,8 +201,7 @@ protected function createCSVExport( } } - $formattedrow = &ilCSVUtil::processCSVRow($csvrow, true, $separator); - fwrite($file, implode($separator, $formattedrow) . "\n"); + fwrite($file, $this->processCSVRow($csvrow) . "\n"); } fclose($file); } @@ -437,6 +435,19 @@ public function buildExportFile( return $fullname; } + private function processCSVRow(array $row): array + { + $resultarray = []; + foreach ($row as $rowindex => $entry) { + $resultarray[$rowindex] = iconv( + 'UTF-8', + 'ISO-8859-1', + '"' . str_replace(chr(13) . chr(10), chr(10), $entry) . '"' + ); + } + return implode(';', $resultarray); + } + /** * creates data directory for export files diff --git a/components/ILIAS/User/classes/class.ilUserImportParser.php b/components/ILIAS/User/classes/class.ilUserImportParser.php index bde76b07d2ce..4b49d6d95a6e 100755 --- a/components/ILIAS/User/classes/class.ilUserImportParser.php +++ b/components/ILIAS/User/classes/class.ilUserImportParser.php @@ -1568,7 +1568,7 @@ public function importEndTag( break; } - $this->udf_data[$field_id] = strip_tags($this->cdata, ilObjAdvancedEditing::_getUsedHTMLTags('textarea')); + $this->udf_data[$field_id] = strip_tags($this->cdata, ilRTESettings::_getUsedHTMLTags('textarea')); break; case 'AccountInfo': diff --git a/components/ILIAS/Utilities/classes/class.ilArrayUtil.php b/components/ILIAS/Utilities/classes/class.ilArrayUtil.php index 59c2d531c431..8f18e48d88db 100755 --- a/components/ILIAS/Utilities/classes/class.ilArrayUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilArrayUtil.php @@ -23,7 +23,8 @@ * @author Sascha Hofmann * @author Alex Killing * - * @deprecated The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically + * @deprecated 11 This component will be removed with ILIAS 11 + * The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically * grown helper class with many different UseCases and functions. The class is not under direct maintainership and the * responsibilities are unclear. In this context, the class should no longer be used in the code and existing uses * should be converted to their own service in the medium term. If you need ilUtil for the implementation of a new diff --git a/components/ILIAS/Utilities/classes/class.ilLegacyFormElementsUtil.php b/components/ILIAS/Utilities/classes/class.ilLegacyFormElementsUtil.php index 19ac79d3def3..6f32ef39cf5c 100755 --- a/components/ILIAS/Utilities/classes/class.ilLegacyFormElementsUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilLegacyFormElementsUtil.php @@ -23,7 +23,8 @@ * @author Sascha Hofmann * @author Alex Killing * - * @deprecated The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically + * @deprecated 11 This component will be removed with ILIAS 11 + * The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically * grown helper class with many different UseCases and functions. The class is not under direct maintainership and the * responsibilities are unclear. In this context, the class should no longer be used in the code and existing uses * should be converted to their own service in the medium term. If you need ilUtil for the implementation of a new diff --git a/components/ILIAS/Utilities/classes/class.ilShellUtil.php b/components/ILIAS/Utilities/classes/class.ilShellUtil.php index 29f06edcde62..77726e98dd4b 100755 --- a/components/ILIAS/Utilities/classes/class.ilShellUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilShellUtil.php @@ -23,7 +23,8 @@ * @author Sascha Hofmann * @author Alex Killing * - * @deprecated The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically + * @deprecated 12 This component will be removed with ILIAS 12 + * The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically * grown helper class with many different UseCases and functions. The class is not under direct maintainership and the * responsibilities are unclear. In this context, the class should no longer be used in the code and existing uses * should be converted to their own service in the medium term. If you need ilUtil for the implementation of a new diff --git a/components/ILIAS/Utilities/classes/class.ilStr.php b/components/ILIAS/Utilities/classes/class.ilStr.php index 4a1f54d80178..92c0c9f268fa 100755 --- a/components/ILIAS/Utilities/classes/class.ilStr.php +++ b/components/ILIAS/Utilities/classes/class.ilStr.php @@ -17,7 +17,7 @@ *********************************************************************/ /** - * @deprecated + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilStr { diff --git a/components/ILIAS/Utilities/classes/class.ilUtil.php b/components/ILIAS/Utilities/classes/class.ilUtil.php index 13eb8f703ead..a34326d761f3 100755 --- a/components/ILIAS/Utilities/classes/class.ilUtil.php +++ b/components/ILIAS/Utilities/classes/class.ilUtil.php @@ -27,7 +27,8 @@ * @author Sascha Hofmann * @author Alex Killing * - * @deprecated The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically + * @deprecated 12 This component will be removed with ILIAS 12 + * The 2021 Technical Board has decided to mark the ilUtil class as deprecated. The ilUtil is a historically * grown helper class with many different UseCases and functions. The class is not under direct maintainership and the * responsibilities are unclear. In this context, the class should no longer be used in the code and existing uses * should be converted to their own service in the medium term. If you need ilUtil for the implementation of a new diff --git a/components/ILIAS/Verification/Verification.php b/components/ILIAS/Verification/Verification.php index f1236e38abfa..8ff9712d68af 100644 --- a/components/ILIAS/Verification/Verification.php +++ b/components/ILIAS/Verification/Verification.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class Verification implements Component\Component { public function init( diff --git a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationClassMap.php b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationClassMap.php index 7df404447053..62bb5ab36360 100755 --- a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationClassMap.php +++ b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationClassMap.php @@ -15,6 +15,7 @@ /** * @author Niels Theen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilCertificateVerificationClassMap { diff --git a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationFileService.php b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationFileService.php index 10e6ddd63e5e..76de1ce7a0e5 100755 --- a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationFileService.php +++ b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationFileService.php @@ -15,6 +15,7 @@ /** * @author Niels Theen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilCertificateVerificationFileService { diff --git a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationObject.php b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationObject.php index 0d4ff6df2d1c..663a4d1c8161 100755 --- a/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationObject.php +++ b/components/ILIAS/Verification/classes/Certificate/class.ilCertificateVerificationObject.php @@ -15,6 +15,7 @@ /** * @author Niels Theen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilCertificateVerificationObject extends ilVerificationObject { diff --git a/components/ILIAS/Verification/classes/class.ilVerificationObject.php b/components/ILIAS/Verification/classes/class.ilVerificationObject.php index 363dfc87a38b..41d79e78be23 100755 --- a/components/ILIAS/Verification/classes/class.ilVerificationObject.php +++ b/components/ILIAS/Verification/classes/class.ilVerificationObject.php @@ -20,6 +20,7 @@ * Verification object base class * * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ abstract class ilVerificationObject extends ilObject2 { diff --git a/components/ILIAS/Verification/classes/class.ilVerificationStorageFile.php b/components/ILIAS/Verification/classes/class.ilVerificationStorageFile.php index 0cb8ab5fcb83..cbfe7ce84cf4 100755 --- a/components/ILIAS/Verification/classes/class.ilVerificationStorageFile.php +++ b/components/ILIAS/Verification/classes/class.ilVerificationStorageFile.php @@ -16,6 +16,7 @@ /** * * @author Jörg Lützenkirchen + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilVerificationStorageFile extends ilFileSystemAbstractionStorage { diff --git a/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsDocumentPurifier.php b/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsDocumentPurifier.php index ecd769500d55..97a35908d6f3 100755 --- a/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsDocumentPurifier.php +++ b/components/ILIAS/WebDAV/classes/mount_instructions/class.ilWebDAVMountInstructionsDocumentPurifier.php @@ -27,7 +27,7 @@ class ilWebDAVMountInstructionsDocumentPurifier extends ilHtmlPurifierAbstractLi public function __construct(?array $allowedTags = null, ?string $cacheDirectory = null) { $this->cacheDirectory = $cacheDirectory ?? ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory(); - $this->allowedTags = $allowedTags ?? ilObjAdvancedEditing::_getUsedHTMLTags('textarea'); + $this->allowedTags = $allowedTags ?? ilRTESettings::_getUsedHTMLTags('textarea'); parent::__construct(); } diff --git a/components/ILIAS/WorkflowEngine/ROADMAP.md b/components/ILIAS/WorkflowEngine/ROADMAP.md deleted file mode 100755 index 0a8e76e52cc2..000000000000 --- a/components/ILIAS/WorkflowEngine/ROADMAP.md +++ /dev/null @@ -1,5 +0,0 @@ -# Roadmap - -## Short Term - -- Removal of removal-code in ILIAS 10 diff --git a/components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngine9DBUpdateSteps.php b/components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngine9DBUpdateSteps.php deleted file mode 100755 index 156634042f7f..000000000000 --- a/components/ILIAS/WorkflowEngine/Setup/class.ilWorkflowEngine9DBUpdateSteps.php +++ /dev/null @@ -1,160 +0,0 @@ -db = $db; - } - - public function step_1(): void - { - $this->db->manipulate("DELETE FROM settings WHERE keyword = " . - $this->db->quote('wfe_activation', "text") . " AND module = " . - $this->db->quote('common', "text")); - - $this->db->manipulate("DELETE FROM settings WHERE module = " . - $this->db->quote('wfe', "text")); - } - - public function step_2(): void - { - $this->db->dropTable('wfe_det_listening'); - $this->db->dropTable('wfe_startup_events'); - $this->db->dropTable('wfe_static_inputs'); - $this->db->dropTable('wfe_workflows'); - } - - public function step_3(): void - { - $this->delete_directory( '../default/wfe'); - } - - public function step_4(): void - { - $res = $this->db->queryF( - 'SELECT obj_id FROM object_data WHERE type = %s', - array('text'), - array('wfe') - ); - $row = $this->db->fetchAssoc($res); - if (is_array($row) && isset($row['obj_id'])) { - $obj_id = $row['obj_id']; - - $ref_res = $this->db->queryF( - 'SELECT ref_id FROM object_reference WHERE obj_id = %s', - array('integer'), - array($obj_id) - ); - - while ($ref_row = $this->db->fetchAssoc($ref_res)) { - if (is_array($ref_row) && isset($ref_row['ref_id'])) { - $ref_id = $ref_row['ref_id']; - - $this->db->manipulateF( - 'DELETE FROM tree WHERE child = %s', - array('integer'), - array($ref_id) - ); - - $this->db->manipulateF( - 'DELETE FROM rbac_pa WHERE ref_id = %s', - array('integer'), - array($ref_id) - ); - - $this->db->manipulateF( - 'DELETE FROM rbac_templates WHERE parent = %s', - array('integer'), - array($ref_id) - ); - - $this->db->manipulateF( - 'DELETE FROM rbac_fa WHERE parent = %s', - array('integer'), - array($ref_id) - ); - - } - } - - $this->db->manipulateF( - 'DELETE FROM object_reference WHERE obj_id = %s', - array('integer'), - array($obj_id) - ); - - $this->db->manipulateF( - 'DELETE FROM object_data WHERE obj_id = %s', - array('integer'), - array($obj_id) - ); - } - - $res = $this->db->queryF( - 'SELECT obj_id FROM object_data WHERE type = %s AND title = %s', - array('text', 'text'), - array('typ', 'wfe') - ); - $row = $this->db->fetchAssoc($res); - - if (is_array($row) && isset($row['obj_id'])) { - $obj_id = $row['obj_id']; - - $this->db->manipulateF( - 'DELETE FROM rbac_ta WHERE typ_id = %s', - array('integer'), - array($obj_id) - ); - - $this->db->manipulateF( - 'DELETE FROM object_data WHERE obj_id = %s', - array('integer'), - array($obj_id) - ); - } - } - - private function delete_directory($dir) - { - if (!file_exists($dir)) { - return true; - } - - if (!is_dir($dir)) { - return unlink($dir); - } - - foreach (scandir($dir) as $item) { - if ($item == '.' || $item == '..') { - continue; - } - - if (!delete_directory($dir . DIRECTORY_SEPARATOR . $item)) { - return false; - } - } - - return rmdir($dir); - } -} diff --git a/components/ILIAS/WorkflowEngine/WorkflowEngine.php b/components/ILIAS/WorkflowEngine/WorkflowEngine.php deleted file mode 100644 index 3a1608a226e5..000000000000 --- a/components/ILIAS/WorkflowEngine/WorkflowEngine.php +++ /dev/null @@ -1,40 +0,0 @@ - - new \ilWorkflowEngineSetupAgent( - $pull[\ILIAS\Refinery\Factory::class] - ); - } -} diff --git a/components/ILIAS/WorkflowEngine/maintenance.json b/components/ILIAS/WorkflowEngine/maintenance.json deleted file mode 100755 index dea050ee5624..000000000000 --- a/components/ILIAS/WorkflowEngine/maintenance.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "maintenance_model": "Classic", - "first_maintainer": "mbecker(27266)", - "second_maintainer": "", - "implicit_maintainers": [], - "coordinator": [ - "" - ], - "tester": "richtera(41247)", - "testcase_writer": "mbecker(27266)", - "path": "Services/WorkflowEngine", - "belong_to_component": "Workflow Engine", - "used_in_components": [] -} \ No newline at end of file diff --git a/components/ILIAS/WorkflowEngine/service.xml b/components/ILIAS/WorkflowEngine/service.xml deleted file mode 100755 index e0cf1738b239..000000000000 --- a/components/ILIAS/WorkflowEngine/service.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - adm - - - - - \ No newline at end of file diff --git a/components/ILIAS/YUI/YUI.php b/components/ILIAS/YUI/YUI.php index 7503db9e4fdc..22c8ddfd3457 100644 --- a/components/ILIAS/YUI/YUI.php +++ b/components/ILIAS/YUI/YUI.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class YUI implements Component\Component { public function init( diff --git a/components/ILIAS/YUI/classes/class.ilYuiUtil.php b/components/ILIAS/YUI/classes/class.ilYuiUtil.php index 07f2c98701b3..ab252d492aad 100755 --- a/components/ILIAS/YUI/classes/class.ilYuiUtil.php +++ b/components/ILIAS/YUI/classes/class.ilYuiUtil.php @@ -19,6 +19,7 @@ /** * Yahoo YUI Library Utility functions * @author Alexander Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class ilYuiUtil { diff --git a/components/ILIAS/jQuery/classes/class.iljQueryUtil.php b/components/ILIAS/jQuery/classes/class.iljQueryUtil.php index 3b714a33e57c..d5b7645dcfd2 100755 --- a/components/ILIAS/jQuery/classes/class.iljQueryUtil.php +++ b/components/ILIAS/jQuery/classes/class.iljQueryUtil.php @@ -20,6 +20,7 @@ * jQuery utilities * * @author Alex Killing + * @deprecated 11 This component will be removed with ILIAS 11 */ class iljQueryUtil { diff --git a/components/ILIAS/jQuery/jQuery.php b/components/ILIAS/jQuery/jQuery.php index 1acd530bfdb7..02d54471548c 100644 --- a/components/ILIAS/jQuery/jQuery.php +++ b/components/ILIAS/jQuery/jQuery.php @@ -20,6 +20,9 @@ namespace ILIAS; +/** + * @deprecated 11 This component will be removed with ILIAS 11 + */ class jQuery implements Component\Component { public function init(