ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilPersonalSkillsGUI Class Reference

Personal skills GUI class. More...

+ Collaboration diagram for ilPersonalSkillsGUI:

Public Member Functions

 __construct ()
 Contructor. More...
 
 setProfileId ($a_val)
 Set profile id. More...
 
 getProfileId ()
 Get profile id. More...
 
 setGapAnalysisSelfEvalLevels (array $a_val)
 Set self evaluation levels for gap analysis. More...
 
 getGapAnalysisSelfEvalLevels ()
 Get self evaluation levels for gap analysis. More...
 
 setHistoryView ($a_val)
 Set history view. More...
 
 getHistoryView ()
 Get history view. More...
 
 getTriggerObjectsFilter ()
 
 setTriggerObjectsFilter ($trigger_objects_filter)
 
 setIntroText ($a_val)
 Set intro text. More...
 
 getIntroText ()
 Get intro text. More...
 
 hideSkill ($a_skill_id, $a_tref_id=0)
 Hide skill. More...
 
 determineCurrentProfile ()
 Determine current profile id. More...
 
 setObjectSkills ($a_obj_id, $a_skills=null)
 Set object skills. More...
 
 executeCommand ()
 Execute command. More...
 
 setTabs ($a_activate)
 Set tabs. More...
 
 setOfflineMode ($a_file_path)
 
 listSkills ()
 List skills. More...
 
 getSkillHTML ($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
 Get skill presentation HTML. More...
 
 renderSkillHTML ($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
 Render skill html. More...
 
 getMaterialInfo ($a_wsp_id, $a_user_id)
 Get material file name and goto url. More...
 
 addSkill ()
 Add personal skill. More...
 
 confirmSkillRemove ()
 Confirm skill remove. More...
 
 removeSkills ()
 Remove skills. More...
 
 assignMaterials ()
 Assign materials to skill levels. More...
 
 assignMaterial ()
 Assign materials to skill level. More...
 
 selectMaterial ()
 Select material. More...
 
 removeMaterial ()
 Remove material. More...
 
 selfEvaluation ()
 Assign materials to skill levels. More...
 
 saveSelfEvaluation ()
 Save self evaluation. More...
 
 listSkillsForAdd ()
 LIst skills for adding. More...
 
 listProfilesForGap ()
 List profiles. More...
 
 showProfileSelectorToolbar ()
 Show profile selector toolbar. More...
 
 setGapAnalysisActualStatusModePerType ($a_type, $a_cat_title="")
 Set gap analysis actual status mode "per type". More...
 
 setGapAnalysisActualStatusModePerObject ($a_obj_id, $a_cat_title="")
 Set gap analysis actual status mode "per object". More...
 
 getGapAnalysisHTML ($a_user_id=0, $a_skills=null)
 Get gap analysis html. More...
 
 selectProfile ()
 Select profile. More...
 
 getMaterials ($a_levels, $a_tref_id=0, $a_user_id=0)
 Get materials. More...
 
 getProfileTargetItem ($a_profile_id, $a_levels, $a_tref_id=0)
 Get profile target item. More...
 
 getActualGapItem ($a_levels, $a_tref_id=0)
 
 getSelfEvalGapItem ($a_levels, $a_tref_id=0)
 
 getScaleBar ($a_levels, $a_activated_levels)
 Get scale bar. More...
 
 getEvalItem ($a_levels, $a_level_entry)
 Get eval item. More...
 
 getSkillLevelDescription ($skill)
 Get level description. More...
 
 getSuggestedResources ($a_profile_id, $a_levels, $a_base_skill, $a_tref_id)
 Render suggested resources. More...
 
 listAssignedProfile ()
 List profile. More...
 

Data Fields

const LIST_SELECTED = ""
 
const LIST_PROFILES = "profiles"
 

Static Public Attributes

static $skill_tt_cnt = 1
 

Protected Member Functions

 getFilter ()
 Get filter. More...
 
 render ()
 Render. More...
 
 applyFilter ()
 Apply filter. More...
 
 applyFilterAssignedProfiles ()
 Apply filter for profiles view. More...
 
 getActualLevels ($skills, $user_id)
 Get actual levels. More...
 
 getSkillCategoryDescription (int $skill_id, int $tref_id)
 Get description for skill category. More...
 
 getBasicSkillDescription (string $description)
 Get description for basic skill. More...
 

Protected Attributes

 $offline_mode
 
 $skill_tree
 
 $actual_levels = array()
 
 $gap_self_eval_levels = array()
 
 $mode = ""
 
 $history_view = false
 
 $trigger_objects_filter = array()
 
 $intro_text = ""
 
 $hidden_skills = array()
 
 $ui
 
 $ctrl
 
 $lng
 
 $help
 
 $setting
 
 $user
 
 $tpl
 
 $tabs
 
 $toolbar
 
 $access
 
 $ui_fac
 
 $ui_ren
 
 $obj_id = 0
 
 $obj_skills = array()
 
 $filter
 
 $list_mode = self::LIST_SELECTED
 

Detailed Description

Personal skills GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilPersonalSkillsGUI:

Definition at line 18 of file class.ilPersonalSkillsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPersonalSkillsGUI::__construct ( )

Contructor.

@access public

Definition at line 111 of file class.ilPersonalSkillsGUI.php.

112 {
113 global $DIC;
114
115 $this->ctrl = $DIC->ctrl();
116 $this->lng = $DIC->language();
117 $this->help = $DIC["ilHelp"];
118 $this->setting = $DIC["ilSetting"];
119 $this->user = $DIC->user();
120 $this->tpl = $DIC["tpl"];
121 $this->tabs = $DIC->tabs();
122 $this->toolbar = $DIC->toolbar();
123 $this->access = $DIC->access();
124 $this->ui_fac = $DIC->ui()->factory();
125 $this->ui_ren = $DIC->ui()->renderer();
126 $this->ui = $DIC->ui();
127
129 $ilHelp = $this->help;
132
133
134 $lng->loadLanguageModule('skmg');
135 $ilHelp->setScreenIdComponent("skill");
136
137 $ilCtrl->saveParameter($this, "skill_id");
138 $ilCtrl->saveParameter($this, "tref_id");
139 $ilCtrl->saveParameter($this, "profile_id");
140 $ilCtrl->saveParameter($this, "list_mode");
141
142 $this->list_mode = $_GET["list_mode"];
143
144 $this->user_profiles = ilSkillProfile::getProfilesOfUser($this->user->getId());
145
146 include_once("./Services/Skill/classes/class.ilSkillTree.php");
147 $this->skill_tree = new ilSkillTree();
148
149 $this->use_materials = !$ilSetting->get("disable_personal_workspace");
150
151 include_once("./Services/Skill/classes/class.ilSkillManagementSettings.php");
152 $this->skmg_settings = new ilSkillManagementSettings();
153
154 $this->filter = new ilPersonalSkillsFilterGUI();
155 }
user()
Definition: user.php:4
$_GET["client_id"]
static getProfilesOfUser($a_user_id)
Get profiles of a user.
help()
Definition: help.php:2
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46

References $_GET, $ctrl, $DIC, $help, $ilCtrl, $ilSetting, $lng, $setting, ilSkillProfile\getProfilesOfUser(), help(), ui(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addSkill()

ilPersonalSkillsGUI::addSkill ( )

Add personal skill.

Definition at line 758 of file class.ilPersonalSkillsGUI.php.

759 {
763
764 ilPersonalSkill::addPersonalSkill($ilUser->getId(), (int) $_GET["obj_id"]);
765
766 ilUtil::sendSuccess($lng->txt("msg_object_modified"));
767 $ilCtrl->redirect($this, "listSkills");
768 }
static addPersonalSkill($a_user_id, $a_skill_node_id)
Add personal skill.
$ilUser
Definition: imgupload.php:18

References $_GET, $ctrl, $ilCtrl, $ilUser, $lng, $user, and ilPersonalSkill\addPersonalSkill().

+ Here is the call graph for this function:

◆ applyFilter()

ilPersonalSkillsGUI::applyFilter ( )
protected

Apply filter.

Definition at line 462 of file class.ilPersonalSkillsGUI.php.

463 {
464 $this->getFilter()->save();
465 $this->ctrl->redirect($this, "listSkills");
466 }

References getFilter().

+ Here is the call graph for this function:

◆ applyFilterAssignedProfiles()

ilPersonalSkillsGUI::applyFilterAssignedProfiles ( )
protected

Apply filter for profiles view.

Definition at line 471 of file class.ilPersonalSkillsGUI.php.

472 {
473 $this->getFilter()->save();
474 $this->ctrl->redirect($this, "listAssignedProfile");
475 }

References getFilter().

+ Here is the call graph for this function:

◆ assignMaterial()

ilPersonalSkillsGUI::assignMaterial ( )

Assign materials to skill level.

Parameters

return

Definition at line 916 of file class.ilPersonalSkillsGUI.php.

917 {
922 $ilTabs = $this->tabs;
924 $ui = $this->ui;
925
926 if (!$ilSetting->get("disable_personal_workspace")) {
927 $url = 'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
928 $mbox = $ui->factory()->messageBox()->info($lng->txt("skmg_ass_materials_from_workspace"))
929 ->withLinks([$ui->factory()->link()->standard(
930 $lng->txt("personal_resources"),
931 $url
932 )]);
933 $message = $ui->renderer()->render($mbox);
934 }
935
936 $ilCtrl->saveParameter($this, "skill_id");
937 $ilCtrl->saveParameter($this, "level_id");
938 $ilCtrl->saveParameter($this, "tref_id");
939 $ilCtrl->saveParameter($this, "basic_skill_id");
940
941 $ilTabs->setBackTarget(
942 $lng->txt("back"),
943 $ilCtrl->getLinkTarget($this, "assignMaterials")
944 );
945
946
947 include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorerGUI.php");
948 $exp = new ilWorkspaceExplorerGUI($ilUser->getId(), $this, "assignMaterial", $this, "");
949 $exp->setTypeWhiteList(array("blog", "wsrt", "wfld", "file", "tstv", "excv"));
950 $exp->setSelectableTypes(array("file", "tstv", "excv"));
951 $exp->setSelectMode("wsp_id", true);
952 if ($exp->handleCommand()) {
953 return;
954 }
955
956 // fill template
957 $mtpl = new ilTemplate("tpl.materials_selection.html", true, true, "Services/Skill");
958 $mtpl->setVariable("EXP", $exp->getHTML());
959
960 // toolbars
961 $tb = new ilToolbarGUI();
962 $tb->addFormButton(
963 $lng->txt("select"),
964 "selectMaterial"
965 );
966 $tb->setFormAction($ilCtrl->getFormAction($this));
967 $tb->setOpenFormTag(true);
968 $tb->setCloseFormTag(false);
969 $mtpl->setVariable("TOOLBAR1", $tb->getHTML());
970 $tb->setOpenFormTag(false);
971 $tb->setCloseFormTag(true);
972 $mtpl->setVariable("TOOLBAR2", $tb->getHTML());
973
974 $tpl->setContent($message . $mtpl->get());
975 }
special template class to simplify handling of ITX/PEAR
Explorer for selecting a personal workspace item.
$url
$message
Definition: xapiexit.php:14

References $ctrl, $ilCtrl, $ilSetting, $ilUser, $lng, $message, $setting, $tabs, $tpl, $ui, $url, and $user.

◆ assignMaterials()

ilPersonalSkillsGUI::assignMaterials ( )

Assign materials to skill levels.

Parameters

return

Definition at line 834 of file class.ilPersonalSkillsGUI.php.

835 {
839 $ilToolbar = $this->toolbar;
840 $ilTabs = $this->tabs;
841
842
843 $ilTabs->setBackTarget(
844 $lng->txt("back"),
845 $ilCtrl->getLinkTarget($this, "render")
846 );
847
848 $ilCtrl->saveParameter($this, "skill_id");
849 $ilCtrl->saveParameter($this, "basic_skill_id");
850 $ilCtrl->saveParameter($this, "tref_id");
851
852 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
853 $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
854 $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
855 ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
856 ".svg"));
857
858 // basic skill selection
859 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
860 $vtree = new ilVirtualSkillTree();
861 $tref_id = 0;
862 $skill_id = (int) $_GET["skill_id"];
863 if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
864 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
865 $tref_id = $_GET["skill_id"];
866 $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
867 }
868 $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
869
870 $options = array();
871 foreach ($bs as $b) {
872 //$options[$b["id"]] = ilSkillTreeNode::_lookupTitle($b["id"]);
873 $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
874 }
875
876 $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
877 ? (int) $_POST["basic_skill_id"]
878 : (((int) $_GET["basic_skill_id"] > 0)
879 ? (int) $_GET["basic_skill_id"]
880 : key($options));
881
882 $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
883
884 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
885 $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
886 $si->setOptions($options);
887 $si->setValue($cur_basic_skill_id);
888 $ilToolbar->addInputItem($si, true);
889 $ilToolbar->addFormButton(
890 $lng->txt("select"),
891 "assignMaterials"
892 );
893
894 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
895
896 // table
897 include_once("./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
899 $this,
900 "assignMaterials",
901 (int) $_GET["skill_id"],
902 (int) $_GET["tref_id"],
903 $cur_basic_skill_id
904 );
905
906 $tpl->setContent($tab->getHTML());
907 }
$_POST["username"]
This class represents a selection list property in a property form.
Assign materials to skill levels table.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static _lookupType($a_obj_id)
Lookup Type.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_GET, $_POST, Vendor\Package\$b, $ctrl, $ilCtrl, $lng, $si, $tab, $tabs, $toolbar, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ confirmSkillRemove()

