58 $this->ctrl = $DIC->ctrl();
59 $this->lng = $DIC->language();
60 $this->locator = $DIC[
"ilLocator"];
61 $this->tpl = $DIC[
"tpl"];
62 $this->
user = $DIC->user();
63 $ilAccess = $DIC->access();
64 $this->tree = $DIC->repositoryTree();
66 $this->node_object = null;
67 $this->access = $ilAccess;
68 $this->ref_id = (int)
$_GET[
"ref_id"];
84 if (!is_object($this->node_object)) {
87 if ($this->use_checked) {
92 $usages = $u->getAllUsagesInfoOfSubtrees($cskill_ids);
93 if (count($usages) > 0) {
96 $this->in_use =
false;
109 return $this->access->checkAccess($a_perm,
"", $this->ref_id);
120 $this->parentgui = $a_parentgui;
130 return $this->parentgui;
149 $ilCtrl->redirect($this,
"showOrganization");
159 $ilCtrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
170 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
176 foreach ($items as $k => $item) {
181 foreach ($todel as $k) {
197 (
int)
$_GET[
"obj_id"],
213 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
219 foreach ($items as $k => $item) {
224 foreach ($todel as $k) {
263 (
int)
$_GET[
"obj_id"],
280 $ilLocator->addRepositoryItems(
$_GET[
"ref_id"]);
283 if (
$_GET[
"obj_id"] > 0) {
285 $path = $tree->getPathFull(
$_GET[
"obj_id"]);
286 for (
$i = 1;
$i < count($path);
$i++) {
287 switch ($path[
$i][
"type"]) {
289 $ilCtrl->setParameterByClass(
290 "ilskillcategorygui",
296 $ilCtrl->getLinkTargetByClass(
297 "ilskillmanagementgui",
308 $ilCtrl->setParameterByClass(
315 $ilCtrl->getLinkTargetByClass(
316 "ilskillmanagementgui",
329 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
341 if (is_object($this->node_object)) {
343 $path = $this->node_object->skill_tree->getSkillTreePath(
344 $this->node_object->getId(),
348 foreach ($path as $p) {
349 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr"))) {
350 $desc .= $sep . $p[
"title"];
355 $tpl->setDescription($desc);
366 $tpl->setContent($this->form->getHTML());
382 $radg->addOption($op);
401 $tpl->setContent($this->form->getHTML());
411 $values[
"title"] = $this->node_object->getTitle();
412 $values[
"description"] = $this->node_object->getDescription();
413 $values[
"order_nr"] = $this->node_object->getOrderNr();
414 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
415 $values[
"status"] = $this->node_object->getStatus();
417 $this->form->setValuesByArray($values);
435 if ($this->form->checkInput()) {
437 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
439 (
int)
$_GET[
"obj_id"],
441 in_array($this->getType(), array(
"sktp",
"sctp"))
445 $this->form->setValuesByPost();
446 $tpl->setContent($this->form->getHtml());
474 if ($this->form->checkInput()) {
476 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
479 $this->form->setValuesByPost();
480 $tpl->setContent($this->form->getHtml());
491 $ilCtrl->redirect($this,
"editProperties");
508 $ti->setMaxLength(200);
510 $ti->setRequired(
true);
511 $this->form->addItem($ti);
516 $this->form->addItem($ta);
521 $ni->setMaxLength(6);
523 $ni->setRequired(
true);
524 if ($a_mode ==
"create") {
526 $max = $tree->getMaxOrderNr((
int)
$_GET[
"obj_id"]);
527 $ni->setValue($max + 10);
529 $this->form->addItem($ni);
533 if ($a_mode ==
"create") {
534 $this->form->addCommandButton(
"save",
$lng->txt(
"save"));
535 $this->form->addCommandButton(
"cancelSave",
$lng->txt(
"cancel"));
536 $this->form->setTitle(
$lng->txt(
"skmg_create_" . $this->getType()));
538 $this->form->addCommandButton(
"update",
$lng->txt(
"save"));
539 $this->form->setTitle(
$lng->txt(
"skmg_edit_" . $this->getType()));
543 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
544 $this->form->setFormAction($ilCtrl->getFormAction($this));
568 if (
$_GET[
"tmpmode"]) {
576 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int) $_GET[
"obj_id"]);
578 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
580 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
585 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
586 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
590 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
591 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
609 (
int)
$_GET[
"obj_id"],
611 (
int) $_GET[
"tmpmode"]
613 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
669 $obj_id = (is_object($this->node_object))
670 ? $this->node_object->getId()
699 $lng->txt(
"skmg_usage"),
700 $ilCtrl->getLinkTarget($this,
"showUsage")
712 $this->setTabs(
"usage");
715 $base_skill_id = ($this->base_skill_id > 0)
716 ? $this->base_skill_id
717 : $this->node_object->getId();
718 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id .
":" . $this->tref_id);
721 foreach ($usages as $k => $usage) {
723 $html .= $tab->getHTML() .
"<br/><br/>";
726 $tpl->setContent($html);
739 $lng->txt(
"skmg_assigned_objects"),
740 $ilCtrl->getLinkTarget($this,
"showObjects")
751 $this->setTabs(
"objects");
753 $base_skill_id = ($this->base_skill_id > 0)
754 ? $this->base_skill_id
755 : $this->node_object->getId();
757 $objects = $usage_info->getAssignedObjectsForSkill($base_skill_id, $this->tref_id);
761 $tpl->setContent($tab->getHTML());
771 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
776 $conf = $exp->getConfig(
"Services/Skill");
777 $conf->setSelectedNodes(
$_POST[
"id"]);
780 $ilCtrl->redirectByClass(array(
"iladministrationgui",
"ilobjskillmanagementgui",
"ilexportgui"),
"");
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.
readNodeObject($a_node_id)
Get node object instance.
redirectToParent($a_tmp_mode=false)
Redirect to parent (identified by current obj_id)
cutItems()
Copy items to clipboard, then cut them from the current tree.
This class represents an option in a radio group.
insertTemplateReferenceClip()
Insert skill template references from clipboard.
static clipboardCut($a_tree_id, $a_ids)
Cut and copy a set of skills/skill categories into the clipboard.
addUsageTab($a_tabs)
Add usage tab.
static getAllStatus()
Get all status.
setSkillNodeDescription()
Set skill node description.
setLocator()
Set Locator Items.
static getIconPath($a_obj_id, $a_type, $a_size="", $a_status=0)
Get icon path.
update()
Update skill tree node.
static insertItemsFromClip($a_type, $a_obj_id)
Insert basic skills from clipboard.
showUsage()
Show skill usage.
TableGUI class for assigned objects of skills.
getParentGUI()
Get Parent GUI class (ilObjSCORM2004LearningModuleGUI).
deleteNodes()
Delete nodes in the hierarchy.
setTitleIcon()
Set title icon.
getPropertyValues()
Get property values for edit form.
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.
copyItems()
Copy items to clipboard.
showObjects()
Show assigned objects.
cancelDelete()
cancel delete
create()
Create skill tree node.
static uniqueTypesCheck($a_items)
Check for unique types.
static getInstance($a_id=0)
Basic GUI class for skill tree nodes.
confirmedDelete()
confirmed delete
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
saveAllTitles()
Save Titles.
static _lookupObjId($a_id)
cancelSave()
Cancel saving.
static clipboardCopy($a_tree_id, $a_ids)
Copy a set of skills/skill categories into the clipboard.
editProperties()
Edit properties form.
initForm($a_mode="edit")
Init form.
afterUpdate()
After update.
TableGUI class for skill usages.
save()
Save skill tree node.
static saveChildsOrder($a_par_id, $a_childs_order, $a_templates=false)
Save childs order.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static getStatusInfo($a_status)
Get status info.
insertBasicSkillClip()
Insert basic skills from clipboard.
insertSkillCategoryClip()
Insert skill categories from clipboard.
setRows($a_rows)
Set Rows.
This class represents a text area property in a property form.
insertSkillTemplateClip()
Insert skill template from clipboard.
exportSelectedNodes()
Export seleced nodes.
__construct($a_node_id=0)
constructor
static _lookupStatus($a_obj_id)
Lookup Status.
setParentGUI($a_parentgui)
Set Parent GUI class.
static setAction($a_action)
addStatusInput(ilPropertyFormGUI $a_form)
Add status input.
insertTemplateCategoryClip()
Insert skill template category from clipboard.