5 include_once(
"./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
26 $this->ctrl = $DIC->ctrl();
27 $this->tpl = $DIC[
"tpl"];
28 $this->tabs = $DIC->tabs();
29 $this->lng = $DIC->language();
30 $this->help = $DIC[
"ilHelp"];
33 $ilCtrl->saveParameter($this,
"obj_id");
34 $ilCtrl->saveParameter($this,
"tref_id");
36 parent::__construct($a_tref_id);
38 $this->tref_id = $a_tref_id;
39 if (is_object($this->node_object)) {
40 $this->base_skill_id = $this->node_object->getSkillTemplateId();
63 $next_class =
$ilCtrl->getNextClass($this);
66 switch ($next_class) {
84 $ilTabs->clearTargets();
85 $ilHelp->setScreenIdComponent(
"skmg_sktr");
87 if (is_object($this->node_object)) {
88 $sk_id = $this->node_object->getSkillTemplateId();
91 if ($obj_type ==
"sctp") {
96 $ilCtrl->getLinkTarget($this,
'listItems')
102 $lng->txt(
"skmg_skill_levels"),
103 $ilCtrl->getLinkTarget($this,
'listItems')
110 $lng->txt(
"settings"),
111 $ilCtrl->getLinkTarget($this,
'editProperties')
129 parent::setTitleIcon();
131 $lng->txt(
"skmg_sktr") .
": " . $this->node_object->getTitle() . $add
135 $ilTabs->activateTab($a_tab);
150 $ilCtrl->saveParameter($this,
"parent_id");
151 $ilCtrl->saveParameter($this,
"target");
153 $tpl->setContent($this->form->getHTML());
168 $tpl->setContent($this->form->getHTML());
181 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
185 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
191 $this->form->addItem($ti);
196 $ni->setMaxLength(6);
198 $ni->setRequired(
true);
199 if ($a_mode ==
"create") {
200 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
202 $max =
$tree->getMaxOrderNr((
int)
$_GET[
"obj_id"]);
203 $ni->setValue($max + 10);
205 $this->form->addItem($ni);
209 "" =>
$lng->txt(
"please_select"),
211 foreach ($tmplts as $tmplt) {
212 $options[$tmplt[
"child"]] = $tmplt[
"title"];
214 if ($a_mode !=
"edit") {
217 $si->setRequired(
true);
218 $this->form->addItem(
$si);
222 $this->form->addItem($ne);
231 $this->form->addItem($cb);
234 if ($a_mode ==
"create") {
235 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
236 $this->form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
237 $this->form->setTitle(
$lng->txt(
"skmg_new_sktr"));
239 $this->form->addCommandButton(
"updateSkillTemplateReference",
$lng->txt(
"save"));
240 $this->form->setTitle(
$lng->txt(
"skmg_edit_sktr"));
244 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
253 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
254 $values[
"title"] = $this->node_object->getTitle();
255 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
256 $values[
"status"] = $this->node_object->getStatus();
257 $values[
"order_nr"] = $this->node_object->getOrderNr();
258 $this->form->setValuesByArray($values);
271 $sktr->setTitle(
$_POST[
"title"]);
272 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
273 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
274 $sktr->setOrderNr(
$_POST[
"order_nr"]);
275 $sktr->setStatus(
$_POST[
"status"]);
278 $this->node_object = $sktr;
289 "ilskilltemplatereferencegui",
291 $this->node_object->getId()
294 "ilskilltemplatereferencegui",
296 $this->node_object->getSkillTemplateId()
298 $ilCtrl->redirectByClass(
"ilskilltemplatereferencegui",
"listItems");
315 if ($this->form->checkInput()) {
318 $this->node_object->setTitle(
$_POST[
"title"]);
319 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
320 $this->node_object->setOrderNr(
$_POST[
"order_nr"]);
321 $this->node_object->setStatus(
$_POST[
"status"]);
322 $this->node_object->update();
325 $ilCtrl->redirect($this,
"editProperties");
328 $this->form->setValuesByPost();
329 $tpl->setContent($this->form->getHtml());
342 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
359 $sk_id = $this->node_object->getSkillTemplateId();
362 if ($obj_type ==
"sctp") {
363 include_once(
"./Services/Skill/classes/class.ilSkillCatTableGUI.php");
369 $this->node_object->getId()
372 } elseif ($obj_type ==
"sktp") {
373 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
addUsageTab($a_tabs)
Add usage tab.
setValue($a_value)
Set Value.
Skill Template Reference.
setSkillNodeDescription()
Set skill node description.
getValues()
Get current values for from.
__construct($a_tref_id=0)
Constructor.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
Put this object into the skill tree.
static _lookupType($a_obj_id)
Lookup Type.
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
editProperties()
Edit properties.
setTabs($a_tab="")
output tabs
Skill template reference GUI class.
This class represents a text property in a property form.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
updateSkillTemplateReference()
Update form.
Create styles array
The data for the language used.
initForm($a_mode="edit")
Init form.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
This class represents a non editable value in a property form.
if(empty($password)) $table
executeCommand()
Execute command.
Basic skill template GUI class.
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
static getTopTemplates()
Get top skill templates and template categories.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options