ilPersonalSkillsGUI::confirmSkillRemove ( )

Confirm skill remove.

Definition at line 775 of file class.ilPersonalSkillsGUI.php.

776 {
780
781 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
782 if ($_GET["skill_id"] > 0) {
783 $_POST["id"][] = $_GET["skill_id"];
784 }
785 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
786 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
787 $ilCtrl->redirect($this, "listSkills");
788 } else {
789 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
790 $cgui = new ilConfirmationGUI();
791 $cgui->setFormAction($ilCtrl->getFormAction($this));
792 $cgui->setHeaderText($lng->txt("skmg_really_remove_skills"));
793 $cgui->setCancel($lng->txt("cancel"), "listSkills");
794 $cgui->setConfirm($lng->txt("remove"), "removeSkills");
795
796 foreach ($_POST["id"] as $i) {
797 $cgui->addItem("id[]", $i, ilSkillTreeNode::_lookupTitle($i));
798 }
799
800 $tpl->setContent($cgui->getHTML());
801 }
802 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$i
Definition: metadata.php:24

References $_GET, $_POST, $ctrl, $i, $ilCtrl, $lng, $tpl, ilSkillTreeNode\_lookupTitle(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ determineCurrentProfile()

ilPersonalSkillsGUI::determineCurrentProfile ( )

Determine current profile id.

Parameters

return

Definition at line 281 of file class.ilPersonalSkillsGUI.php.

282 {
284
285 if (count($this->user_profiles) == 0) {
286 return;
287 }
288 $current_prof_id = 0;
289 if ((int) $_GET["profile_id"] > 0) {
290 foreach ($this->user_profiles as $p) {
291 if ($p["id"] == (int) $_GET["profile_id"]) {
292 $current_prof_id = (int) $_GET["profile_id"];
293 }
294 }
295 }
296
297 if ($current_prof_id == 0 && !(is_array($this->obj_skills) && $this->obj_id > 0)) {
298 $current_prof_id = $this->user_profiles[0]["id"];
299 }
300 $ilCtrl->setParameter($this, "profile_id", $current_prof_id);
301 $this->setProfileId($current_prof_id);
302 }
setProfileId($a_val)
Set profile id.

References $_GET, $ctrl, $ilCtrl, and setProfileId().

Referenced by listAssignedProfile(), and listProfilesForGap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPersonalSkillsGUI::executeCommand ( )

Execute command.

@access public

Definition at line 322 of file class.ilPersonalSkillsGUI.php.

323 {
328
329 $next_class = $ilCtrl->getNextClass($this);
330
331
332 // determin standard command
333 $std_cmd = "listSkills";
334
335 $cmd = $ilCtrl->getCmd($std_cmd);
336
337 //$tpl->setTitle($lng->txt("skills"));
338 //$tpl->setTitleIcon(ilUtil::getImagePath("icon_skmg.svg"));
339
340 switch ($next_class) {
341 default:
342 $this->$cmd();
343 break;
344 }
345 return true;
346 }

References $ctrl, $ilCtrl, $ilUser, $lng, $tpl, and $user.

◆ getActualGapItem()

ilPersonalSkillsGUI::getActualGapItem (   $a_levels,
  $a_tref_id = 0 
)
Parameters

return

Definition at line 1610 of file class.ilPersonalSkillsGUI.php.

1611 {
1612 $lng = $this->lng;
1613
1614 $a_activated_levels = array();
1615 foreach ($a_levels as $k => $v) {
1616 if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1617 $a_activated_levels[] = $v["id"];
1618 }
1619 }
1620
1621 if ($this->gap_cat_title != "") {
1622 $title = $this->gap_cat_title;
1623 } elseif ($this->gap_mode == "max_per_type") {
1624 $title = $lng->txt("objs_" . $this->gap_mode_type);
1625 } elseif ($this->gap_mode == "max_per_object") {
1626 $title = ilObject::_lookupTitle($this->gap_mode_obj_id);
1627 }
1628
1629 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1630 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1631
1632 $type = 1;
1633 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1634 if ($type > 0) {
1635 $tpl->touchBlock("st" . $type);
1636 $tpl->touchBlock("stb" . $type);
1637 }
1638
1639 if ($title != $lng->txt("skmg_eval_type_" . $type)) {
1640 $tpl->setVariable("TITLE", $title);
1641 }
1642
1643 return $tpl->get();
1644 }
static _lookupTitle($a_id)
lookup object title
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
$type

References $lng, $tpl, $type, ilObject\_lookupTitle(), and getScaleBar().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActualLevels()

ilPersonalSkillsGUI::getActualLevels (   $skills,
  $user_id 
)
protected

Get actual levels.

Parameters
array$skills
int$user_id

Definition at line 1262 of file class.ilPersonalSkillsGUI.php.

1263 {
1264 // get actual levels for gap analysis
1265 $this->actual_levels = array();
1266 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
1267 foreach ($skills as $sk) {
1268 $bs = new ilBasicSkill($sk["base_skill_id"]);
1269 if ($this->gap_mode == "max_per_type") {
1270 $max = $bs->getMaxLevelPerType($sk["tref_id"], $this->gap_mode_type, $user_id);
1271 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1272 } elseif ($this->gap_mode == "max_per_object") {
1273 $max = $bs->getMaxLevelPerObject($sk["tref_id"], $this->gap_mode_obj_id, $user_id);
1274 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1275 } else {
1276 $max = $bs->getMaxLevel($sk["tref_id"], $user_id);
1277 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1278 }
1279 }
1280 }

Referenced by getGapAnalysisHTML(), and listAssignedProfile().

+ Here is the caller graph for this function:

◆ getBasicSkillDescription()

ilPersonalSkillsGUI::getBasicSkillDescription ( string  $description)
protected

Get description for basic skill.

Parameters
string$description
Returns
string

Definition at line 1787 of file class.ilPersonalSkillsGUI.php.

1787 : string
1788 {
1789 $tpl = new ilTemplate("tpl.skill_description_basic.html", true, true, "Services/Skill");
1790
1791 if (!is_null($description) && !empty($description)) {
1792 $tpl->setCurrentBlock("description_basic");
1793 $tpl->setVariable("DESCRIPTION_BASIC", $description);
1794 $tpl->parseCurrentBlock();
1795 }
1796
1797 return $tpl->get();
1798 }

References $tpl.

Referenced by renderSkillHTML().

+ Here is the caller graph for this function:

◆ getEvalItem()

ilPersonalSkillsGUI::getEvalItem (   $a_levels,
  $a_level_entry 
)

Get eval item.

Parameters

return

Definition at line 1710 of file class.ilPersonalSkillsGUI.php.

1711 {
1712 $lng = $this->lng;
1713 $ilAccess = $this->access;
1714
1715 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1716 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_level_entry["level_id"]));
1717
1718 include_once("./Services/Skill/classes/class.ilSkillEval.php");
1720
1721 if ($a_level_entry["self_eval"] == 1) {
1723 }
1724
1725 if ($a_level_entry["trigger_obj_type"] == "tst") {
1727 }
1728
1730 $title = ($a_level_entry["trigger_obj_id"] > 0)
1731 ? $a_level_entry["trigger_title"]
1732 : "";
1733
1734 if ($a_level_entry["trigger_ref_id"] > 0
1735 && $ilAccess->checkAccess("read", "", $a_level_entry["trigger_ref_id"])) {
1736 include_once("./Services/Link/classes/class.ilLink.php");
1737 $title = "<a href='" . ilLink::_getLink($a_level_entry["trigger_ref_id"]) . "'>" . $title . "</a>";
1738 }
1739
1740 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1741 if ($type > 0) {
1742 $tpl->touchBlock("st" . $type);
1743 $tpl->touchBlock("stb" . $type);
1744 }
1745 $tpl->setVariable("TITLE", $title);
1746 $tpl->setVariable(
1747 "DATE",
1748 ilDatePresentation::formatDate(new ilDate($a_level_entry["status_date"], IL_CAL_DATETIME))
1749 );
1750
1752
1753 return $tpl->get();
1754 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
Class for single dates.

References $access, $lng, $tpl, $type, ilLink\_getLink(), ilDatePresentation\formatDate(), getScaleBar(), IL_CAL_DATETIME, ilDatePresentation\setUseRelativeDates(), ilSkillEval\TYPE_APPRAISAL, ilSkillEval\TYPE_MEASUREMENT, and ilSkillEval\TYPE_SELF_EVAL.

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFilter()

ilPersonalSkillsGUI::getFilter ( )
protected

Get filter.

Returns
ilPersonalSkillsFilterGUI

Definition at line 162 of file class.ilPersonalSkillsGUI.php.

References $filter.

Referenced by applyFilter(), applyFilterAssignedProfiles(), listAssignedProfile(), listSkills(), and renderSkillHTML().

+ Here is the caller graph for this function:

◆ getGapAnalysisHTML()

ilPersonalSkillsGUI::getGapAnalysisHTML (   $a_user_id = 0,
  $a_skills = null 
)

Get gap analysis html.

Parameters

param array $a_skills deprecated, use setObjectSkills and listProfiles instead

Returns

Definition at line 1290 of file class.ilPersonalSkillsGUI.php.

1291 {
1293 $lng = $this->lng;
1294
1295
1296 if ($a_skills == null) {
1297 $a_skills = $this->obj_skills;
1298 }
1299
1300 include_once("./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
1301
1302 if ($this->getIntroText() != "") {
1303 $pan = ilPanelGUI::getInstance();
1304 $pan->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
1305 $pan->setBody($this->getIntroText());
1306 $intro_html = $pan->getHTML();
1307 }
1308
1309 // $this->setTabs("list_skills");
1310
1311 if ($a_user_id == 0) {
1312 $user_id = $ilUser->getId();
1313 } else {
1314 $user_id = $a_user_id;
1315 }
1316
1317 $skills = array();
1318 if ($this->getProfileId() > 0) {
1319 $profile = new ilSkillProfile($this->getProfileId());
1320 $this->profile_levels = $profile->getSkillLevels();
1321
1322 foreach ($this->profile_levels as $l) {
1323 $skills[] = array(
1324 "base_skill_id" => $l["base_skill_id"],
1325 "tref_id" => $l["tref_id"],
1326 "level_id" => $l["level_id"]
1327 );
1328 }
1329 } elseif (is_array($a_skills)) {
1330 $skills = $a_skills;
1331 }
1332
1333 // get actual levels for gap analysis
1334 $this->getActualLevels($skills, $user_id);
1335
1336 $incl_self_eval = false;
1337 if (count($this->getGapAnalysisSelfEvalLevels()) > 0) {
1338 $incl_self_eval = true;
1339 $self_vals = $this->getGapAnalysisSelfEvalLevels();
1340 }
1341
1342 // output spider stuff
1343 $all_chart_html = "";
1344
1345 // determine skills that should be shown in the spider web
1346 $sw_skills = array();
1347 foreach ($skills as $sk) {
1348 if (!in_array($sk["base_skill_id"] . ":" . $sk["tref_id"], $this->hidden_skills)) {
1349 $sw_skills[] = $sk;
1350 }
1351 }
1352
1353 if (count($sw_skills) >= 3) {
1354 $skill_packages = array();
1355
1356 if (count($sw_skills) < 8) {
1357 $skill_packages[1] = $sw_skills;
1358 } else {
1359 $mod = count($sw_skills) % 7;
1360 $pkg_num = floor((count($sw_skills) - 1) / 7) + 1;
1361 $cpkg = 1;
1362 foreach ($sw_skills as $k => $s) {
1363 $skill_packages[$cpkg][$k] = $s;
1364 if ($mod < 3 && count($skill_packages) == ($pkg_num - 1) && count($skill_packages[$cpkg]) == 3 + $mod) {
1365 $cpkg += 1;
1366 } elseif (count($skill_packages[$cpkg]) == 7) {
1367 $cpkg += 1;
1368 }
1369 }
1370 }
1371
1372 $pkg_cnt = 0;
1373 foreach ($skill_packages as $pskills) {
1374 $pkg_cnt++;
1375 $max_cnt = 0;
1376 $leg_labels = array();
1377 //var_dump($this->profile_levels);
1378 //foreach ($this->profile_levels as $k => $l)
1379
1380 // write target, actual and self counter to skill array
1381 foreach ($pskills as $k => $l) {
1382 //$bs = new ilBasicSkill($l["base_skill_id"]);
1383 $bs = new ilBasicSkill($l["base_skill_id"]);
1384 $leg_labels[] = ilBasicSkill::_lookupTitle($l["base_skill_id"], $l["tref_id"]);
1385 $levels = $bs->getLevelData();
1386 $cnt = 0;
1387 foreach ($levels as $lv) {
1388 $cnt++;
1389 if ($l["level_id"] == $lv["id"]) {
1390 $pskills[$k]["target_cnt"] = $cnt;
1391 }
1392 if ($this->actual_levels[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"]) {
1393 $pskills[$k]["actual_cnt"] = $cnt;
1394 }
1395 if ($incl_self_eval) {
1396 if ($self_vals[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"]) {
1397 $pskills[$k]["self_cnt"] = $cnt;
1398 }
1399 }
1400 $max_cnt = max($max_cnt, $cnt);
1401 }
1402 }
1403
1404 include_once("./Services/Chart/classes/class.ilChart.php");
1405 $chart = ilChart::getInstanceByType(ilChart::TYPE_SPIDER, "gap_chart" . $pkg_cnt);
1406 $chart->setsize(800, 300);
1407 $chart->setYAxisMax($max_cnt);
1408 $chart->setLegLabels($leg_labels);
1409
1410 // target level
1411 $cd = $chart->getDataInstance();
1412 $cd->setLabel($lng->txt("skmg_target_level"));
1413 $cd->setFill(true, "#A0A0A0");
1414
1415 // other users
1416 $cd2 = $chart->getDataInstance();
1417 if ($this->gap_cat_title != "") {
1418 $cd2->setLabel($this->gap_cat_title);
1419 } elseif ($this->gap_mode == "max_per_type") {
1420 $cd2->setLabel($lng->txt("objs_" . $this->gap_mode_type));
1421 } elseif ($this->gap_mode == "max_per_object") {
1422 $cd2->setLabel(ilObject::_lookupTitle($this->gap_mode_obj_id));
1423 }
1424 //$cd2->setFill(true, "#dcb496");
1425 $cd2->setFill(true, "#FF8080");
1426 $cd2->setFill(true, "#cc8466");
1427
1428 // self evaluation
1429 if ($incl_self_eval) {
1430 $cd3 = $chart->getDataInstance();
1431 $cd3->setLabel($lng->txt("skmg_self_evaluation"));
1432 $cd3->setFill(true, "#6ea03c");
1433 }
1434
1435 // fill in data
1436 $cnt = 0;
1437 foreach ($pskills as $pl) {
1438 $cd->addPoint($cnt, (int) $pl["target_cnt"]);
1439 $cd2->addPoint($cnt, (int) $pl["actual_cnt"]);
1440 if ($incl_self_eval) {
1441 $cd3->addPoint($cnt, (int) $pl["self_cnt"]);
1442 }
1443 $cnt++;
1444 }
1445
1446 // add data to chart
1447 if ($this->getProfileId() > 0) {
1448 $chart->addData($cd);
1449 }
1450 $chart->addData($cd2);
1451 if ($incl_self_eval && count($this->getGapAnalysisSelfEvalLevels()) > 0) {
1452 $chart->addData($cd3);
1453 }
1454
1455 if ($pkg_cnt == 1) {
1456 $lg = new ilChartLegend();
1457 $chart->setLegend($lg);
1458 }
1459
1460 $chart_html = $chart->getHTML();
1461 $all_chart_html .= $chart_html;
1462 }
1463
1464 $pan = ilPanelGUI::getInstance();
1465 $pan->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
1466 $pan->setBody($all_chart_html);
1467 $all_chart_html = $pan->getHTML();
1468 }
1469
1470 $stree = new ilSkillTree();
1471 $html = "";
1472
1473 // order skills per virtual skill tree
1474 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
1475 $vtree = new ilVirtualSkillTree();
1476 $skills = $vtree->getOrderedNodeset($skills, "base_skill_id", "tref_id");
1477 foreach ($skills as $s) {
1478 $path = $stree->getSkillTreePath($s["base_skill_id"]);
1479
1480 // check draft
1481 foreach ($path as $p) {
1482 if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
1483 continue(2);
1484 }
1485 }
1486 $html .= $this->getSkillHTML($s["base_skill_id"], $user_id, false, $s["tref_id"]);
1487 }
1488
1489 // list skills
1490 // include_once("./Services/Skill/classes/class.ilPersonalSkillTableGUI.php");
1491 // $sktab = new ilPersonalSkillTableGUI($this, "listSkills");
1492
1493 return $intro_html . $all_chart_html . $html;
1494 }
const TYPE_SPIDER
static getInstanceByType($a_type, $a_id)
Get type instance.
static getInstance()
Get instance.
const PANEL_STYLE_PRIMARY
getActualLevels($skills, $user_id)
Get actual levels.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.

References $ilUser, $lng, $obj_skills, $user, ilObject\_lookupTitle(), ilSkillTreeNode\_lookupTitle(), getActualLevels(), getGapAnalysisSelfEvalLevels(), ilPanelGUI\getInstance(), ilChart\getInstanceByType(), getIntroText(), getProfileId(), getSkillHTML(), ilPanelGUI\PANEL_STYLE_PRIMARY, ilSkillTreeNode\STATUS_DRAFT, and ilChart\TYPE_SPIDER.

Referenced by listProfilesForGap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGapAnalysisSelfEvalLevels()

ilPersonalSkillsGUI::getGapAnalysisSelfEvalLevels ( )

Get self evaluation levels for gap analysis.

Returns
array self evaluation values key1: base_skill_id, key2: tref_id: value: level id

Definition at line 203 of file class.ilPersonalSkillsGUI.php.

References $gap_self_eval_levels.

Referenced by getGapAnalysisHTML(), and getSelfEvalGapItem().

+ Here is the caller graph for this function:

◆ getHistoryView()

ilPersonalSkillsGUI::getHistoryView ( )

Get history view.

Returns
bool history view

Definition at line 223 of file class.ilPersonalSkillsGUI.php.

References $history_view.

◆ getIntroText()

ilPersonalSkillsGUI::getIntroText ( )

Get intro text.

Returns
string intro text html

Definition at line 259 of file class.ilPersonalSkillsGUI.php.

References $intro_text.

Referenced by getGapAnalysisHTML().

+ Here is the caller graph for this function:

◆ getMaterialInfo()

ilPersonalSkillsGUI::getMaterialInfo (   $a_wsp_id,
  $a_user_id 
)

Get material file name and goto url.

Parameters
int$a_wsp_id
Returns
array caption, url

Definition at line 692 of file class.ilPersonalSkillsGUI.php.

693 {
694 if (!$this->ws_tree) {
695 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
696 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
697 $this->ws_tree = new ilWorkspaceTree($a_user_id);
698 $this->ws_access = new ilWorkspaceAccessHandler($caption);
699 }
700
701 $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
703
704 if (!$this->offline_mode) {
705 $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
706 } else {
707 $url = $this->offline_mode . "file_" . $obj_id . "/";
708
709 // all possible material types for now
711 case "tstv":
712 include_once "Modules/Test/classes/class.ilObjTestVerification.php";
713 $obj = new ilObjTestVerification($obj_id, false);
714 $url .= $obj->getOfflineFilename();
715 break;
716
717 case "excv":
718 include_once "Modules/Exercise/classes/class.ilObjExerciseVerification.php";
719 $obj = new ilObjExerciseVerification($obj_id, false);
720 $url .= $obj->getOfflineFilename();
721 break;
722
723 case "crsv":
724 include_once "Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
725 $obj = new ilObjCourseVerification($obj_id, false);
726 $url .= $obj->getOfflineFilename();
727 break;
728
729 case "cmxv":
730 $obj = new ilObjCmiXapiVerification($obj_id, false);
731 $url .= $obj->getOfflineFilename();
732 break;
733
734 case "ltiv":
735 $obj = new ilObjLTIConsumerVerification($obj_id, false);
736 $url .= $obj->getOfflineFilename();
737 break;
738
739 case "scov":
740 include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
741 $obj = new ilObjSCORMVerification($obj_id, false);
742 $url .= $obj->getOfflineFilename();
743 break;
744
745 case "file":
746 $file = new ilObjFile($obj_id, false);
747 $url .= $file->getFilename();
748 break;
749 }
750 }
751
752 return array($caption, $url);
753 }
Class ilObjFile.
static _lookupType($a_id, $a_reference=false)
lookup object type
Access handler for personal workspace.
Tree handler for personal workspace.

References $obj_id, $url, ilObject\_lookupTitle(), and ilObject\_lookupType().

Referenced by getMaterials().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMaterials()

ilPersonalSkillsGUI::getMaterials (   $a_levels,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Get materials.

Parameters

return string

Definition at line 1519 of file class.ilPersonalSkillsGUI.php.

1520 {
1522 $lng = $this->lng;
1523
1524 if ($a_user_id == 0) {
1525 $a_user_id = $ilUser->getId();
1526 }
1527
1528 // only render, if materials given
1529 $got_mat = false;
1530 foreach ($a_levels as $v) {
1532 $a_user_id,
1533 $a_tref_id,
1534 $v["id"]
1535 );
1536 if ($mat_cnt > 0) {
1537 $got_mat = true;
1538 }
1539 }
1540 if (!$got_mat) {
1541 return "";
1542 }
1543
1544 $tpl = new ilTemplate("tpl.skill_materials.html", true, true, "Services/Skill");
1545 foreach ($a_levels as $k => $v) {
1546 $got_mat = false;
1548 $a_user_id,
1549 $a_tref_id,
1550 $v["id"]
1551 ) as $item) {
1552 $tpl->setCurrentBlock("material");
1553 $mat_data = $this->getMaterialInfo($item["wsp_id"], $a_user_id);
1554 $tpl->setVariable("HREF_LINK", $mat_data[1]);
1555 $tpl->setVariable("TXT_LINK", $mat_data[0]);
1556 $tpl->parseCurrentBlock();
1557 $got_mat = true;
1558 }
1559 if ($got_mat) {
1560 $tpl->setCurrentBlock("level");
1561 $tpl->setVariable("LEVEL_VAL", $v["title"]);
1562 $tpl->parseCurrentBlock();
1563 }
1564 }
1565 $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_materials"));
1566
1567 return $tpl->get();
1568 }
static getAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
static countAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
getMaterialInfo($a_wsp_id, $a_user_id)
Get material file name and goto url.

References $ilUser, $lng, $tpl, $user, ilPersonalSkill\countAssignedMaterial(), ilPersonalSkill\getAssignedMaterial(), and getMaterialInfo().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProfileId()

ilPersonalSkillsGUI::getProfileId ( )

Get profile id.

Returns

Definition at line 183 of file class.ilPersonalSkillsGUI.php.

184 {
185 return $this->profile_id;
186 }

Referenced by getGapAnalysisHTML(), listAssignedProfile(), renderSkillHTML(), and showProfileSelectorToolbar().

+ Here is the caller graph for this function:

◆ getProfileTargetItem()

ilPersonalSkillsGUI::getProfileTargetItem (   $a_profile_id,
  $a_levels,
  $a_tref_id = 0 
)

Get profile target item.

Parameters

return

Definition at line 1576 of file class.ilPersonalSkillsGUI.php.

1577 {
1578 $lng = $this->lng;
1579
1580 $profile = new ilSkillProfile($a_profile_id);
1581 $profile_levels = $profile->getSkillLevels();
1582
1583 $a_activated_levels = array();
1584
1585 foreach ($a_levels as $k => $v) {
1586 foreach ($profile_levels as $pl) {
1587 if ($pl["level_id"] == $v["id"] &&
1588 $pl["base_skill_id"] == $v["skill_id"] &&
1589 $a_tref_id == $pl["tref_id"]) {
1590 $a_activated_levels[] = $pl["level_id"];
1591 }
1592 }
1593 }
1594
1595 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1596 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1597
1598 $tpl->setVariable("TYPE", $lng->txt("skmg_target_level"));
1599 $tpl->setVariable("TITLE", "");
1600
1601 return $tpl->get();
1602 }

References $lng, $tpl, and getScaleBar().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getScaleBar()

ilPersonalSkillsGUI::getScaleBar (   $a_levels,
  $a_activated_levels 
)

Get scale bar.

Parameters

return

Definition at line 1688 of file class.ilPersonalSkillsGUI.php.

1689 {
1690 $vals = array();
1691
1692 if (!is_array($a_activated_levels)) {
1693 $a_activated_levels = array($a_activated_levels);
1694 }
1695
1696 foreach ($a_levels as $level) {
1697 $vals[$level["title"]] = (in_array($level["id"], $a_activated_levels));
1698 }
1699 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1700
1701 return $this->ui_ren->render($scale_bar);
1702 }

Referenced by getActualGapItem(), getEvalItem(), getProfileTargetItem(), and getSelfEvalGapItem().

+ Here is the caller graph for this function:

◆ getSelfEvalGapItem()

ilPersonalSkillsGUI::getSelfEvalGapItem (   $a_levels,
  $a_tref_id = 0 
)
Parameters

return

Definition at line 1652 of file class.ilPersonalSkillsGUI.php.

1653 {
1654 $lng = $this->lng;
1655
1656 $self_vals = $this->getGapAnalysisSelfEvalLevels();
1657 if (count($self_vals) == 0) {
1658 return;
1659 }
1660
1661 $a_activated_levels = array();
1662 foreach ($a_levels as $k => $v) {
1663 if ($self_vals[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1664 $a_activated_levels[] = $v["id"];
1665 }
1666 }
1667
1668 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1669 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1670
1671 $type = 3;
1672 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1673 if ($type > 0) {
1674 $tpl->touchBlock("st" . $type);
1675 $tpl->touchBlock("stb" . $type);
1676 }
1677
1678 return $tpl->get();
1679 }

References $lng, $tpl, $type, getGapAnalysisSelfEvalLevels(), and getScaleBar().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillCategoryDescription()

ilPersonalSkillsGUI::getSkillCategoryDescription ( int  $skill_id,
int  $tref_id 
)
protected

Get description for skill category.

Parameters
int$skill_id
int$tref_id
Returns
string

Definition at line 1764 of file class.ilPersonalSkillsGUI.php.

1764 : string
1765 {
1766 $tpl = new ilTemplate("tpl.skill_description_category.html", true, true, "Services/Skill");
1767
1768 //if (ilSkillTreeNode::_lookupType($skill_id) == "scat") {
1769 $des = ilSkillTreeNode::_lookupDescription($skill_id);
1770 if (!is_null($des) && !empty($des)) {
1771 $tpl->setCurrentBlock("description_category");
1772 $tpl->setVariable("DESCRIPTION_CATEGORY", $des);
1773 $tpl->parseCurrentBlock();
1774 }
1775 //}
1776
1777 return $tpl->get();
1778 }
static _lookupDescription($a_obj_id)
Lookup Description.

References $tpl, and ilSkillTreeNode\_lookupDescription().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillHTML()

ilPersonalSkillsGUI::getSkillHTML (   $a_top_skill_id,
  $a_user_id = 0,
  $a_edit = false,
  $a_tref_id = 0 
)

Get skill presentation HTML.

$a_top_skill_id is a node of the skill "main tree", it can be a tref id!

  • called in listSkills (this class) -> $a_top_skill is the selected user skill (main tree node id), tref_id not set
  • called in ilPortfolioPage -> $a_top_skill is the selected user skill (main tree node id), tref_id not set
  • called in getGapAnalysis (this class) -> $a_top_skill id is the (basic) skill_id, tref_id may be set

Definition at line 486 of file class.ilPersonalSkillsGUI.php.

487 {
488 // user interface plugin slot + default rendering
489 include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
490 $uip = new ilUIHookProcessor(
491 "Services/Skill",
492 "personal_skill_html",
493 array("personal_skills_gui" => $this, "top_skill_id" => $a_top_skill_id, "user_id" => $a_user_id,
494 "edit" => $a_edit, "tref_id" => $a_tref_id)
495 );
496 if (!$uip->replaced()) {
497 $skill_html = $this->renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
498 }
499 $skill_html = $uip->getHTML($skill_html);
500
501 return $skill_html;
502 }
renderSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Render skill html.
Class ilUIHookProcessor.

References renderSkillHTML().

Referenced by getGapAnalysisHTML(), listAssignedProfile(), and listSkills().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillLevelDescription()

ilPersonalSkillsGUI::getSkillLevelDescription (   $skill)

Get level description.

Parameters

return

Definition at line 1806 of file class.ilPersonalSkillsGUI.php.

1807 {
1808 $level_data = $skill->getLevelData();
1809 $tpl = new ilTemplate("tpl.skill_desc.html", true, true, "Services/Skill");
1810
1811 $desc_exists = false;
1812 foreach ($level_data as $l) {
1813 if ($l["description"] != "") {
1814 $desc_exists = true;
1815 }
1816 }
1817 reset($level_data);
1818 if ($desc_exists) {
1819 foreach ($level_data as $l) {
1820 $tpl->setCurrentBlock("level");
1821 $tpl->setVariable("LEVEL_VAL", $l["title"]);
1822 $tpl->setVariable("LEVEL_DESC", nl2br($l["description"]));
1823 $tpl->parseCurrentBlock();
1824 }
1825 }
1826
1827 return $tpl->get();
1828 }

References $tpl.

Referenced by renderSkillHTML().

+ Here is the caller graph for this function:

◆ getSuggestedResources()

ilPersonalSkillsGUI::getSuggestedResources (   $a_profile_id,
  $a_levels,
  $a_base_skill,
  $a_tref_id 
)

Render suggested resources.

Parameters

return

Definition at line 1836 of file class.ilPersonalSkillsGUI.php.

1837 {
1838 $lng = $this->lng;
1839
1840 $tpl = new ilTemplate("tpl.suggested_resources.html", true, true, "Services/Skill");
1841
1842 // use a profile
1843 if ($a_profile_id > 0) {
1844 $too_low = true;
1845 $current_target_level = 0;
1846
1847 foreach ($a_levels as $k => $v) {
1848 foreach ($this->profile_levels as $pl) {
1849 if ($pl["level_id"] == $v["id"] &&
1850 $pl["base_skill_id"] == $v["skill_id"]) {
1851 $too_low = true;
1852 $current_target_level = $v["id"];
1853 }
1854 }
1855
1856 if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1857 $too_low = false;
1858 }
1859 }
1860
1861 // suggested resources
1862 if ($too_low) {
1863 include_once("./Services/Skill/classes/class.ilSkillResources.php");
1864 $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1865 $res = $skill_res->getResources();
1866 $imp_resources = array();
1867 foreach ($res as $level) {
1868 foreach ($level as $r) {
1869 if ($r["imparting"] == true &&
1870 $current_target_level == $r["level_id"]) {
1871 $imp_resources[] = $r;
1872 }
1873 }
1874 }
1875 foreach ($imp_resources as $r) {
1876 $ref_id = $r["rep_ref_id"];
1879 include_once("./Services/Link/classes/class.ilLink.php");
1880 $tpl->setCurrentBlock("resource_item");
1881 $tpl->setVariable("TXT_RES", $title);
1882 $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1883 $tpl->parseCurrentBlock();
1884 }
1885 if (count($imp_resources) > 0) {
1886 $tpl->touchBlock("resources_list");
1887 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_res"));
1888 return $tpl->get();
1889 } else {
1890 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_no_res"));
1891 return $tpl->get();
1892 }
1893 } else {
1894 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_no_needs_impr"));
1895 return $tpl->get();
1896 }
1897 } else {
1898 // no profile, just list all resources
1899 include_once("./Services/Skill/classes/class.ilSkillResources.php");
1900 $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1901 $res = $skill_res->getResources();
1902 // add $r["level_id"] info
1903 $any = false;
1904 foreach ($res as $level) {
1905 $available = false;
1906 $cl = 0;
1907 foreach ($level as $r) {
1908 if ($r["imparting"]) {
1909 $ref_id = $r["rep_ref_id"];
1912 include_once("./Services/Link/classes/class.ilLink.php");
1913 $tpl->setCurrentBlock("resource_item");
1914 $tpl->setVariable("TXT_RES", $title);
1915 $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1916 $tpl->parseCurrentBlock();
1917 $available = true;
1918 $any = true;
1919 $cl = $r["level_id"];
1920 }
1921 }
1922 if ($available) {
1923 $tpl->setCurrentBlock("resources_list_level");
1924 $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
1925 $tpl->setVariable("LEVEL_NAME", ilBasicSkill::lookupLevelTitle($cl));
1926 $tpl->parseCurrentBlock();
1927 $tpl->touchBlock("resources_list");
1928 }
1929 }
1930 if ($any) {
1931 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_suggested_resources"));
1932 return $tpl->get();
1933 }
1934 }
1935 return "";
1936 }
static lookupLevelTitle($a_id)
Lookup level title.
static _lookupObjId($a_id)
Manages resources for skills.
foreach($_POST as $key=> $value) $res

References $lng, $obj_id, $res, $tpl, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilBasicSkill\lookupLevelTitle().

Referenced by renderSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTriggerObjectsFilter()

ilPersonalSkillsGUI::getTriggerObjectsFilter ( )
Returns
array

Definition at line 231 of file class.ilPersonalSkillsGUI.php.

References $trigger_objects_filter.

Referenced by renderSkillHTML().

+ Here is the caller graph for this function:

◆ hideSkill()

ilPersonalSkillsGUI::hideSkill (   $a_skill_id,
  $a_tref_id = 0 
)

Hide skill.

Parameters

return

Definition at line 270 of file class.ilPersonalSkillsGUI.php.

271 {
272 $this->hidden_skills[] = $a_skill_id . ":" . $a_tref_id;
273 }

◆ listAssignedProfile()

ilPersonalSkillsGUI::listAssignedProfile ( )

List profile.

Parameters

return

Definition at line 1944 of file class.ilPersonalSkillsGUI.php.

1945 {
1947
1948 $main_tpl = $this->tpl;
1949
1950 $tpl = new ilTemplate("tpl.skill_filter.html", true, true, "Services/Skill");
1951
1952 $this->setTabs("profile");
1953
1954 $this->determineCurrentProfile();
1956
1957 $filter_toolbar = new ilToolbarGUI();
1958 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
1959 $this->getFilter()->addToToolbar($filter_toolbar, true);
1960
1961 $skills = array();
1962 if ($this->getProfileId() > 0) {
1963 $profile = new ilSkillProfile($this->getProfileId());
1964 $this->profile_levels = $profile->getSkillLevels();
1965
1966 foreach ($this->profile_levels as $l) {
1967 $skills[] = array(
1968 "base_skill_id" => $l["base_skill_id"],
1969 "tref_id" => $l["tref_id"],
1970 "level_id" => $l["level_id"]
1971 );
1972 }
1973 }
1974
1975 $this->getActualLevels($skills, $this->user->getId());
1976
1977 // render
1978 $html = "";
1979 foreach ($skills as $s) {
1980 // todo draft check
1981 $html .= $this->getSkillHTML($s["base_skill_id"], 0, true, $s["tref_id"]);
1982 }
1983
1984 if ($html != "") {
1985 $filter_toolbar->addFormButton($this->lng->txt("skmg_refresh_view"), "applyFilterAssignedProfiles");
1986
1987 $tpl->setVariable("FILTER", $filter_toolbar->getHTML());
1988
1989 $html = $tpl->get() . $html;
1990 }
1991
1992 $main_tpl->setContent($html);
1993 }
setTabs($a_activate)
Set tabs.
showProfileSelectorToolbar()
Show profile selector toolbar.
determineCurrentProfile()
Determine current profile id.

References $ctrl, $ilCtrl, $tpl, determineCurrentProfile(), getActualLevels(), getFilter(), getProfileId(), getSkillHTML(), setTabs(), showProfileSelectorToolbar(), and user().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listProfilesForGap()

ilPersonalSkillsGUI::listProfilesForGap ( )

List profiles.

Parameters

Definition at line 1179 of file class.ilPersonalSkillsGUI.php.

1180 {
1181 $tpl = $this->tpl;
1182
1183 //$a_user_id = $ilUser->getId();
1184
1185 //$profiles = ilSkillProfile::getProfilesOfUser($a_user_id);
1186
1187 if (count($this->user_profiles) == 0 && $this->obj_skills == null) {
1188 return;
1189 }
1190
1191 $this->determineCurrentProfile();
1193
1194 $tpl->setContent($this->getGapAnalysisHTML());
1195 }
getGapAnalysisHTML($a_user_id=0, $a_skills=null)
Get gap analysis html.

References $tpl, determineCurrentProfile(), getGapAnalysisHTML(), and showProfileSelectorToolbar().

+ Here is the call graph for this function:

◆ listSkills()

ilPersonalSkillsGUI::listSkills ( )

List skills.

Definition at line 406 of file class.ilPersonalSkillsGUI.php.

407 {
411 $main_tpl = $this->tpl;
412 $ilToolbar = $this->toolbar;
413
414 $tpl = new ilTemplate("tpl.skill_filter.html", true, true, "Services/Skill");
415
416 $this->setTabs("list_skills");
417
418 include_once("./Services/Skill/classes/class.ilSkillTree.php");
419 $stree = new ilSkillTree();
420
421 // skill selection / add new personal skill
422 $ilToolbar->addFormButton(
423 $lng->txt("skmg_add_skill"),
424 "listSkillsForAdd"
425 );
426 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
427
428 $filter_toolbar = new ilToolbarGUI();
429 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
430 $this->getFilter()->addToToolbar($filter_toolbar, false);
431
433 $html = "";
434 foreach ($skills as $s) {
435 $path = $stree->getSkillTreePath($s["skill_node_id"]);
436
437 // check draft
438 foreach ($path as $p) {
439 if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
440 continue(2);
441 }
442 }
443 $html .= $this->getSkillHTML($s["skill_node_id"], 0, true);
444 }
445
446 // list skills
447 // include_once("./Services/Skill/classes/class.ilPersonalSkillTableGUI.php");
448 // $sktab = new ilPersonalSkillTableGUI($this, "listSkills");
449
450 if ($html != "") {
451 $filter_toolbar->addFormButton($this->lng->txt("skmg_refresh_view"), "applyFilter");
452 $tpl->setVariable("FILTER", $filter_toolbar->getHTML());
453 $html = $tpl->get() . $html;
454 }
455
456 $main_tpl->setContent($html);
457 }
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.

References $ctrl, $ilCtrl, $ilUser, $lng, $toolbar, $tpl, $user, getFilter(), ilPersonalSkill\getSelectedUserSkills(), getSkillHTML(), setTabs(), and ilSkillTreeNode\STATUS_DRAFT.

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkillsForAdd()

ilPersonalSkillsGUI::listSkillsForAdd ( )

LIst skills for adding.

Parameters

return

Definition at line 1149 of file class.ilPersonalSkillsGUI.php.

1150 {
1152 $lng = $this->lng;
1153 $tpl = $this->tpl;
1154 $ilTabs = $this->tabs;
1155
1156
1157 $ilTabs->setBackTarget(
1158 $lng->txt("back"),
1159 $ilCtrl->getLinkTarget($this, "")
1160 );
1161
1162 include_once("./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
1163 $exp = new ilPersonalSkillExplorerGUI($this, "listSkillsForAdd", $this, "addSkill");
1164 if ($exp->getHasSelectableNodes()) {
1165 if (!$exp->handleCommand()) {
1166 $tpl->setContent($exp->getHTML());
1167 }
1168 ilUtil::sendInfo($lng->txt("skmg_select_skill"));
1169 } else {
1170 ilUtil::sendInfo($lng->txt("skmg_no_nodes_selectable"));
1171 }
1172 }
Explorer for selecting a personal skill.

References $ctrl, $ilCtrl, $lng, $tabs, $tpl, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ removeMaterial()

ilPersonalSkillsGUI::removeMaterial ( )

Remove material.

Definition at line 1014 of file class.ilPersonalSkillsGUI.php.

1015 {
1018 $lng = $this->lng;
1019
1020
1022 $ilUser->getId(),
1023 (int) $_GET["tref_id"],
1024 (int) $_GET["level_id"],
1025 (int) $_GET["wsp_id"]
1026 );
1027 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1028 $ilCtrl->redirect($this, "assignMaterials");
1029 }
static removeMaterial($a_user_id, $a_tref_id, $a_level_id, $a_wsp_id)
Remove material.

References $_GET, $ctrl, $ilCtrl, $ilUser, $lng, $user, and ilPersonalSkill\removeMaterial().

+ Here is the call graph for this function:

◆ removeSkills()

ilPersonalSkillsGUI::removeSkills ( )

Remove skills.

Definition at line 807 of file class.ilPersonalSkillsGUI.php.

808 {
812
813 if (is_array($_POST["id"])) {
814 foreach ($_POST["id"] as $n_id) {
815 ilPersonalSkill::removeSkill($ilUser->getId(), $n_id);
816 }
817 }
818
819 ilUtil::sendSuccess($lng->txt("msg_object_modified"));
820 $ilCtrl->redirect($this, "listSkills");
821 }
static removeSkill($a_user_id, $a_skill_node_id)
Remove personal skill.

References $_POST, $ctrl, $ilCtrl, $ilUser, $lng, $user, and ilPersonalSkill\removeSkill().

+ Here is the call graph for this function:

◆ render()

ilPersonalSkillsGUI::render ( )
protected

Render.

Definition at line 389 of file class.ilPersonalSkillsGUI.php.

390 {
391 switch ($this->list_mode) {
393 $this->listAssignedProfile();
394 break;
395
396 default:
397 $this->listSkills();
398 break;
399 }
400 }

References LIST_PROFILES, listAssignedProfile(), and listSkills().

+ Here is the call graph for this function:

◆ renderSkillHTML()

ilPersonalSkillsGUI::renderSkillHTML (   $a_top_skill_id,
  $a_user_id = 0,
  $a_edit = false,
  $a_tref_id = 0 
)

Render skill html.

Parameters

return

Definition at line 510 of file class.ilPersonalSkillsGUI.php.

511 {
515
516 $sub_panels = array();
517
518 if ($a_user_id == 0) {
519 $user = $ilUser;
520 } else {
521 $user = new ilObjUser($a_user_id);
522 }
523
524 $tpl = new ilTemplate("tpl.skill_pres.html", true, true, "Services/Skill");
525
526 include_once("./Services/Skill/classes/class.ilSkillTree.php");
527 $stree = new ilSkillTree();
528
529 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
530 $vtree = new ilVirtualSkillTree();
531 $tref_id = $a_tref_id;
532 $skill_id = $a_top_skill_id;
533 if (ilSkillTreeNode::_lookupType($a_top_skill_id) == "sktr") {
534 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
535 $tref_id = $a_top_skill_id;
536 $skill_id = ilSkillTemplateReference::_lookupTemplateId($a_top_skill_id);
537 }
538 $b_skills = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
539
540 foreach ($b_skills as $bs) {
541 $bs["id"] = $bs["skill_id"];
542 $bs["tref"] = $bs["tref_id"];
543
544 $path = $stree->getSkillTreePath($bs["id"], $bs["tref"]);
545
546 $panel_comps = array();
547
548
549 // check draft
550 foreach ($path as $p) {
551 if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
552 continue(2);
553 }
554 }
555 reset($path);
556
557 $skill = ilSkillTreeNodeFactory::getInstance($bs["id"]);
558 $level_data = $skill->getLevelData();
559
560
561 $title = $sep = "";
562 $description = "";
563 $found = false;
564 foreach ($path as $p) {
565 if ($found) {
566 $title .= $sep . $p["title"];
567 $sep = " > ";
568 $description = $p["description"];
569 }
570 if ($a_top_skill_id == $p["child"]) {
571 $found = true;
572 }
573 }
574
575 // skill description
576 $panel_comps[] = $this->ui_fac->legacy($this->getBasicSkillDescription((string) $description));
577
578
579 // skill level description
580 $panel_comps[] = $this->ui_fac->legacy($this->getSkillLevelDescription($skill));
581
582
583 if ($this->getProfileId() > 0) {
584 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
585 ilBasicSkill::hasSelfEvaluated($user->getId(), $bs["id"], $bs["tref"])) {
586 if ($this->getFilter()->showTargetLevel()) {
587 $panel_comps[] = $this->ui_fac->legacy($this->getProfileTargetItem($this->getProfileId(), $level_data, $bs["tref"]));
588 }
589 }
590 }
591
592 if ($this->mode == "gap" && !$this->history_view) {
593 $panel_comps[] = $this->ui_fac->legacy($this->getActualGapItem($level_data, $bs["tref"]) . "");
594 $panel_comps[] = $this->ui_fac->legacy($this->getSelfEvalGapItem($level_data, $bs["tref"]) . "");
595 } else {
596 // get date of self evaluation
597 $se_date = ilPersonalSkill::getSelfEvaluationDate($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]);
598 $se_rendered = ($se_date == "")
599 ? true
600 : false;
601
602 // get all object triggered entries and render them
603 foreach ($skill->getAllHistoricLevelEntriesOfUser($bs["tref"], $user->getId(), ilBasicSkill::EVAL_BY_ALL) as $level_entry) {
604 if (count($this->getTriggerObjectsFilter()) && !in_array($level_entry['trigger_obj_id'], $this->getTriggerObjectsFilter())) {
605 continue;
606 }
607
608 // render the self evaluation at the correct position within the list of object triggered entries
609 if ($se_date > $level_entry["status_date"] && !$se_rendered) {
610 $se_rendered = true;
611 }
612 if ($this->getFilter()->isInRange($level_data, $level_entry)) {
613 $panel_comps[] = $this->ui_fac->legacy($this->getEvalItem($level_data, $level_entry));
614 }
615 }
616 }
617
618 // materials (new)
619 if ($this->mode != "gap") {
620 if ($this->getFilter()->showMaterialsRessources() && $this->use_materials) {
621 $mat = $this->getMaterials($level_data, $bs["tref"], $user->getId());
622 }
623 if ($mat != "") {
624 $panel_comps[] = $this->ui_fac->legacy($mat);
625 }
626 }
627
628 // suggested resources
629 if ($this->getFilter()->showMaterialsRessources()) {
630 $sugg = $this->getSuggestedResources($this->getProfileId(), $level_data, $bs["id"], $bs["tref"]);
631 }
632 if ($sugg != "") {
633 $panel_comps[] = $this->ui_fac->legacy($sugg);
634 }
635
636 $sub = $this->ui_fac->panel()->sub((string) $title, $panel_comps);
637 if ($a_edit) {
638 $actions = array();
639 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
640 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
641 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
642 if ($this->use_materials) {
643 $actions[] = $this->ui_fac->button()->shy(
644 $lng->txt('skmg_assign_materials'),
645 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")
646 );
647 }
648 $actions[] = $this->ui_fac->button()->shy(
649 $lng->txt('skmg_self_evaluation'),
650 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation")
651 );
652 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
653 }
654
655 $sub_panels[] = $sub;
656
657 $tpl->parseCurrentBlock();
658 }
659
660 $des = $this->getSkillCategoryDescription($skill_id, $tref_id);
661
662 //put the description of the skill category to the very top of the sub panels
663 $sub_panels = $this->ui_fac->legacy($des . $this->ui_ren->render($sub_panels));
664
665 $panel = $this->ui_fac->panel()->standard(
666 (string) ilSkillTreeNode::_lookupTitle($skill_id, $tref_id),
667 $sub_panels
668 );
669
670 if ($a_edit && $this->getProfileId() == 0) {
671 $actions = array();
672
673 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
674 $actions[] = $this->ui_fac->button()->shy(
675 $lng->txt('skmg_remove_skill'),
676 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove")
677 );
678
679 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
680 }
681
682 return $this->ui_ren->render($panel);
683 }
static hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id)
Has use self evaluated a skill?
static getSelfEvaluationDate($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
getBasicSkillDescription(string $description)
Get description for basic skill.
getSkillCategoryDescription(int $skill_id, int $tref_id)
Get description for skill category.
getActualGapItem($a_levels, $a_tref_id=0)
getSkillLevelDescription($skill)
Get level description.
getProfileTargetItem($a_profile_id, $a_levels, $a_tref_id=0)
Get profile target item.
getSelfEvalGapItem($a_levels, $a_tref_id=0)
getSuggestedResources($a_profile_id, $a_levels, $a_base_skill, $a_tref_id)
Render suggested resources.
getMaterials($a_levels, $a_tref_id=0, $a_user_id=0)
Get materials.
getEvalItem($a_levels, $a_level_entry)
Get eval item.

References $ctrl, $ilCtrl, $ilUser, $lng, $tpl, $user, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), ilBasicSkill\EVAL_BY_ALL, getActualGapItem(), getBasicSkillDescription(), getEvalItem(), getFilter(), ilSkillTreeNodeFactory\getInstance(), getMaterials(), getProfileId(), getProfileTargetItem(), getSelfEvalGapItem(), ilPersonalSkill\getSelfEvaluationDate(), getSkillCategoryDescription(), getSkillLevelDescription(), getSuggestedResources(), getTriggerObjectsFilter(), ilBasicSkill\hasSelfEvaluated(), and ilSkillTreeNode\STATUS_DRAFT.

Referenced by getSkillHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSelfEvaluation()

ilPersonalSkillsGUI::saveSelfEvaluation ( )

Save self evaluation.

Definition at line 1120 of file class.ilPersonalSkillsGUI.php.

1121 {
1124 $lng = $this->lng;
1125
1127 $ilUser->getId(),
1128 (int) $_GET["skill_id"],
1129 (int) $_GET["tref_id"],
1130 (int) $_GET["basic_skill_id"],
1131 (int) $_POST["se"]
1132 );
1133 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1134
1135 /* $ilCtrl->saveParameter($this, "skill_id");
1136 $ilCtrl->saveParameter($this, "level_id");
1137 $ilCtrl->saveParameter($this, "tref_id");
1138 $ilCtrl->saveParameter($this, "basic_skill_id");*/
1139
1140 $ilCtrl->redirect($this, "render");
1141 }
static saveSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level)
Save self evaluation.

References $_GET, $_POST, $ctrl, $ilCtrl, $ilUser, $lng, $user, and ilPersonalSkill\saveSelfEvaluation().

+ Here is the call graph for this function:

◆ selectMaterial()

ilPersonalSkillsGUI::selectMaterial ( )

Select material.

Definition at line 980 of file class.ilPersonalSkillsGUI.php.

981 {
985
986
987 include_once("./Services/Skill/classes/class.ilPersonalSkill.php");
988 if (is_array($_POST["wsp_id"])) {
989 foreach ($_POST["wsp_id"] as $w) {
991 $ilUser->getId(),
992 (int) $_GET["skill_id"],
993 (int) $_GET["tref_id"],
994 (int) $_GET["basic_skill_id"],
995 (int) $_GET["level_id"],
996 (int) $w
997 );
998 }
999 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1000 }
1001
1002 $ilCtrl->saveParameter($this, "skill_id");
1003 $ilCtrl->saveParameter($this, "level_id");
1004 $ilCtrl->saveParameter($this, "tref_id");
1005 $ilCtrl->saveParameter($this, "basic_skill_id");
1006
1007 $ilCtrl->redirect($this, "assignMaterials");
1008 }
static assignMaterial($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level, $a_wsp_id)
Assign material to skill level.

References $_GET, $_POST, $ctrl, $ilCtrl, $ilUser, $lng, $user, and ilPersonalSkill\assignMaterial().

+ Here is the call graph for this function:

◆ selectProfile()

ilPersonalSkillsGUI::selectProfile ( )

Select profile.

Parameters

Definition at line 1501 of file class.ilPersonalSkillsGUI.php.

1502 {
1504
1505 $ilCtrl->setParameter($this, "profile_id", $_POST["profile_id"]);
1506 if ($this->mode == "gap") {
1507 $ilCtrl->redirect($this, "listProfilesForGap");
1508 } else {
1509 $ilCtrl->redirect($this, "listAssignedProfile");
1510 }
1511 }

References $_POST, $ctrl, and $ilCtrl.

◆ selfEvaluation()

ilPersonalSkillsGUI::selfEvaluation ( )

Assign materials to skill levels.

Parameters

return

Definition at line 1042 of file class.ilPersonalSkillsGUI.php.

1043 {
1045 $lng = $this->lng;
1046 $tpl = $this->tpl;
1047 $ilToolbar = $this->toolbar;
1048 $ilTabs = $this->tabs;
1049
1050
1051 $ilTabs->setBackTarget(
1052 $lng->txt("back"),
1053 $ilCtrl->getLinkTarget($this, "render")
1054 );
1055
1056 $ilCtrl->saveParameter($this, "skill_id");
1057 $ilCtrl->saveParameter($this, "basic_skill_id");
1058 $ilCtrl->saveParameter($this, "tref_id");
1059
1060 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
1061 $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
1062 $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
1063 ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
1064 ".svg"));
1065
1066 // basic skill selection
1067 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
1068 $vtree = new ilVirtualSkillTree();
1069 $tref_id = 0;
1070 $skill_id = (int) $_GET["skill_id"];
1071 if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
1072 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
1073 $tref_id = $_GET["skill_id"];
1074 $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
1075 }
1076 $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
1077
1078
1079 $options = array();
1080 foreach ($bs as $b) {
1081 $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
1082 }
1083
1084 $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
1085 ? (int) $_POST["basic_skill_id"]
1086 : (((int) $_GET["basic_skill_id"] > 0)
1087 ? (int) $_GET["basic_skill_id"]
1088 : key($options));
1089
1090 $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
1091
1092 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1093 $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
1094 $si->setOptions($options);
1095 $si->setValue($cur_basic_skill_id);
1096 $ilToolbar->addInputItem($si, true);
1097 $ilToolbar->addFormButton(
1098 $lng->txt("select"),
1099 "selfEvaluation"
1100 );
1101
1102 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1103
1104 // table
1105 include_once("./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
1107 $this,
1108 "selfEvaluation",
1109 (int) $_GET["skill_id"],
1110 (int) $_GET["tref_id"],
1111 $cur_basic_skill_id
1112 );
1113
1114 $tpl->setContent($tab->getHTML());
1115 }
Self evaluation, second simplier implementation.

References $_GET, $_POST, Vendor\Package\$b, $ctrl, $ilCtrl, $lng, $si, $tab, $tabs, $toolbar, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ setGapAnalysisActualStatusModePerObject()

ilPersonalSkillsGUI::setGapAnalysisActualStatusModePerObject (   $a_obj_id,
  $a_cat_title = "" 
)

Set gap analysis actual status mode "per object".

Parameters
integer$a_obj_idobject id

Definition at line 1248 of file class.ilPersonalSkillsGUI.php.

1249 {
1250 $this->gap_mode = "max_per_object";
1251 $this->gap_mode_obj_id = $a_obj_id;
1252 $this->gap_cat_title = $a_cat_title;
1253 $this->mode = "gap";
1254 }

◆ setGapAnalysisActualStatusModePerType()

ilPersonalSkillsGUI::setGapAnalysisActualStatusModePerType (   $a_type,
  $a_cat_title = "" 
)

Set gap analysis actual status mode "per type".

Parameters
string$a_typetype

Definition at line 1235 of file class.ilPersonalSkillsGUI.php.

1236 {
1237 $this->gap_mode = "max_per_type";
1238 $this->gap_mode_type = $a_type;
1239 $this->gap_cat_title = $a_cat_title;
1240 $this->mode = "gap";
1241 }
$a_type
Definition: workflow.php:92

References $a_type.

◆ setGapAnalysisSelfEvalLevels()

ilPersonalSkillsGUI::setGapAnalysisSelfEvalLevels ( array  $a_val)

Set self evaluation levels for gap analysis.

Parameters
array$a_valself evaluation values key1: base_skill_id, key2: tref_id: value: level id

Definition at line 193 of file class.ilPersonalSkillsGUI.php.

194 {
195 $this->gap_self_eval_levels = $a_val;
196 }

◆ setHistoryView()

ilPersonalSkillsGUI::setHistoryView (   $a_val)

Set history view.

Parameters
bool$a_valhistory view

Definition at line 213 of file class.ilPersonalSkillsGUI.php.

214 {
215 $this->history_view = $a_val;
216 }

◆ setIntroText()

ilPersonalSkillsGUI::setIntroText (   $a_val)

Set intro text.

Parameters
string$a_valintro text html

Definition at line 249 of file class.ilPersonalSkillsGUI.php.

250 {
251 $this->intro_text = $a_val;
252 }

◆ setObjectSkills()

ilPersonalSkillsGUI::setObjectSkills (   $a_obj_id,
  $a_skills = null 
)

Set object skills.

Parameters
int$a_obj_idobject id
array$a_skillsskills array

Definition at line 310 of file class.ilPersonalSkillsGUI.php.

311 {
312 $this->obj_id = $a_obj_id;
313 $this->obj_skills = $a_skills;
314 }

◆ setOfflineMode()

ilPersonalSkillsGUI::setOfflineMode (   $a_file_path)

Definition at line 381 of file class.ilPersonalSkillsGUI.php.

382 {
383 $this->offline_mode = $a_file_path;
384 }

◆ setProfileId()

ilPersonalSkillsGUI::setProfileId (   $a_val)

Set profile id.

Parameters
$a_val

Definition at line 173 of file class.ilPersonalSkillsGUI.php.

174 {
175 $this->profile_id = $a_val;
176 }

Referenced by determineCurrentProfile().

+ Here is the caller graph for this function:

◆ setTabs()

ilPersonalSkillsGUI::setTabs (   $a_activate)

Set tabs.

Definition at line 351 of file class.ilPersonalSkillsGUI.php.

352 {
355 $ilTabs = $this->tabs;
356
357 // list skills
358 $ilCtrl->setParameter($this, "list_mode", self::LIST_SELECTED);
359 $ilTabs->addTab(
360 "list_skills",
361 $lng->txt("skmg_selected_skills"),
362 $ilCtrl->getLinkTarget($this, "render")
363 );
364
365 if (count($this->user_profiles) > 0) {
366 $ilCtrl->setParameter($this, "list_mode", self::LIST_PROFILES);
367 $ilTabs->addTab(
368 "profile",
369 $lng->txt("skmg_assigned_profiles"),
370 $ilCtrl->getLinkTarget($this, "render")
371 );
372 }
373
374 $ilCtrl->clearParameterByClass(get_class($this), "list_mode");
375
376 // assign materials
377
378 $ilTabs->activateTab($a_activate);
379 }

References $ctrl, $ilCtrl, $lng, and $tabs.

Referenced by listAssignedProfile(), and listSkills().

+ Here is the caller graph for this function:

◆ setTriggerObjectsFilter()

ilPersonalSkillsGUI::setTriggerObjectsFilter (   $trigger_objects_filter)
Parameters
array$trigger_objects_filter

Definition at line 239 of file class.ilPersonalSkillsGUI.php.

240 {
241 $this->trigger_objects_filter = $trigger_objects_filter;
242 }

References $trigger_objects_filter.

◆ showProfileSelectorToolbar()

ilPersonalSkillsGUI::showProfileSelectorToolbar ( )

Show profile selector toolbar.

Definition at line 1202 of file class.ilPersonalSkillsGUI.php.

1203 {
1204 $ilToolbar = $this->toolbar;
1205 $lng = $this->lng;
1207
1208 $options = array();
1209 if (is_array($this->obj_skills) && $this->obj_id > 0) {
1210 $options[0] = $lng->txt("obj_" . ilObject::_lookupType($this->obj_id)) . ": " . ilObject::_lookupTitle($this->obj_id);
1211 }
1212
1213 foreach ($this->user_profiles as $p) {
1214 $options[$p["id"]] = $lng->txt("skmg_profile") . ": " . $p["title"];
1215 }
1216
1217 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1218 $si = new ilSelectInputGUI($lng->txt("skmg_profile"), "profile_id");
1219 $si->setOptions($options);
1220 $si->setValue($this->getProfileId());
1221 $ilToolbar->addInputItem($si, true);
1222 $ilToolbar->addFormButton(
1223 $lng->txt("select"),
1224 "selectProfile"
1225 );
1226 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1227 }

References $ctrl, $ilCtrl, $lng, $si, $toolbar, ilObject\_lookupTitle(), ilObject\_lookupType(), and getProfileId().

Referenced by listAssignedProfile(), and listProfilesForGap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilPersonalSkillsGUI::$access
protected

Definition at line 82 of file class.ilPersonalSkillsGUI.php.

Referenced by getEvalItem().

◆ $actual_levels

ilPersonalSkillsGUI::$actual_levels = array()
protected

Definition at line 26 of file class.ilPersonalSkillsGUI.php.

◆ $ctrl

◆ $filter

ilPersonalSkillsGUI::$filter
protected

Definition at line 99 of file class.ilPersonalSkillsGUI.php.

Referenced by getFilter().

◆ $gap_self_eval_levels

ilPersonalSkillsGUI::$gap_self_eval_levels = array()
protected

Definition at line 27 of file class.ilPersonalSkillsGUI.php.

Referenced by getGapAnalysisSelfEvalLevels().

◆ $help

ilPersonalSkillsGUI::$help
protected

Definition at line 52 of file class.ilPersonalSkillsGUI.php.

Referenced by __construct().

◆ $hidden_skills

ilPersonalSkillsGUI::$hidden_skills = array()
protected

Definition at line 32 of file class.ilPersonalSkillsGUI.php.

◆ $history_view

ilPersonalSkillsGUI::$history_view = false
protected

Definition at line 29 of file class.ilPersonalSkillsGUI.php.

Referenced by getHistoryView().

◆ $intro_text

ilPersonalSkillsGUI::$intro_text = ""
protected

Definition at line 31 of file class.ilPersonalSkillsGUI.php.

Referenced by getIntroText().

◆ $list_mode

ilPersonalSkillsGUI::$list_mode = self::LIST_SELECTED
protected

Definition at line 104 of file class.ilPersonalSkillsGUI.php.

◆ $lng

◆ $mode

ilPersonalSkillsGUI::$mode = ""
protected

Definition at line 28 of file class.ilPersonalSkillsGUI.php.

◆ $obj_id

ilPersonalSkillsGUI::$obj_id = 0
protected

Definition at line 93 of file class.ilPersonalSkillsGUI.php.

Referenced by getMaterialInfo(), and getSuggestedResources().

◆ $obj_skills

ilPersonalSkillsGUI::$obj_skills = array()
protected

Definition at line 94 of file class.ilPersonalSkillsGUI.php.

Referenced by getGapAnalysisHTML().

◆ $offline_mode

ilPersonalSkillsGUI::$offline_mode
protected

Definition at line 23 of file class.ilPersonalSkillsGUI.php.

◆ $setting

ilPersonalSkillsGUI::$setting
protected

Definition at line 57 of file class.ilPersonalSkillsGUI.php.

Referenced by __construct(), and assignMaterial().

◆ $skill_tree

ilPersonalSkillsGUI::$skill_tree
protected

Definition at line 24 of file class.ilPersonalSkillsGUI.php.

◆ $skill_tt_cnt

ilPersonalSkillsGUI::$skill_tt_cnt = 1
static

Definition at line 25 of file class.ilPersonalSkillsGUI.php.

◆ $tabs

ilPersonalSkillsGUI::$tabs
protected

◆ $toolbar

ilPersonalSkillsGUI::$toolbar
protected

◆ $tpl

◆ $trigger_objects_filter

ilPersonalSkillsGUI::$trigger_objects_filter = array()
protected

◆ $ui

ilPersonalSkillsGUI::$ui
protected

Definition at line 37 of file class.ilPersonalSkillsGUI.php.

Referenced by assignMaterial().

◆ $ui_fac

ilPersonalSkillsGUI::$ui_fac
protected

Definition at line 87 of file class.ilPersonalSkillsGUI.php.

◆ $ui_ren

ilPersonalSkillsGUI::$ui_ren
protected

Definition at line 92 of file class.ilPersonalSkillsGUI.php.

◆ $user

◆ LIST_PROFILES

const ilPersonalSkillsGUI::LIST_PROFILES = "profiles"

Definition at line 21 of file class.ilPersonalSkillsGUI.php.

Referenced by render().

◆ LIST_SELECTED

const ilPersonalSkillsGUI::LIST_SELECTED = ""

Definition at line 20 of file class.ilPersonalSkillsGUI.php.


The documentation for this class was generated from the following file: