ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 getSkillDescription ($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...
 

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.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
global $DIC
Definition: saml.php:7

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addSkill()

ilPersonalSkillsGUI::addSkill ( )

Add personal skill.

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

738 {
742
743 ilPersonalSkill::addPersonalSkill($ilUser->getId(), (int) $_GET["obj_id"]);
744
745 ilUtil::sendSuccess($lng->txt("msg_object_modified"));
746 $ilCtrl->redirect($this, "listSkills");
747 }
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 895 of file class.ilPersonalSkillsGUI.php.

896 {
901 $ilTabs = $this->tabs;
903 $ui = $this->ui;
904
905 if (!$ilSetting->get("disable_personal_workspace")) {
906 $url = 'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace';
907 $mbox = $ui->factory()->messageBox()->info($lng->txt("skmg_ass_materials_from_workspace"))
908 ->withLinks([$ui->factory()->link()->standard(
909 $lng->txt("personal_workspace"),
910 $url
911 )]);
912 $message = $ui->renderer()->render($mbox);
913 }
914
915 $ilCtrl->saveParameter($this, "skill_id");
916 $ilCtrl->saveParameter($this, "level_id");
917 $ilCtrl->saveParameter($this, "tref_id");
918 $ilCtrl->saveParameter($this, "basic_skill_id");
919
920 $ilTabs->setBackTarget(
921 $lng->txt("back"),
922 $ilCtrl->getLinkTarget($this, "assignMaterials")
923 );
924
925
926 include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorerGUI.php");
927 $exp = new ilWorkspaceExplorerGUI($ilUser->getId(), $this, "assignMaterial", $this, "");
928 $exp->setTypeWhiteList(array("blog", "wsrt", "wfld", "file", "tstv", "excv"));
929 $exp->setSelectableTypes(array("file", "tstv", "excv"));
930 $exp->setSelectMode("wsp_id", true);
931 if ($exp->handleCommand()) {
932 return;
933 }
934
935 // fill template
936 $mtpl = new ilTemplate("tpl.materials_selection.html", true, true, "Services/Skill");
937 $mtpl->setVariable("EXP", $exp->getHTML());
938
939 // toolbars
940 $tb = new ilToolbarGUI();
941 $tb->addFormButton(
942 $lng->txt("select"),
943 "selectMaterial"
944 );
945 $tb->setFormAction($ilCtrl->getFormAction($this));
946 $tb->setOpenFormTag(true);
947 $tb->setCloseFormTag(false);
948 $mtpl->setVariable("TOOLBAR1", $tb->getHTML());
949 $tb->setOpenFormTag(false);
950 $tb->setCloseFormTag(true);
951 $mtpl->setVariable("TOOLBAR2", $tb->getHTML());
952
953 $tpl->setContent($message . $mtpl->get());
954 }
special template class to simplify handling of ITX/PEAR
Explorer for selecting a personal workspace item.
catch(Exception $e) $message
$url

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 813 of file class.ilPersonalSkillsGUI.php.

814 {
818 $ilToolbar = $this->toolbar;
819 $ilTabs = $this->tabs;
820
821
822 $ilTabs->setBackTarget(
823 $lng->txt("back"),
824 $ilCtrl->getLinkTarget($this, "render")
825 );
826
827 $ilCtrl->saveParameter($this, "skill_id");
828 $ilCtrl->saveParameter($this, "basic_skill_id");
829 $ilCtrl->saveParameter($this, "tref_id");
830
831 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
832 $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
833 $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
834 ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
835 ".svg"));
836
837 // basic skill selection
838 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
839 $vtree = new ilVirtualSkillTree();
840 $tref_id = 0;
841 $skill_id = (int) $_GET["skill_id"];
842 if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
843 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
844 $tref_id = $_GET["skill_id"];
845 $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
846 }
847 $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
848
849 $options = array();
850 foreach ($bs as $b) {
851 //$options[$b["id"]] = ilSkillTreeNode::_lookupTitle($b["id"]);
852 $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
853 }
854
855 $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
856 ? (int) $_POST["basic_skill_id"]
857 : (((int) $_GET["basic_skill_id"] > 0)
858 ? (int) $_GET["basic_skill_id"]
859 : key($options));
860
861 $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
862
863 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
864 $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
865 $si->setOptions($options);
866 $si->setValue($cur_basic_skill_id);
867 $ilToolbar->addInputItem($si, true);
868 $ilToolbar->addFormButton(
869 $lng->txt("select"),
870 "assignMaterials"
871 );
872
873 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
874
875 // table
876 include_once("./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
878 $this,
879 "assignMaterials",
880 (int) $_GET["skill_id"],
881 (int) $_GET["tref_id"],
882 $cur_basic_skill_id
883 );
884
885 $tpl->setContent($tab->getHTML());
886 }
$_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, $ctrl, $ilCtrl, $lng, PHPMailer\PHPMailer\$options, $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 754 of file class.ilPersonalSkillsGUI.php.

755 {
759
760 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
761 if ($_GET["skill_id"] > 0) {
762 $_POST["id"][] = $_GET["skill_id"];
763 }
764 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
765 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
766 $ilCtrl->redirect($this, "listSkills");
767 } else {
768 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
769 $cgui = new ilConfirmationGUI();
770 $cgui->setFormAction($ilCtrl->getFormAction($this));
771 $cgui->setHeaderText($lng->txt("skmg_really_remove_skills"));
772 $cgui->setCancel($lng->txt("cancel"), "listSkills");
773 $cgui->setConfirm($lng->txt("remove"), "removeSkills");
774
775 foreach ($_POST["id"] as $i) {
776 $cgui->addItem("id[]", $i, ilSkillTreeNode::_lookupTitle($i));
777 }
778
779 $tpl->setContent($cgui->getHTML());
780 }
781 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$i
Definition: disco.tpl.php:19

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 1589 of file class.ilPersonalSkillsGUI.php.

1590 {
1591 $lng = $this->lng;
1592
1593 $a_activated_levels = array();
1594 foreach ($a_levels as $k => $v) {
1595 if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1596 $a_activated_levels[] = $v["id"];
1597 }
1598 }
1599
1600 if ($this->gap_cat_title != "") {
1601 $title = $this->gap_cat_title;
1602 } elseif ($this->gap_mode == "max_per_type") {
1603 $title = $lng->txt("objs_" . $this->gap_mode_type);
1604 } elseif ($this->gap_mode == "max_per_object") {
1605 $title = ilObject::_lookupTitle($this->gap_mode_obj_id);
1606 }
1607
1608 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1609 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1610
1611 $type = 1;
1612 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1613 if ($type > 0) {
1614 $tpl->touchBlock("st" . $type);
1615 $tpl->touchBlock("stb" . $type);
1616 }
1617
1618 if ($title != $lng->txt("skmg_eval_type_" . $type)) {
1619 $tpl->setVariable("TITLE", $title);
1620 }
1621
1622 return $tpl->get();
1623 }
static _lookupTitle($a_id)
lookup object title
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
$type

References $lng, $title, $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 1241 of file class.ilPersonalSkillsGUI.php.

1242 {
1243 // get actual levels for gap analysis
1244 $this->actual_levels = array();
1245 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
1246 foreach ($skills as $sk) {
1247 $bs = new ilBasicSkill($sk["base_skill_id"]);
1248 if ($this->gap_mode == "max_per_type") {
1249 $max = $bs->getMaxLevelPerType($sk["tref_id"], $this->gap_mode_type, $user_id);
1250 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1251 } elseif ($this->gap_mode == "max_per_object") {
1252 $max = $bs->getMaxLevelPerObject($sk["tref_id"], $this->gap_mode_obj_id, $user_id);
1253 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1254 } else {
1255 $max = $bs->getMaxLevel($sk["tref_id"], $user_id);
1256 $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1257 }
1258 }
1259 }

Referenced by getGapAnalysisHTML(), and listAssignedProfile().

+ Here is the caller graph for this function:

◆ getEvalItem()

ilPersonalSkillsGUI::getEvalItem (   $a_levels,
  $a_level_entry 
)

Get eval item.

Parameters

return

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

1690 {
1691 $lng = $this->lng;
1692 $ilAccess = $this->access;
1693
1694 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1695 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_level_entry["level_id"]));
1696
1697 include_once("./Services/Skill/classes/class.ilSkillEval.php");
1699
1700 if ($a_level_entry["self_eval"] == 1) {
1702 }
1703
1704 if ($a_level_entry["trigger_obj_type"] == "tst") {
1706 }
1707
1709 $title = ($a_level_entry["trigger_obj_id"] > 0)
1710 ? $a_level_entry["trigger_title"]
1711 : "";
1712
1713 if ($a_level_entry["trigger_ref_id"] > 0
1714 && $ilAccess->checkAccess("read", "", $a_level_entry["trigger_ref_id"])) {
1715 include_once("./Services/Link/classes/class.ilLink.php");
1716 $title = "<a href='" . ilLink::_getLink($a_level_entry["trigger_ref_id"]) . "'>" . $title . "</a>";
1717 }
1718
1719 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1720 if ($type > 0) {
1721 $tpl->touchBlock("st" . $type);
1722 $tpl->touchBlock("stb" . $type);
1723 }
1724 $tpl->setVariable("TITLE", $title);
1725 $tpl->setVariable(
1726 "DATE",
1727 ilDatePresentation::formatDate(new ilDate($a_level_entry["status_date"], IL_CAL_DATETIME))
1728 );
1729
1731
1732 return $tpl->get();
1733 }
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, $title, $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 1269 of file class.ilPersonalSkillsGUI.php.

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

References $html, $ilUser, $l, $lg, $lng, $obj_skills, $path, $s, $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 681 of file class.ilPersonalSkillsGUI.php.

682 {
683 if (!$this->ws_tree) {
684 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
685 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
686 $this->ws_tree = new ilWorkspaceTree($a_user_id);
687 $this->ws_access = new ilWorkspaceAccessHandler($caption);
688 }
689
690 $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
692
693 if (!$this->offline_mode) {
694 $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
695 } else {
696 $url = $this->offline_mode . "file_" . $obj_id . "/";
697
698 // all possible material types for now
700 case "tstv":
701 include_once "Modules/Test/classes/class.ilObjTestVerification.php";
702 $obj = new ilObjTestVerification($obj_id, false);
703 $url .= $obj->getOfflineFilename();
704 break;
705
706 case "excv":
707 include_once "Modules/Exercise/classes/class.ilObjExerciseVerification.php";
708 $obj = new ilObjExerciseVerification($obj_id, false);
709 $url .= $obj->getOfflineFilename();
710 break;
711
712 case "crsv":
713 include_once "Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
714 $obj = new ilObjCourseVerification($obj_id, false);
715 $url .= $obj->getOfflineFilename();
716 break;
717
718 case "scov":
719 include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
720 $obj = new ilObjSCORMVerification($obj_id, false);
721 $url .= $obj->getOfflineFilename();
722 break;
723
724 case "file":
725 $file = new ilObjFile($obj_id, false);
726 $url .= $file->getFilename();
727 break;
728 }
729 }
730
731 return array($caption, $url);
732 }
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 1498 of file class.ilPersonalSkillsGUI.php.

1499 {
1501 $lng = $this->lng;
1502
1503 if ($a_user_id == 0) {
1504 $a_user_id = $ilUser->getId();
1505 }
1506
1507 // only render, if materials given
1508 $got_mat = false;
1509 foreach ($a_levels as $v) {
1511 $a_user_id,
1512 $a_tref_id,
1513 $v["id"]
1514 );
1515 if ($mat_cnt > 0) {
1516 $got_mat = true;
1517 }
1518 }
1519 if (!$got_mat) {
1520 return "";
1521 }
1522
1523 $tpl = new ilTemplate("tpl.skill_materials.html", true, true, "Services/Skill");
1524 foreach ($a_levels as $k => $v) {
1525 $got_mat = false;
1527 $a_user_id,
1528 $a_tref_id,
1529 $v["id"]
1530 ) as $item) {
1531 $tpl->setCurrentBlock("material");
1532 $mat_data = $this->getMaterialInfo($item["wsp_id"], $a_user_id);
1533 $tpl->setVariable("HREF_LINK", $mat_data[1]);
1534 $tpl->setVariable("TXT_LINK", $mat_data[0]);
1535 $tpl->parseCurrentBlock();
1536 $got_mat = true;
1537 }
1538 if ($got_mat) {
1539 $tpl->setCurrentBlock("level");
1540 $tpl->setVariable("LEVEL_VAL", $v["title"]);
1541 $tpl->parseCurrentBlock();
1542 }
1543 }
1544 $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_materials"));
1545
1546 return $tpl->get();
1547 }
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 1555 of file class.ilPersonalSkillsGUI.php.

1556 {
1557 $lng = $this->lng;
1558
1559 $profile = new ilSkillProfile($a_profile_id);
1560 $profile_levels = $profile->getSkillLevels();
1561
1562 $a_activated_levels = array();
1563
1564 foreach ($a_levels as $k => $v) {
1565 foreach ($profile_levels as $pl) {
1566 if ($pl["level_id"] == $v["id"] &&
1567 $pl["base_skill_id"] == $v["skill_id"] &&
1568 $a_tref_id == $pl["tref_id"]) {
1569 $a_activated_levels[] = $pl["level_id"];
1570 }
1571 }
1572 }
1573
1574 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1575 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1576
1577 $tpl->setVariable("TYPE", $lng->txt("skmg_target_level"));
1578 $tpl->setVariable("TITLE", "");
1579
1580 return $tpl->get();
1581 }

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 1667 of file class.ilPersonalSkillsGUI.php.

1668 {
1669 $vals = array();
1670
1671 if (!is_array($a_activated_levels)) {
1672 $a_activated_levels = array($a_activated_levels);
1673 }
1674
1675 foreach ($a_levels as $level) {
1676 $vals[$level["title"]] = (in_array($level["id"], $a_activated_levels));
1677 }
1678 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1679
1680 return $this->ui_ren->render($scale_bar);
1681 }

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 1631 of file class.ilPersonalSkillsGUI.php.

1632 {
1633 $lng = $this->lng;
1634
1635 $self_vals = $this->getGapAnalysisSelfEvalLevels();
1636 if (count($self_vals) == 0) {
1637 return;
1638 }
1639
1640 $a_activated_levels = array();
1641 foreach ($a_levels as $k => $v) {
1642 if ($self_vals[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1643 $a_activated_levels[] = $v["id"];
1644 }
1645 }
1646
1647 $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1648 $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1649
1650 $type = 3;
1651 $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1652 if ($type > 0) {
1653 $tpl->touchBlock("st" . $type);
1654 $tpl->touchBlock("stb" . $type);
1655 }
1656
1657 return $tpl->get();
1658 }

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:

◆ getSkillDescription()

ilPersonalSkillsGUI::getSkillDescription (   $skill)

Get level description.

Parameters

return

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

1742 {
1743 $level_data = $skill->getLevelData();
1744 $tpl = new ilTemplate("tpl.skill_desc.html", true, true, "Services/Skill");
1745
1746 $desc_exists = false;
1747 foreach ($level_data as $l) {
1748 if ($l["description"] != "") {
1749 $desc_exists = true;
1750 }
1751 }
1752 reset($level_data);
1753 if ($desc_exists) {
1754 foreach ($level_data as $l) {
1755 $tpl->setCurrentBlock("level");
1756 $tpl->setVariable("LEVEL_VAL", $l["title"]);
1757 $tpl->setVariable("LEVEL_DESC", nl2br($l["description"]));
1758 $tpl->parseCurrentBlock();
1759 }
1760 }
1761
1762 return $tpl->get();
1763 }

References $l, and $tpl.

Referenced by renderSkillHTML().

+ 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.
UI interface hook processor.

References renderSkillHTML().

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

+ Here is the call graph for this function:
+ 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 1771 of file class.ilPersonalSkillsGUI.php.

1772 {
1773 $lng = $this->lng;
1774
1775 $tpl = new ilTemplate("tpl.suggested_resources.html", true, true, "Services/Skill");
1776
1777 // use a profile
1778 if ($a_profile_id > 0) {
1779 $too_low = true;
1780 $current_target_level = 0;
1781
1782 foreach ($a_levels as $k => $v) {
1783 foreach ($this->profile_levels as $pl) {
1784 if ($pl["level_id"] == $v["id"] &&
1785 $pl["base_skill_id"] == $v["skill_id"]) {
1786 $too_low = true;
1787 $current_target_level = $v["id"];
1788 }
1789 }
1790
1791 if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1792 $too_low = false;
1793 }
1794 }
1795
1796 // suggested resources
1797 if ($too_low) {
1798 include_once("./Services/Skill/classes/class.ilSkillResources.php");
1799 $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1800 $res = $skill_res->getResources();
1801 $imp_resources = array();
1802 foreach ($res as $level) {
1803 foreach ($level as $r) {
1804 if ($r["imparting"] == true &&
1805 $current_target_level == $r["level_id"]) {
1806 $imp_resources[] = $r;
1807 }
1808 }
1809 }
1810 foreach ($imp_resources as $r) {
1811 $ref_id = $r["rep_ref_id"];
1814 include_once("./Services/Link/classes/class.ilLink.php");
1815 $tpl->setCurrentBlock("resource_item");
1816 $tpl->setVariable("TXT_RES", $title);
1817 $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1818 $tpl->parseCurrentBlock();
1819 }
1820 if (count($imp_resources) > 0) {
1821 $tpl->touchBlock("resources_list");
1822 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_res"));
1823 return $tpl->get();
1824 } else {
1825 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_no_res"));
1826 return $tpl->get();
1827 }
1828 } else {
1829 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_no_needs_impr"));
1830 return $tpl->get();
1831 }
1832 } else {
1833 // no profile, just list all resources
1834 include_once("./Services/Skill/classes/class.ilSkillResources.php");
1835 $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1836 $res = $skill_res->getResources();
1837 // add $r["level_id"] info
1838 $any = false;
1839 foreach ($res as $level) {
1840 $available = false;
1841 $cl = 0;
1842 foreach ($level as $r) {
1843 if ($r["imparting"]) {
1844 $ref_id = $r["rep_ref_id"];
1847 include_once("./Services/Link/classes/class.ilLink.php");
1848 $tpl->setCurrentBlock("resource_item");
1849 $tpl->setVariable("TXT_RES", $title);
1850 $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1851 $tpl->parseCurrentBlock();
1852 $available = true;
1853 $any = true;
1854 $cl = $r["level_id"];
1855 }
1856 }
1857 if ($available) {
1858 $tpl->setCurrentBlock("resources_list_level");
1859 $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
1860 $tpl->setVariable("LEVEL_NAME", ilBasicSkill::lookupLevelTitle($cl));
1861 $tpl->parseCurrentBlock();
1862 $tpl->touchBlock("resources_list");
1863 }
1864 }
1865 if ($any) {
1866 $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_suggested_resources"));
1867 return $tpl->get();
1868 }
1869 }
1870 return "";
1871 }
static lookupLevelTitle($a_id)
Lookup level title.
static _lookupObjId($a_id)
Manages resources for skills.
$r
Definition: example_031.php:79
foreach($_POST as $key=> $value) $res

References $lng, $obj_id, $r, $res, $title, $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 1879 of file class.ilPersonalSkillsGUI.php.

1880 {
1882
1883 $main_tpl = $this->tpl;
1884
1885 $tpl = new ilTemplate("tpl.skill_filter.html", true, true, "Services/Skill");
1886
1887 $this->setTabs("profile");
1888
1889 $this->determineCurrentProfile();
1891
1892 $filter_toolbar = new ilToolbarGUI();
1893 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
1894 $this->getFilter()->addToToolbar($filter_toolbar, true);
1895
1896 $skills = array();
1897 if ($this->getProfileId() > 0) {
1898 $profile = new ilSkillProfile($this->getProfileId());
1899 $this->profile_levels = $profile->getSkillLevels();
1900
1901 foreach ($this->profile_levels as $l) {
1902 $skills[] = array(
1903 "base_skill_id" => $l["base_skill_id"],
1904 "tref_id" => $l["tref_id"],
1905 "level_id" => $l["level_id"]
1906 );
1907 }
1908 }
1909
1910 $this->getActualLevels($skills, $this->user->getId());
1911
1912 // render
1913 $html = "";
1914 foreach ($skills as $s) {
1915 // todo draft check
1916 $html .= $this->getSkillHTML($s["base_skill_id"], 0, true, $s["tref_id"]);
1917 }
1918
1919 if ($html != "") {
1920 $filter_toolbar->addFormButton($this->lng->txt("skmg_refresh_view"), "applyFilterAssignedProfiles");
1921
1922 $tpl->setVariable("FILTER", $filter_toolbar->getHTML());
1923
1924 $html = $tpl->get() . $html;
1925 }
1926
1927 $main_tpl->setContent($html);
1928 }
setTabs($a_activate)
Set tabs.
showProfileSelectorToolbar()
Show profile selector toolbar.
determineCurrentProfile()
Determine current profile id.

References $ctrl, $html, $ilCtrl, $l, $s, $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 1158 of file class.ilPersonalSkillsGUI.php.

1159 {
1160 $tpl = $this->tpl;
1161
1162 //$a_user_id = $ilUser->getId();
1163
1164 //$profiles = ilSkillProfile::getProfilesOfUser($a_user_id);
1165
1166 if (count($this->user_profiles) == 0 && $this->obj_skills == null) {
1167 return;
1168 }
1169
1170 $this->determineCurrentProfile();
1172
1173 $tpl->setContent($this->getGapAnalysisHTML());
1174 }
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, $html, $ilCtrl, $ilUser, $lng, $path, $s, $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 1128 of file class.ilPersonalSkillsGUI.php.

1129 {
1131 $lng = $this->lng;
1132 $tpl = $this->tpl;
1133 $ilTabs = $this->tabs;
1134
1135
1136 $ilTabs->setBackTarget(
1137 $lng->txt("back"),
1138 $ilCtrl->getLinkTarget($this, "")
1139 );
1140
1141 include_once("./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
1142 $exp = new ilPersonalSkillExplorerGUI($this, "listSkillsForAdd", $this, "addSkill");
1143 if ($exp->getHasSelectableNodes()) {
1144 if (!$exp->handleCommand()) {
1145 $tpl->setContent($exp->getHTML());
1146 }
1147 ilUtil::sendInfo($lng->txt("skmg_select_skill"));
1148 } else {
1149 ilUtil::sendInfo($lng->txt("skmg_no_nodes_selectable"));
1150 }
1151 }
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 993 of file class.ilPersonalSkillsGUI.php.

994 {
998
999
1001 $ilUser->getId(),
1002 (int) $_GET["tref_id"],
1003 (int) $_GET["level_id"],
1004 (int) $_GET["wsp_id"]
1005 );
1006 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1007 $ilCtrl->redirect($this, "assignMaterials");
1008 }
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 786 of file class.ilPersonalSkillsGUI.php.

787 {
791
792 if (is_array($_POST["id"])) {
793 foreach ($_POST["id"] as $n_id) {
794 ilPersonalSkill::removeSkill($ilUser->getId(), $n_id);
795 }
796 }
797
798 ilUtil::sendSuccess($lng->txt("msg_object_modified"));
799 $ilCtrl->redirect($this, "listSkills");
800 }
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 // skill description
562 $panel_comps[] = $this->ui_fac->legacy($this->getSkillDescription($skill));
563
564
565 if ($this->getProfileId() > 0) {
566 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
567 ilBasicSkill::hasSelfEvaluated($user->getId(), $bs["id"], $bs["tref"])) {
568 if ($this->getFilter()->showTargetLevel()) {
569 $panel_comps[] = $this->ui_fac->legacy($this->getProfileTargetItem($this->getProfileId(), $level_data, $bs["tref"]));
570 }
571 }
572 }
573
574 if ($this->mode == "gap" && !$this->history_view) {
575 $panel_comps[] = $this->ui_fac->legacy($this->getActualGapItem($level_data, $bs["tref"]) . "");
576 $panel_comps[] = $this->ui_fac->legacy($this->getSelfEvalGapItem($level_data, $bs["tref"]) . "");
577 } else {
578 // get date of self evaluation
579 $se_date = ilPersonalSkill::getSelfEvaluationDate($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]);
580 $se_rendered = ($se_date == "")
581 ? true
582 : false;
583
584 // get all object triggered entries and render them
585 foreach ($skill->getAllHistoricLevelEntriesOfUser($bs["tref"], $user->getId(), ilBasicSkill::EVAL_BY_ALL) as $level_entry) {
586 if (count($this->getTriggerObjectsFilter()) && !in_array($level_entry['trigger_obj_id'], $this->getTriggerObjectsFilter())) {
587 continue;
588 }
589
590 // render the self evaluation at the correct position within the list of object triggered entries
591 if ($se_date > $level_entry["status_date"] && !$se_rendered) {
592 $se_rendered = true;
593 }
594 if ($this->getFilter()->isInRange($level_data, $level_entry)) {
595 $panel_comps[] = $this->ui_fac->legacy($this->getEvalItem($level_data, $level_entry));
596 }
597 }
598 }
599
600 // materials (new)
601 if ($this->mode != "gap") {
602 if ($this->getFilter()->showMaterialsRessources() && $this->use_materials) {
603 $mat = $this->getMaterials($level_data, $bs["tref"], $user->getId());
604 }
605 if ($mat != "") {
606 $panel_comps[] = $this->ui_fac->legacy($mat);
607 }
608 }
609
610 // suggested resources
611 if ($this->getFilter()->showMaterialsRessources()) {
612 $sugg = $this->getSuggestedResources($this->getProfileId(), $level_data, $bs["id"], $bs["tref"]);
613 }
614 if ($sugg != "") {
615 $panel_comps[] = $this->ui_fac->legacy($sugg);
616 }
617
618 $title = $sep = "";
619 $found = false;
620 foreach ($path as $p) {
621 if ($found) {
622 $title .= $sep . $p["title"];
623 $sep = " > ";
624 }
625 if ($a_top_skill_id == $p["child"]) {
626 $found = true;
627 }
628 }
629
630 $sub = $this->ui_fac->panel()->sub((string) $title, $panel_comps);
631 if ($a_edit) {
632 $actions = array();
633 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
634 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
635 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
636 if ($this->use_materials) {
637 $actions[] = $this->ui_fac->button()->shy(
638 $lng->txt('skmg_assign_materials'),
639 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")
640 );
641 }
642 $actions[] = $this->ui_fac->button()->shy(
643 $lng->txt('skmg_self_evaluation'),
644 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation")
645 );
646 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
647 }
648
649 $sub_panels[] = $sub;
650
651 $tpl->parseCurrentBlock();
652 }
653
654 $panel = $this->ui_fac->panel()->standard(
655 (string) ilSkillTreeNode::_lookupTitle($skill_id, $tref_id),
656 $sub_panels
657 );
658
659 if ($a_edit && $this->getProfileId() == 0) {
660 $actions = array();
661
662 $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
663 $actions[] = $this->ui_fac->button()->shy(
664 $lng->txt('skmg_remove_skill'),
665 $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove")
666 );
667
668 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
669 }
670
671 return $this->ui_ren->render($panel);
672 }
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.
getSkillDescription($skill)
Get level description.
getActualGapItem($a_levels, $a_tref_id=0)
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, $path, $title, $tpl, $user, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), ilBasicSkill\EVAL_BY_ALL, getActualGapItem(), getEvalItem(), getFilter(), ilSkillTreeNodeFactory\getInstance(), getMaterials(), getProfileId(), getProfileTargetItem(), getSelfEvalGapItem(), ilPersonalSkill\getSelfEvaluationDate(), getSkillDescription(), 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 1099 of file class.ilPersonalSkillsGUI.php.

1100 {
1103 $lng = $this->lng;
1104
1106 $ilUser->getId(),
1107 (int) $_GET["skill_id"],
1108 (int) $_GET["tref_id"],
1109 (int) $_GET["basic_skill_id"],
1110 (int) $_POST["se"]
1111 );
1112 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1113
1114 /* $ilCtrl->saveParameter($this, "skill_id");
1115 $ilCtrl->saveParameter($this, "level_id");
1116 $ilCtrl->saveParameter($this, "tref_id");
1117 $ilCtrl->saveParameter($this, "basic_skill_id");*/
1118
1119 $ilCtrl->redirect($this, "render");
1120 }
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 959 of file class.ilPersonalSkillsGUI.php.

960 {
964
965
966 include_once("./Services/Skill/classes/class.ilPersonalSkill.php");
967 if (is_array($_POST["wsp_id"])) {
968 foreach ($_POST["wsp_id"] as $w) {
970 $ilUser->getId(),
971 (int) $_GET["skill_id"],
972 (int) $_GET["tref_id"],
973 (int) $_GET["basic_skill_id"],
974 (int) $_GET["level_id"],
975 (int) $w
976 );
977 }
978 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
979 }
980
981 $ilCtrl->saveParameter($this, "skill_id");
982 $ilCtrl->saveParameter($this, "level_id");
983 $ilCtrl->saveParameter($this, "tref_id");
984 $ilCtrl->saveParameter($this, "basic_skill_id");
985
986 $ilCtrl->redirect($this, "assignMaterials");
987 }
static assignMaterial($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level, $a_wsp_id)
Assign material to skill level.
$w

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

+ Here is the call graph for this function:

◆ selectProfile()

ilPersonalSkillsGUI::selectProfile ( )

Select profile.

Parameters

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

1481 {
1483
1484 $ilCtrl->setParameter($this, "profile_id", $_POST["profile_id"]);
1485 if ($this->mode == "gap") {
1486 $ilCtrl->redirect($this, "listProfilesForGap");
1487 } else {
1488 $ilCtrl->redirect($this, "listAssignedProfile");
1489 }
1490 }

References $_POST, $ctrl, and $ilCtrl.

◆ selfEvaluation()

ilPersonalSkillsGUI::selfEvaluation ( )

Assign materials to skill levels.

Parameters

return

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

1022 {
1024 $lng = $this->lng;
1025 $tpl = $this->tpl;
1026 $ilToolbar = $this->toolbar;
1027 $ilTabs = $this->tabs;
1028
1029
1030 $ilTabs->setBackTarget(
1031 $lng->txt("back"),
1032 $ilCtrl->getLinkTarget($this, "render")
1033 );
1034
1035 $ilCtrl->saveParameter($this, "skill_id");
1036 $ilCtrl->saveParameter($this, "basic_skill_id");
1037 $ilCtrl->saveParameter($this, "tref_id");
1038
1039 include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
1040 $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
1041 $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
1042 ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
1043 ".svg"));
1044
1045 // basic skill selection
1046 include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
1047 $vtree = new ilVirtualSkillTree();
1048 $tref_id = 0;
1049 $skill_id = (int) $_GET["skill_id"];
1050 if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
1051 include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
1052 $tref_id = $_GET["skill_id"];
1053 $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
1054 }
1055 $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
1056
1057
1058 $options = array();
1059 foreach ($bs as $b) {
1060 $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
1061 }
1062
1063 $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
1064 ? (int) $_POST["basic_skill_id"]
1065 : (((int) $_GET["basic_skill_id"] > 0)
1066 ? (int) $_GET["basic_skill_id"]
1067 : key($options));
1068
1069 $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
1070
1071 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1072 $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
1073 $si->setOptions($options);
1074 $si->setValue($cur_basic_skill_id);
1075 $ilToolbar->addInputItem($si, true);
1076 $ilToolbar->addFormButton(
1077 $lng->txt("select"),
1078 "selfEvaluation"
1079 );
1080
1081 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1082
1083 // table
1084 include_once("./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
1086 $this,
1087 "selfEvaluation",
1088 (int) $_GET["skill_id"],
1089 (int) $_GET["tref_id"],
1090 $cur_basic_skill_id
1091 );
1092
1093 $tpl->setContent($tab->getHTML());
1094 }
Self evaluation, second simplier implementation.

References $_GET, $_POST, $ctrl, $ilCtrl, $lng, PHPMailer\PHPMailer\$options, $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 1227 of file class.ilPersonalSkillsGUI.php.

1228 {
1229 $this->gap_mode = "max_per_object";
1230 $this->gap_mode_obj_id = $a_obj_id;
1231 $this->gap_cat_title = $a_cat_title;
1232 $this->mode = "gap";
1233 }

◆ setGapAnalysisActualStatusModePerType()

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

Set gap analysis actual status mode "per type".

Parameters
string$a_typetype

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

1215 {
1216 $this->gap_mode = "max_per_type";
1217 $this->gap_mode_type = $a_type;
1218 $this->gap_cat_title = $a_cat_title;
1219 $this->mode = "gap";
1220 }
$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->addSubTab(
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->addSubTab(
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->activateSubTab($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 1181 of file class.ilPersonalSkillsGUI.php.

1182 {
1183 $ilToolbar = $this->toolbar;
1184 $lng = $this->lng;
1186
1187 $options = array();
1188 if (is_array($this->obj_skills) && $this->obj_id > 0) {
1189 $options[0] = $lng->txt("obj_" . ilObject::_lookupType($this->obj_id)) . ": " . ilObject::_lookupTitle($this->obj_id);
1190 }
1191
1192 foreach ($this->user_profiles as $p) {
1193 $options[$p["id"]] = $lng->txt("skmg_profile") . ": " . $p["title"];
1194 }
1195
1196 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1197 $si = new ilSelectInputGUI($lng->txt("skmg_profile"), "profile_id");
1198 $si->setOptions($options);
1199 $si->setValue($this->getProfileId());
1200 $ilToolbar->addInputItem($si, true);
1201 $ilToolbar->addFormButton(
1202 $lng->txt("select"),
1203 "selectProfile"
1204 );
1205 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1206 }

References $ctrl, $ilCtrl, $lng, PHPMailer\PHPMailer\$options, $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: