Settings for a single didactic template.
More...
◆ __construct()
ilDidacticTemplateSettingsGUI::__construct |
( |
|
$a_parent_obj | ) |
|
◆ activateTemplates()
ilDidacticTemplateSettingsGUI::activateTemplates |
( |
| ) |
|
|
protected |
Activate didactic templates ilErrorHandling $ilErr ilCtrl $ilCtrl.
- Returns
- void
Definition at line 414 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, $ilErr, $tpl, ilUtil\sendFailure(), and ilUtil\sendSuccess().
418 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
420 $this->ctrl->redirect($this,
"overview");
425 return $ilCtrl->redirect($this,
'overview');
436 $ilCtrl->redirect($this,
'overview');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ confirmDelete()
ilDidacticTemplateSettingsGUI::confirmDelete |
( |
| ) |
|
|
protected |
Show delete confirmation screen.
Definition at line 350 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $GLOBALS, $ilCtrl, $ilErr, $tpl, ilUtil\sendFailure(), and ilUtil\sendQuestion().
357 return $ilCtrl->redirect($this,
'overview');
360 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
363 $confirm->setFormAction($ilCtrl->getFormAction($this));
364 $confirm->setConfirm($this->lng->txt(
'delete'),
'deleteTemplates');
365 $confirm->setCancel($this->lng->txt(
'cancel'),
'overview');
367 foreach((array)
$_REQUEST[
'tpls'] as $tplid)
370 $confirm->addItem(
'tpls[]',
$tpl->getId(),
$tpl->getTitle());
374 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Confirmation screen class.
◆ copyTemplate()
ilDidacticTemplateSettingsGUI::copyTemplate |
( |
| ) |
|
|
protected |
Copy on template.
Definition at line 299 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, $ilErr, ilUtil\sendFailure(), and ilUtil\sendSuccess().
303 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
305 $this->ctrl->redirect($this,
"overview");
311 return $ilCtrl->redirect($this,
'overview');
314 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateCopier.php';
320 $ilCtrl->redirect($this,
'overview');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Copy a didactic template and all subitems.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ createImportForm()
ilDidacticTemplateSettingsGUI::createImportForm |
( |
| ) |
|
|
protected |
Create template import form.
- Returns
- ilPropertyFormGUI $form
Definition at line 107 of file class.ilDidacticTemplateSettingsGUI.php.
References $file, and $ilCtrl.
Referenced by importTemplate(), and showImportForm().
111 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
113 $form->setShowTopButtons(
false);
114 $form->setFormAction($ilCtrl->getFormAction($this));
115 $form->setTitle($this->lng->txt(
'didactic_import_table_title'));
116 $form->addCommandButton(
'importTemplate', $this->lng->txt(
'import'));
117 $form->addCommandButton(
'overview', $this->lng->txt(
'cancel'));
120 $file->setSuffixes(array(
'xml'));
121 $file->setRequired(TRUE);
122 $form->addItem(
$file);
◆ deactivateTemplates()
ilDidacticTemplateSettingsGUI::deactivateTemplates |
( |
| ) |
|
|
protected |
Activate didactic templates ilErrorHandling $ilErr ilCtrl $ilCtrl.
- Returns
- void
Definition at line 445 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, $ilErr, $tpl, ilUtil\sendFailure(), and ilUtil\sendSuccess().
449 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
451 $this->ctrl->redirect($this,
"overview");
457 return $ilCtrl->redirect($this,
'overview');
468 $ilCtrl->redirect($this,
'overview');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ deleteTemplates()
ilDidacticTemplateSettingsGUI::deleteTemplates |
( |
| ) |
|
|
protected |
Delete chosen didactic templates ilErrorHandling $ilErr ilCtrl $ilCtrl.
- Returns
- void
Definition at line 383 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, $ilErr, $tpl, ilUtil\sendFailure(), and ilUtil\sendSuccess().
387 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
389 $this->ctrl->redirect($this,
"overview");
395 return $ilCtrl->redirect($this,
'overview');
398 foreach((array)
$_REQUEST[
'tpls'] as $tplid)
405 $ilCtrl->redirect($this,
'overview');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ editTemplate()
Edit template.
- Returns
- void
Definition at line 182 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $GLOBALS, $ilCtrl, initEditTemplate(), and ilUtil\sendFailure().
Referenced by updateTemplate().
189 return $ilCtrl->redirect($this,
'overview');
192 $ilTabs->clearTargets();
193 $ilTabs->setBackTarget(
194 $this->lng->txt(
'didactic_back_to_overview'),
195 $ilCtrl->getLinkTarget($this,
'overview')
199 $ilCtrl->saveParameter($this,
'tplid');
initEditTemplate(ilDidacticTemplateSetting $set)
Init edit template form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
◆ executeCommand()
ilDidacticTemplateSettingsGUI::executeCommand |
( |
| ) |
|
◆ exportTemplate()
ilDidacticTemplateSettingsGUI::exportTemplate |
( |
| ) |
|
|
protected |
Export one template.
Definition at line 326 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, $ilErr, ilUtil\deliverData(), and ilUtil\sendFailure().
333 return $ilCtrl->redirect($this,
'overview');
336 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateXmlWriter.php';
341 $writer->xmlDumpMem(TRUE),
342 $writer->getSetting()->getTitle().
'.xml',
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ importTemplate()
ilDidacticTemplateSettingsGUI::importTemplate |
( |
| ) |
|
|
protected |
Import template.
Definition at line 132 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $file, $ilCtrl, createImportForm(), ilLoggerFactory\getLogger(), ilUtil\ilTempnam(), ilDidacticTemplateImport\IMPORT_FILE, ilUtil\moveUploadedFile(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and showImportForm().
136 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
138 $this->ctrl->redirect($this,
"overview");
142 if(!$form->checkInput())
145 $form->setValuesByPost();
150 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateImport.php';
154 $file = $form->getInput(
'file');
163 $import->setInputFile($tmp);
175 $ilCtrl->redirect($this,
'overview');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
createImportForm()
Create template import form.
showImportForm(ilPropertyFormGUI $form=NULL)
Show template import form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
Description of ilDidacticTemplateImportException.
Description of ilDidacticTemplateImport.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
static getLogger($a_component_id)
Get component logger.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ initEditTemplate()
Init edit template form.
Definition at line 244 of file class.ilDidacticTemplateSettingsGUI.php.
References $ilCtrl, $info, $options, ilDidacticTemplateSetting\getAssignments(), ilDidacticTemplateSetting\getDescription(), ilDidacticTemplateSetting\getInfo(), ilDidacticTemplateSetting\getTitle(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setValue(), and ilTextAreaInputGUI\setValue().
Referenced by editTemplate(), and updateTemplate().
248 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
250 $form->setShowTopButtons(
false);
251 $form->setFormAction($ilCtrl->getFormAction($this,
'updateTemplate'));
252 $form->setTitle($this->lng->txt(
'didactic_edit_tpl'));
253 $form->addCommandButton(
'updateTemplate', $this->lng->txt(
'save'));
254 $form->addCommandButton(
'overview', $this->lng->txt(
'cancel'));
260 $title->setMaxLength(64);
261 $title->setRequired(
true);
262 $form->addItem($title);
268 $form->addItem($desc);
274 $form->addItem(
$info);
280 $type->setValue(isset($assigned[0]) ? $assigned[0] :
'');
281 $subs = $objDefinition->getCreatableSubobjects(
'root',
false);
283 foreach(array_merge($subs,array(
'fold' => 1)) as $obj => $null)
285 if($objDefinition->isAllowedInRepository($obj))
287 $options[$obj] = $this->lng->txt(
'obj_'.$obj);
291 $form->addItem($type);
getDescription()
Get description.
getAssignments()
Get object assignemnts.
setValue($a_value)
Set Value.
if(!is_array($argv)) $options
This class represents a text property in a property form.
This class represents a text area property in a property form.
getInfo()
Get installation info text.
setValue($a_value)
Set Value.
◆ overview()
ilDidacticTemplateSettingsGUI::overview |
( |
| ) |
|
|
protected |
Show didactic template administration.
ilToolbarGUI $ilToolbar
Definition at line 60 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $GLOBALS, $ilCtrl, and $lng.
64 if($ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
66 $ilToolbar->addButton(
67 $lng->txt(
'didactic_import_btn'),
68 $ilCtrl->getLinkTarget($this,
'showImportForm')
73 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettingsTableGUI.php';
78 $GLOBALS[
'tpl']->setContent($table->getHTML());
Description of ilDidacticTemplateSettingsTableGUI.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
◆ showImportForm()
◆ updateTemplate()
ilDidacticTemplateSettingsGUI::updateTemplate |
( |
| ) |
|
|
protected |
Update template.
Definition at line 212 of file class.ilDidacticTemplateSettingsGUI.php.
References $_REQUEST, $ilCtrl, editTemplate(), initEditTemplate(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
216 if(!$ilAccess->checkAccess(
'write',
'',
$_REQUEST[
"ref_id"]))
218 $this->ctrl->redirect($this,
"overview");
224 if($form->checkInput())
226 $temp->setTitle($form->getInput(
'title'));
227 $temp->setDescription($form->getInput(
'description'));
228 $temp->setInfo($form->getInput(
'info'));
229 $temp->setAssignments(array($form->getInput(
'type')));
233 $ilCtrl->redirect($this,
'overview');
237 $form->setValuesByPost();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initEditTemplate(ilDidacticTemplateSetting $set)
Init edit template form.
editTemplate(ilPropertyFormGUI $form=null)
Edit template.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
◆ $lng
ilDidacticTemplateSettingsGUI::$lng |
|
private |
◆ $parent_object
ilDidacticTemplateSettingsGUI::$parent_object |
|
private |
The documentation for this class was generated from the following file: