35 include_once
"./classes/class.ilObjectGUI.php";
50 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
51 $this->lng->loadLanguageModule(
'meta');
53 if (!$rbacsystem->checkAccess(
'read',$this->object->getRefId()))
55 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read_adve"),$this->ilias->error_obj->WARNING);
61 $next_class = $this->ctrl->getNextClass($this);
62 $cmd = $this->ctrl->getCmd();
68 case 'ilpermissiongui':
69 include_once(
"./classes/class.ilPermissionGUI.php");
71 $ret =& $this->ctrl->forwardCommand($perm_gui);
107 $this->ctrl->redirect($this);
118 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.advanced_editing.html");
120 $this->tpl->setCurrentBlock(
"adm_content");
121 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
122 $this->tpl->setVariable(
"TXT_ADVANCED_EDITING_SETTINGS", $this->lng->txt(
"advanced_editing_settings"));
123 $this->tpl->setVariable(
"TXT_ALLOW_JAVASCRIPT_EDITOR", $this->lng->txt(
"advanced_editing_allow_javascript_editor"));
124 $this->tpl->setVariable(
"NO_RTE_EDITOR", $this->lng->txt(
"advanced_editing_no_rte"));
125 $this->tpl->setVariable(
"TINY_MCE_EDITOR", $this->lng->txt(
"advanced_editing_tinymce"));
126 $editor = $this->
object->_getRichTextEditor();
130 $this->tpl->setVariable(
"SELECTED_TINY_MCE_EDITOR",
" selected=\"selected\"");
134 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
136 $this->tpl->parseCurrentBlock();
144 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.advanced_editing_assessment.html");
146 $alltags =& $this->
object->getHTMLTags();
147 $usedtags =& $this->
object->_getUsedHTMLTags(
"assessment");
148 foreach ($alltags as $tag)
150 $this->tpl->setCurrentBlock(
"html_tag_row");
151 $this->tpl->setVariable(
"HTML_TAG", $tag);
152 if (is_array($usedtags))
154 if (in_array($tag, $usedtags))
156 $this->tpl->setVariable(
"HTML_TAG_SELECTED",
" selected=\"selected\"");
159 $this->tpl->parseCurrentBlock();
162 $this->tpl->setCurrentBlock(
"adm_content");
163 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
164 $this->tpl->setVariable(
"TXT_ASSESSMENT_SETTINGS", $this->lng->txt(
"advanced_editing_assessment_settings"));
165 $this->tpl->setVariable(
"TXT_ALLOW_HTML_TAGS", $this->lng->txt(
"advanced_editing_allow_html_tags"));
166 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
168 $this->tpl->parseCurrentBlock();
177 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.advanced_editing_survey.html");
179 $alltags =& $this->
object->getHTMLTags();
180 $usedtags =& $this->
object->_getUsedHTMLTags(
"survey");
181 foreach ($alltags as $tag)
183 $this->tpl->setCurrentBlock(
"html_tag_row");
184 $this->tpl->setVariable(
"HTML_TAG", $tag);
185 if (is_array($usedtags))
187 if (in_array($tag, $usedtags))
189 $this->tpl->setVariable(
"HTML_TAG_SELECTED",
" selected=\"selected\"");
192 $this->tpl->parseCurrentBlock();
195 $this->tpl->setCurrentBlock(
"adm_content");
196 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
197 $this->tpl->setVariable(
"TXT_SURVEY_SETTINGS", $this->lng->txt(
"advanced_editing_survey_settings"));
198 $this->tpl->setVariable(
"TXT_ALLOW_HTML_TAGS", $this->lng->txt(
"advanced_editing_allow_html_tags"));
199 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
201 $this->tpl->parseCurrentBlock();
211 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.advanced_editing_learning_module.html");
213 $this->tpl->setCurrentBlock(
"adm_content");
214 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
215 $this->tpl->setVariable(
"TXT_LM_SETTINGS", $this->lng->txt(
"advanced_editing_lm_settings"));
216 $this->tpl->setVariable(
"TXT_LM_JS_EDITING", $this->lng->txt(
"advanced_editing_lm_js_editing"));
217 $this->tpl->setVariable(
"TXT_LM_JS_EDITING_DESC", $this->lng->txt(
"advanced_editing_lm_js_editing_desc"));
218 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
220 if ($ilSetting->get(
"enable_js_edit", 1))
222 $this->tpl->setVariable(
"JS_EDIT",
"checked=\"checked\"");
225 $this->tpl->parseCurrentBlock();
236 $ilSetting->set(
"enable_js_edit", $_POST[
"js_edit"]);
237 $this->ctrl->redirect($this,
'learningmodule');
247 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.advanced_editing_category.html");
249 $this->tpl->setCurrentBlock(
"adm_content");
250 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
251 $this->tpl->setVariable(
"TXT_CAT_SETTINGS", $this->lng->txt(
"adve_cat_settings"));
252 $this->tpl->setVariable(
"TXT_CAT_PAGE_EDITING", $this->lng->txt(
"advanced_editing_cat_page_editing"));
253 $this->tpl->setVariable(
"TXT_CAT_PAGE_EDITING_DESC", $this->lng->txt(
"advanced_editing_cat_page_editing_desc"));
254 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
256 $this->tpl->setVariable(
"TXT_CAT_PAGES",
257 $this->lng->txt(
"cat_pages"));
258 $this->tpl->setVariable(
"TXT_UNDO_LAST_CAT_CHANGES",
259 $this->lng->txt(
"cat_undo_last_page_changes"));
260 $this->tpl->setVariable(
"TXT_CLEAR_CAT_PAGE",
261 $this->lng->txt(
"cat_clear_page"));
263 $root_node = $tree->getNodeData(ROOT_FOLDER_ID);
264 $nodes = $tree->getSubTree($root_node,
true,
"cat");
265 $cats[0] = $this->lng->txt(
"please_select");
266 $cats[$root_node[
"ref_id"]] =
"- ".$this->lng->txt(
"repository");
267 foreach($nodes as $node)
269 $cats[$node[
"ref_id"]] = str_repeat(
" ",($node[
"depth"]-1)).
"- ".$node[
"title"];
271 $this->tpl->setVariable(
"SELECT_CATEGORY",
274 if ($ilSetting->get(
"enable_cat_page_edit"))
276 $this->tpl->setVariable(
"CAT_PAGE_EDIT",
"checked=\"checked\"");
279 $this->tpl->parseCurrentBlock();
290 $ilSetting->set(
"enable_cat_page_edit", $_POST[
"cat_page_edit"]);
291 $this->ctrl->redirect($this,
'category');
301 include_once(
"./Services/Container/classes/class.ilContainer.php");
308 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
317 $this->ctrl->redirect($this,
'category');
327 include_once(
"./Services/Container/classes/class.ilContainer.php");
334 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
343 $this->ctrl->redirect($this,
'category');
351 $this->
object->_setRichTextEditor($_POST[
"rte"]);
354 $this->ctrl->redirect($this,
'settings');
361 $this->
object->_setUsedHTMLTags($_POST[
"html_tags"],
"assessment");
362 $this->ctrl->redirect($this,
'assessment');
369 $this->
object->_setUsedHTMLTags($_POST[
"html_tags"],
"survey");
370 $this->ctrl->redirect($this,
'survey');
382 if ($ilCtrl->getNextClass() !=
"ilpermissiongui")
384 $tabs_gui->addSubTabTarget(
"adve_general_settings",
385 $this->ctrl->getLinkTarget($this,
"settings"),
386 array(
"",
"view",
"settings",
"saveSettings"),
388 $tabs_gui->addSubTabTarget(
"adve_assessment_settings",
389 $this->ctrl->getLinkTarget($this,
"assessment"),
390 array(
"assessment",
"saveAssessmentSettings"),
392 $tabs_gui->addSubTabTarget(
"adve_survey_settings",
393 $this->ctrl->getLinkTarget($this,
"survey"),
394 array(
"survey",
"saveSurveySettings"),
396 $tabs_gui->addSubTabTarget(
"adve_cat_settings",
397 $this->ctrl->getLinkTarget($this,
"category"),
398 array(
"category",
"saveCategorySettings"),
400 $tabs_gui->addSubTabTarget(
"adve_lm_settings",
401 $this->ctrl->getLinkTarget($this,
"learningModule"),
402 array(
"learningModule",
"saveLearningModuleSettings"),
416 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
418 $tabs_gui->addTarget(
"settings",
419 $this->ctrl->getLinkTarget($this,
"settings"),
420 array(
"settings",
"",
"view",
"assessment",
"survey",
"learningModule",
421 "category"),
"",
"");
425 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
427 $tabs_gui->addTarget(
"perm_settings",
428 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');