ILIAS  release_7 Revision v7.30-3-g800a261c036
ilPersonalSkillsGUI Class Reference

Personal skills GUI class. More...

+ Collaboration diagram for ilPersonalSkillsGUI:

Public Member Functions

 __construct ()
 Contructor. More...
 
 getFilter ()
 Get filter. 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...
 
 getObjectId ()
 
 getObjectSkills ()
 
 setObjectSkills ($a_obj_id, $a_skills=null)
 Set object skills. More...
 
 setObjectSkillProfiles (ilContainerGlobalProfiles $a_g_profiles, ilContainerLocalProfiles $a_l_profils)
 Set object skill profiles. 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...
 
 showInfoBox ()
 
 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

 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
 
 $tree_service
 
 $obj_definition
 
 $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 ilPersonalSkillsGUI:

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

Constructor & Destructor Documentation

◆ __construct()

ilPersonalSkillsGUI::__construct ( )

Contructor.

public

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

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

116  {
117  global $DIC;
118 
119  $this->ctrl = $DIC->ctrl();
120  $this->lng = $DIC->language();
121  $this->help = $DIC["ilHelp"];
122  $this->setting = $DIC["ilSetting"];
123  $this->user = $DIC->user();
124  $this->tpl = $DIC["tpl"];
125  $this->tabs = $DIC->tabs();
126  $this->toolbar = $DIC->toolbar();
127  $this->access = $DIC->access();
128  $this->ui_fac = $DIC->ui()->factory();
129  $this->ui_ren = $DIC->ui()->renderer();
130  $this->ui = $DIC->ui();
131  $this->tree_service = $DIC->repositoryTree();
132  $this->obj_definition = $DIC["objDefinition"];
133 
134  $ilCtrl = $this->ctrl;
135  $ilHelp = $this->help;
136  $lng = $this->lng;
138 
139 
140  $lng->loadLanguageModule('skmg');
141  $ilHelp->setScreenIdComponent("skill");
142 
143  $ilCtrl->saveParameter($this, "skill_id");
144  $ilCtrl->saveParameter($this, "tref_id");
145  $ilCtrl->saveParameter($this, "profile_id");
146  $ilCtrl->saveParameter($this, "list_mode");
147 
148  $this->list_mode = $_GET["list_mode"];
149 
150  $this->user_profiles = ilSkillProfile::getProfilesOfUser($this->user->getId());
151  $this->cont_profiles = array();
152 
153  $this->skill_tree = new ilSkillTree();
154 
155  $this->use_materials = !$ilSetting->get("disable_personal_workspace");
156 
157  $this->skmg_settings = new ilSkillManagementSettings();
158 
159  $this->filter = new ilPersonalSkillsFilterGUI();
160  }
Skill tree.
$_GET["client_id"]
user()
Definition: user.php:4
help()
Definition: help.php:2
static getProfilesOfUser($a_user_id)
Get profiles of a user.
global $DIC
Definition: goto.php:24
ui()
Definition: ui.php:5
global $ilSetting
Definition: privfeed.php:17
filter()
Definition: filter.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ addSkill()

ilPersonalSkillsGUI::addSkill ( )

Add personal skill.

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

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

791  {
792  $ilCtrl = $this->ctrl;
794  $lng = $this->lng;
795 
796  ilPersonalSkill::addPersonalSkill($ilUser->getId(), (int) $_GET["obj_id"]);
797 
798  ilUtil::sendSuccess($lng->txt("msg_object_modified"));
799  $ilCtrl->redirect($this, "listSkills");
800  }
$_GET["client_id"]
static addPersonalSkill($a_user_id, $a_skill_node_id)
Add personal skill.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ applyFilter()

ilPersonalSkillsGUI::applyFilter ( )
protected

Apply filter.

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

References getFilter().

505  {
506  $this->getFilter()->save();
507  $this->ctrl->redirect($this, "listSkills");
508  }
+ Here is the call graph for this function:

◆ applyFilterAssignedProfiles()

ilPersonalSkillsGUI::applyFilterAssignedProfiles ( )
protected

Apply filter for profiles view.

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

References getFilter().

514  {
515  $this->getFilter()->save();
516  $this->ctrl->redirect($this, "listAssignedProfile");
517  }
+ Here is the call graph for this function:

◆ assignMaterial()

ilPersonalSkillsGUI::assignMaterial ( )

Assign materials to skill level.

Parameters

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

References $ctrl, $ilSetting, $ilUser, $lng, $message, $setting, $tabs, $tpl, $ui, $url, $user, and ilTreeExplorerGUI\setTypeWhiteList().

944  {
945  $ilCtrl = $this->ctrl;
947  $lng = $this->lng;
948  $tpl = $this->tpl;
949  $ilTabs = $this->tabs;
951  $ui = $this->ui;
952 
953  if (!$ilSetting->get("disable_personal_workspace")) {
954  $url = 'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
955  $mbox = $ui->factory()->messageBox()->info($lng->txt("skmg_ass_materials_from_workspace"))
956  ->withLinks([$ui->factory()->link()->standard(
957  $lng->txt("personal_resources"),
958  $url
959  )]);
960  $message = $ui->renderer()->render($mbox);
961  }
962 
963  $ilCtrl->saveParameter($this, "skill_id");
964  $ilCtrl->saveParameter($this, "level_id");
965  $ilCtrl->saveParameter($this, "tref_id");
966  $ilCtrl->saveParameter($this, "basic_skill_id");
967 
968  $ilTabs->setBackTarget(
969  $lng->txt("back"),
970  $ilCtrl->getLinkTarget($this, "assignMaterials")
971  );
972 
973 
974  $exp = new ilWorkspaceExplorerGUI($ilUser->getId(), $this, "assignMaterial", $this, "");
975  $exp->setTypeWhiteList(array("blog", "wsrt", "wfld", "file", "tstv", "excv"));
976  $exp->setSelectableTypes(array("file", "tstv", "excv"));
977  $exp->setSelectMode("wsp_id", true);
978  if ($exp->handleCommand()) {
979  return;
980  }
981 
982  // fill template
983  $mtpl = new ilTemplate("tpl.materials_selection.html", true, true, "Services/Skill");
984  $mtpl->setVariable("EXP", $exp->getHTML());
985 
986  // toolbars
987  $tb = new ilToolbarGUI();
988  $tb->addFormButton(
989  $lng->txt("select"),
990  "selectMaterial"
991  );
992  $tb->setFormAction($ilCtrl->getFormAction($this));
993  $tb->setOpenFormTag(true);
994  $tb->setCloseFormTag(false);
995  $mtpl->setVariable("TOOLBAR1", $tb->getHTML());
996  $tb->setOpenFormTag(false);
997  $tb->setCloseFormTag(true);
998  $mtpl->setVariable("TOOLBAR2", $tb->getHTML());
999 
1000  $tpl->setContent($message . $mtpl->get());
1001  }
setTypeWhiteList($a_val)
Set type white list.
Explorer for selecting a personal workspace item.
global $ilSetting
Definition: privfeed.php:17
$message
Definition: xapiexit.php:14
$url
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ assignMaterials()

ilPersonalSkillsGUI::assignMaterials ( )

Assign materials to skill levels.

Parameters

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

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

865  {
866  $ilCtrl = $this->ctrl;
867  $lng = $this->lng;
868  $tpl = $this->tpl;
869  $ilToolbar = $this->toolbar;
870  $ilTabs = $this->tabs;
871 
872 
873  $ilTabs->setBackTarget(
874  $lng->txt("back"),
875  $ilCtrl->getLinkTarget($this, "render")
876  );
877 
878  $ilCtrl->saveParameter($this, "skill_id");
879  $ilCtrl->saveParameter($this, "basic_skill_id");
880  $ilCtrl->saveParameter($this, "tref_id");
881 
882  $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
883  $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
884  ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
885  ".svg"));
886 
887  // basic skill selection
888  $vtree = new ilVirtualSkillTree();
889  $tref_id = 0;
890  $skill_id = (int) $_GET["skill_id"];
891  if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
892  $tref_id = $_GET["skill_id"];
893  $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
894  }
895  $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
896 
897  $options = array();
898  foreach ($bs as $b) {
899  //$options[$b["id"]] = ilSkillTreeNode::_lookupTitle($b["id"]);
900  $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
901  }
902 
903  $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
904  ? (int) $_POST["basic_skill_id"]
905  : (((int) $_GET["basic_skill_id"] > 0)
906  ? (int) $_GET["basic_skill_id"]
907  : key($options));
908 
909  $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
910 
911  if (count($options) > 1) {
912  $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
913  $si->setOptions($options);
914  $si->setValue($cur_basic_skill_id);
915  $ilToolbar->addInputItem($si, true);
916  $ilToolbar->addFormButton(
917  $lng->txt("select"),
918  "assignMaterials"
919  );
920 
921  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
922  }
923 
924  // table
926  $this,
927  "assignMaterials",
928  (int) $_GET["skill_id"],
929  (int) $_GET["tref_id"],
930  $cur_basic_skill_id
931  );
932 
933  $tpl->setContent($tab->getHTML());
934  }
$_GET["client_id"]
Assign materials to skill levels table.
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)
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
$_POST["username"]
+ Here is the call graph for this function:

◆ confirmSkillRemove()

ilPersonalSkillsGUI::confirmSkillRemove ( )

Confirm skill remove.

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

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

808  {
809  $lng = $this->lng;
810  $tpl = $this->tpl;
811  $ilCtrl = $this->ctrl;
812 
813  if ($_GET["skill_id"] > 0) {
814  $_POST["id"][] = $_GET["skill_id"];
815  }
816  if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
817  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
818  $ilCtrl->redirect($this, "listSkills");
819  } else {
820  $cgui = new ilConfirmationGUI();
821  $cgui->setFormAction($ilCtrl->getFormAction($this));
822  $cgui->setHeaderText($lng->txt("skmg_really_remove_skills"));
823  $cgui->setCancel($lng->txt("cancel"), "listSkills");
824  $cgui->setConfirm($lng->txt("remove"), "removeSkills");
825 
826  foreach ($_POST["id"] as $i) {
827  $cgui->addItem("id[]", $i, ilSkillTreeNode::_lookupTitle($i));
828  }
829 
830  $tpl->setContent($cgui->getHTML());
831  }
832  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
$_POST["username"]
$i
Definition: metadata.php:24
Confirmation screen class.
+ Here is the call graph for this function:

◆ determineCurrentProfile()

ilPersonalSkillsGUI::determineCurrentProfile ( )

Determine current profile id.

Parameters

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

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

Referenced by listAssignedProfile(), and listProfilesForGap().

287  {
288  $ilCtrl = $this->ctrl;
289 
290  if (count($this->user_profiles) == 0 && count($this->cont_profiles) == 0) {
291  return;
292  }
293  $current_prof_id = 0;
294  if ((int) $_GET["profile_id"] > 0) {
295  foreach ($this->user_profiles as $p) {
296  if ($p["id"] == (int) $_GET["profile_id"]) {
297  $current_prof_id = (int) $_GET["profile_id"];
298  }
299  }
300  }
301 
302  if ((int) $_GET["profile_id"] > 0 && $current_prof_id == 0) {
303  foreach ($this->cont_profiles as $p) {
304  if ($p["profile_id"] == (int) $_GET["profile_id"]) {
305  $current_prof_id = (int) $_GET["profile_id"];
306  }
307  }
308  }
309 
310  if ($current_prof_id == 0 && !(is_array($this->obj_skills) && $this->obj_id > 0)) {
311  $current_prof_id = $this->user_profiles[0]["id"];
312  }
313  $ilCtrl->setParameter($this, "profile_id", $current_prof_id);
314  $this->setProfileId($current_prof_id);
315  }
setProfileId($a_val)
Set profile id.
$_GET["client_id"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPersonalSkillsGUI::executeCommand ( )

Execute command.

public

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

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

365  {
366  $ilCtrl = $this->ctrl;
368  $lng = $this->lng;
369  $tpl = $this->tpl;
370 
371  $next_class = $ilCtrl->getNextClass($this);
372 
373 
374  // determin standard command
375  $std_cmd = "listSkills";
376 
377  $cmd = $ilCtrl->getCmd($std_cmd);
378 
379  //$tpl->setTitle($lng->txt("skills"));
380  //$tpl->setTitleIcon(ilUtil::getImagePath("icon_skmg.svg"));
381 
382  switch ($next_class) {
383  default:
384  $this->$cmd();
385  break;
386  }
387  return true;
388  }
$ilUser
Definition: imgupload.php:18

◆ getActualGapItem()

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

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

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

Referenced by renderSkillHTML().

1664  {
1665  $lng = $this->lng;
1666 
1667  $a_activated_levels = array();
1668  foreach ($a_levels as $k => $v) {
1669  if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1670  $a_activated_levels[] = $v["id"];
1671  }
1672  }
1673 
1674  if ($this->gap_cat_title != "") {
1675  $title = $this->gap_cat_title;
1676  } elseif ($this->gap_mode == "max_per_type") {
1677  $title = $lng->txt("objs_" . $this->gap_mode_type);
1678  } elseif ($this->gap_mode == "max_per_object") {
1679  $title = ilObject::_lookupTitle($this->gap_mode_obj_id);
1680  }
1681 
1682  $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1683  $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1684 
1685  $type = 1;
1686  $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1687  if ($type > 0) {
1688  $tpl->touchBlock("st" . $type);
1689  $tpl->touchBlock("stb" . $type);
1690  }
1691 
1692  if ($title != $lng->txt("skmg_eval_type_" . $type)) {
1693  $tpl->setVariable("TITLE", $title);
1694  }
1695 
1696  return $tpl->get();
1697  }
$type
static _lookupTitle($a_id)
lookup object title
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
+ 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 1301 of file class.ilPersonalSkillsGUI.php.

References $obj_id, ilObject\_getAllReferences(), ilObject\_lookupObjectId(), ilObject\_lookupType(), and ilObjectLP\getSupportedObjectTypes().

Referenced by getGapAnalysisHTML(), and listAssignedProfile().

1302  {
1303  // get actual levels for gap analysis
1304  $this->actual_levels = array();
1305  foreach ($skills as $sk) {
1306  $bs = new ilBasicSkill($sk["base_skill_id"]);
1307  if ($this->gap_mode == "max_per_type") {
1308  $max = $bs->getMaxLevelPerType($sk["tref_id"], $this->gap_mode_type, $user_id);
1309  $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1310  } elseif ($this->gap_mode == "max_per_object") {
1311  if ($this->obj_definition->isContainer(\ilObject::_lookupType($this->gap_mode_obj_id))) {
1312  $sub_objects = $this->tree_service->getSubTree(
1313  $this->tree_service->getNodeData((int) current(\ilObject::_getAllReferences($this->gap_mode_obj_id))),
1314  false,
1316  );
1317  $max = 0;
1318  foreach ($sub_objects as $ref_id) {
1320  $max_tmp = $bs->getMaxLevelPerObject($sk["tref_id"], $obj_id, $user_id);
1321  if ($max_tmp > $max) {
1322  $max = $max_tmp;
1323  }
1324  }
1325  } else {
1326  $max = $bs->getMaxLevelPerObject($sk["tref_id"], $this->gap_mode_obj_id, $user_id);
1327  }
1328  $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1329  } else {
1330  $max = $bs->getMaxLevel($sk["tref_id"], $user_id);
1331  $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1332  }
1333  }
1334  }
static getSupportedObjectTypes()
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupType($a_id, $a_reference=false)
lookup object type
Basic Skill.
+ Here is the call graph for this function:
+ 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 1845 of file class.ilPersonalSkillsGUI.php.

References $tpl.

Referenced by renderSkillHTML().

1845  : string
1846  {
1847  $tpl = new ilTemplate("tpl.skill_description_basic.html", true, true, "Services/Skill");
1848 
1849  if (!is_null($description) && !empty($description)) {
1850  $tpl->setCurrentBlock("description_basic");
1851  $tpl->setVariable("DESCRIPTION_BASIC", $description);
1852  $tpl->parseCurrentBlock();
1853  }
1854 
1855  return $tpl->get();
1856  }
+ Here is the caller graph for this function:

◆ getEvalItem()

ilPersonalSkillsGUI::getEvalItem (   $a_levels,
  $a_level_entry 
)

Get eval item.

Parameters

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

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

Referenced by renderSkillHTML().

1764  {
1765  $lng = $this->lng;
1766  $ilAccess = $this->access;
1767 
1768  $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1769  $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_level_entry["level_id"]));
1770 
1772 
1773  if ($a_level_entry["self_eval"] == 1) {
1775  }
1776 
1777  if ($a_level_entry["trigger_obj_type"] == "tst") {
1779  }
1780 
1782  $title = "";
1783  if ($a_level_entry["trigger_obj_id"] > 0) {
1784  if (ilObject::_exists($a_level_entry["trigger_ref_id"], true)) {
1785  $title = ilObject::_lookupTitle($a_level_entry["trigger_obj_id"]);
1786  } elseif (!empty($del_data = ilObjectDataDeletionLog::get($a_level_entry["trigger_obj_id"]))) {
1787  $title = $del_data["title"];
1788  } else {
1789  $title = ($a_level_entry["trigger_title"]) ?? "";
1790  }
1791  }
1792 
1793  if ($a_level_entry["trigger_ref_id"] > 0
1794  && $ilAccess->checkAccess("read", "", $a_level_entry["trigger_ref_id"])) {
1795  $title = "<a href='" . ilLink::_getLink($a_level_entry["trigger_ref_id"]) . "'>" . $title . "</a>";
1796  }
1797 
1798  $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1799  if ($type > 0) {
1800  $tpl->touchBlock("st" . $type);
1801  $tpl->touchBlock("stb" . $type);
1802  }
1803  $tpl->setVariable("TITLE", $title);
1804  $tpl->setVariable(
1805  "DATE",
1806  ilDatePresentation::formatDate(new ilDate($a_level_entry["status_date"], IL_CAL_DATETIME))
1807  );
1808 
1810 
1811  return $tpl->get();
1812  }
const IL_CAL_DATETIME
$type
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
Class for single dates.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFilter()

ilPersonalSkillsGUI::getFilter ( )

Get filter.

Returns
ilPersonalSkillsFilterGUI

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

References $filter.

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

168  {
169  return $this->filter;
170  }
+ Here is the caller graph for this function:

◆ getGapAnalysisHTML()

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

Get gap analysis html.

Parameters

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

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

Referenced by listProfilesForGap().

1345  {
1346  $ilUser = $this->user;
1347  $lng = $this->lng;
1348 
1349  // needed fix for profiles in gap view, because there is no filter shown (yet)
1350  $this->getFilter()->clear();
1351 
1352  if ($a_skills == null) {
1353  $a_skills = $this->obj_skills;
1354  }
1355 
1356 
1357  if ($this->getIntroText() != "") {
1358  $pan = ilPanelGUI::getInstance();
1359  $pan->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
1360  $pan->setBody($this->getIntroText());
1361  $intro_html = $pan->getHTML();
1362  }
1363 
1364  // $this->setTabs("list_skills");
1365 
1366  if ($a_user_id == 0) {
1367  $user_id = $ilUser->getId();
1368  } else {
1369  $user_id = $a_user_id;
1370  }
1371 
1372  $skills = array();
1373  if ($this->getProfileId() > 0) {
1374  $profile = new ilSkillProfile($this->getProfileId());
1375  $this->profile_levels = $profile->getSkillLevels();
1376 
1377  foreach ($this->profile_levels as $l) {
1378  $skills[] = array(
1379  "base_skill_id" => $l["base_skill_id"],
1380  "tref_id" => $l["tref_id"],
1381  "level_id" => $l["level_id"]
1382  );
1383  }
1384  } elseif (is_array($a_skills)) {
1385  $skills = $a_skills;
1386  }
1387 
1388  // get actual levels for gap analysis
1389  $this->getActualLevels($skills, $user_id);
1390 
1391  $incl_self_eval = false;
1392  if (count($this->getGapAnalysisSelfEvalLevels()) > 0) {
1393  $incl_self_eval = true;
1394  $self_vals = $this->getGapAnalysisSelfEvalLevels();
1395  }
1396 
1397  // output spider stuff
1398  $all_chart_html = "";
1399 
1400  // determine skills that should be shown in the spider web
1401  $sw_skills = array();
1402  foreach ($skills as $sk) {
1403  if (!in_array($sk["base_skill_id"] . ":" . $sk["tref_id"], $this->hidden_skills)) {
1404  $sw_skills[] = $sk;
1405  }
1406  }
1407 
1408  if (count($sw_skills) >= 3) {
1409  $skill_packages = array();
1410 
1411  if (count($sw_skills) < 8) {
1412  $skill_packages[1] = $sw_skills;
1413  } else {
1414  $mod = count($sw_skills) % 7;
1415  $pkg_num = floor((count($sw_skills) - 1) / 7) + 1;
1416  $cpkg = 1;
1417  foreach ($sw_skills as $k => $s) {
1418  $skill_packages[$cpkg][$k] = $s;
1419  if ($mod < 3 && count($skill_packages) == ($pkg_num - 1) && count($skill_packages[$cpkg]) == 3 + $mod) {
1420  $cpkg += 1;
1421  } elseif (count($skill_packages[$cpkg]) == 7) {
1422  $cpkg += 1;
1423  }
1424  }
1425  }
1426 
1427  $pkg_cnt = 0;
1428  foreach ($skill_packages as $pskills) {
1429  $pkg_cnt++;
1430  $max_cnt = 0;
1431  $leg_labels = array();
1432  //var_dump($this->profile_levels);
1433  //foreach ($this->profile_levels as $k => $l)
1434 
1435  // write target, actual and self counter to skill array
1436  foreach ($pskills as $k => $l) {
1437  //$bs = new ilBasicSkill($l["base_skill_id"]);
1438  $bs = new ilBasicSkill($l["base_skill_id"]);
1439  $leg_labels[] = ilBasicSkill::_lookupTitle($l["base_skill_id"], $l["tref_id"]);
1440  $levels = $bs->getLevelData();
1441  $cnt = 0;
1442  foreach ($levels as $lv) {
1443  $cnt++;
1444  if ($l["level_id"] == $lv["id"]) {
1445  $pskills[$k]["target_cnt"] = $cnt;
1446  }
1447  if ($this->actual_levels[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"]) {
1448  $pskills[$k]["actual_cnt"] = $cnt;
1449  }
1450  if ($incl_self_eval) {
1451  if ($self_vals[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"]) {
1452  $pskills[$k]["self_cnt"] = $cnt;
1453  }
1454  }
1455  $max_cnt = max($max_cnt, $cnt);
1456  }
1457  }
1458 
1459  $chart = ilChart::getInstanceByType(ilChart::TYPE_SPIDER, "gap_chart" . $pkg_cnt);
1460  $chart->setsize(800, 300);
1461  $chart->setYAxisMax($max_cnt);
1462  $chart->setLegLabels($leg_labels);
1463 
1464  // target level
1465  $cd = $chart->getDataInstance();
1466  $cd->setLabel($lng->txt("skmg_target_level"));
1467  $cd->setFill(true, "#A0A0A0");
1468 
1469  // other users
1470  $cd2 = $chart->getDataInstance();
1471  if ($this->gap_cat_title != "") {
1472  $cd2->setLabel($this->gap_cat_title);
1473  } elseif ($this->gap_mode == "max_per_type") {
1474  $cd2->setLabel($lng->txt("objs_" . $this->gap_mode_type));
1475  } elseif ($this->gap_mode == "max_per_object") {
1476  $cd2->setLabel(ilObject::_lookupTitle($this->gap_mode_obj_id));
1477  }
1478  //$cd2->setFill(true, "#dcb496");
1479  $cd2->setFill(true, "#FF8080");
1480  $cd2->setFill(true, "#cc8466");
1481 
1482  // self evaluation
1483  if ($incl_self_eval) {
1484  $cd3 = $chart->getDataInstance();
1485  $cd3->setLabel($lng->txt("skmg_self_evaluation"));
1486  $cd3->setFill(true, "#6ea03c");
1487  }
1488 
1489  // fill in data
1490  $cnt = 0;
1491  foreach ($pskills as $pl) {
1492  $cd->addPoint($cnt, (int) $pl["target_cnt"]);
1493  $cd2->addPoint($cnt, (int) $pl["actual_cnt"]);
1494  if ($incl_self_eval) {
1495  $cd3->addPoint($cnt, (int) $pl["self_cnt"]);
1496  }
1497  $cnt++;
1498  }
1499 
1500  // add data to chart
1501  if ($this->getProfileId() > 0) {
1502  $chart->addData($cd);
1503  }
1504  $chart->addData($cd2);
1505  if ($incl_self_eval && count($this->getGapAnalysisSelfEvalLevels()) > 0) {
1506  $chart->addData($cd3);
1507  }
1508 
1509  if ($pkg_cnt == 1) {
1510  $lg = new ilChartLegend();
1511  $chart->setLegend($lg);
1512  }
1513 
1514  $chart_html = $chart->getHTML();
1515  $all_chart_html .= $chart_html;
1516  }
1517 
1518  $pan = ilPanelGUI::getInstance();
1519  $pan->setPanelStyle(ilPanelGUI::PANEL_STYLE_PRIMARY);
1520  $pan->setBody($all_chart_html);
1521  $all_chart_html = $pan->getHTML();
1522  }
1523 
1524  $stree = new ilSkillTree();
1525  $html = "";
1526 
1527  if (!$this->getProfileId() > 0) {
1528  // order skills per virtual skill tree
1529  $vtree = new ilVirtualSkillTree();
1530  $skills = $vtree->getOrderedNodeset($skills, "base_skill_id", "tref_id");
1531  }
1532  foreach ($skills as $s) {
1533  $path = $stree->getSkillTreePath($s["base_skill_id"]);
1534 
1535  // check draft
1536  foreach ($path as $p) {
1537  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
1538  continue(2);
1539  }
1540  }
1541  $html .= $this->getSkillHTML($s["base_skill_id"], $user_id, false, $s["tref_id"]);
1542  }
1543 
1544  // list skills
1545 
1546  return $intro_html . $all_chart_html . $html;
1547  }
const TYPE_SPIDER
Chart legend.
Skill tree.
const PANEL_STYLE_PRIMARY
static _lookupTitle($a_id)
lookup object title
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
getActualLevels($skills, $user_id)
Get actual levels.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static getInstance()
Get instance.
$ilUser
Definition: imgupload.php:18
Basic Skill.
static getInstanceByType($a_type, $a_id)
Get type instance.
+ 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 208 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 228 of file class.ilPersonalSkillsGUI.php.

References $history_view.

229  {
230  return $this->history_view;
231  }

◆ getIntroText()

ilPersonalSkillsGUI::getIntroText ( )

Get intro text.

Returns
string intro text html

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

References $intro_text.

Referenced by getGapAnalysisHTML().

265  {
266  return $this->intro_text;
267  }
+ 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 730 of file class.ilPersonalSkillsGUI.php.

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

Referenced by getMaterials().

731  {
732  if (!$this->ws_tree) {
733  $this->ws_tree = new ilWorkspaceTree($a_user_id);
734  $this->ws_access = new ilWorkspaceAccessHandler($caption);
735  }
736 
737  $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
738  $caption = ilObject::_lookupTitle($obj_id);
739 
740  if (!$this->offline_mode) {
741  $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
742  } else {
743  $url = $this->offline_mode . "file_" . $obj_id . "/";
744 
745  // all possible material types for now
746  switch (ilObject::_lookupType($obj_id)) {
747  case "tstv":
748  $obj = new ilObjTestVerification($obj_id, false);
749  $url .= $obj->getOfflineFilename();
750  break;
751 
752  case "excv":
753  $obj = new ilObjExerciseVerification($obj_id, false);
754  $url .= $obj->getOfflineFilename();
755  break;
756 
757  case "crsv":
758  $obj = new ilObjCourseVerification($obj_id, false);
759  $url .= $obj->getOfflineFilename();
760  break;
761 
762  case "cmxv":
763  $obj = new ilObjCmiXapiVerification($obj_id, false);
764  $url .= $obj->getOfflineFilename();
765  break;
766 
767  case "ltiv":
768  $obj = new ilObjLTIConsumerVerification($obj_id, false);
769  $url .= $obj->getOfflineFilename();
770  break;
771 
772  case "scov":
773  $obj = new ilObjSCORMVerification($obj_id, false);
774  $url .= $obj->getOfflineFilename();
775  break;
776 
777  case "file":
778  $file = new ilObjFile($obj_id, false);
779  $url .= $file->getFilename();
780  break;
781  }
782  }
783 
784  return array($caption, $url);
785  }
Access handler for personal workspace.
static _lookupTitle($a_id)
lookup object title
Tree handler for personal workspace.
static _lookupType($a_id, $a_reference=false)
lookup object type
$url
+ 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

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

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

Referenced by renderSkillHTML().

1573  {
1574  $ilUser = $this->user;
1575  $lng = $this->lng;
1576 
1577  if ($a_user_id == 0) {
1578  $a_user_id = $ilUser->getId();
1579  }
1580 
1581  // only render, if materials given
1582  $got_mat = false;
1583  foreach ($a_levels as $v) {
1585  $a_user_id,
1586  $a_tref_id,
1587  $v["id"]
1588  );
1589  if ($mat_cnt > 0) {
1590  $got_mat = true;
1591  }
1592  }
1593  if (!$got_mat) {
1594  return "";
1595  }
1596 
1597  $tpl = new ilTemplate("tpl.skill_materials.html", true, true, "Services/Skill");
1598  foreach ($a_levels as $k => $v) {
1599  $got_mat = false;
1601  $a_user_id,
1602  $a_tref_id,
1603  $v["id"]
1604  ) as $item) {
1605  $tpl->setCurrentBlock("material");
1606  $mat_data = $this->getMaterialInfo($item["wsp_id"], $a_user_id);
1607  $tpl->setVariable("HREF_LINK", $mat_data[1]);
1608  $tpl->setVariable("TXT_LINK", $mat_data[0]);
1609  $tpl->parseCurrentBlock();
1610  $got_mat = true;
1611  }
1612  if ($got_mat) {
1613  $tpl->setCurrentBlock("level");
1614  $tpl->setVariable("LEVEL_VAL", $v["title"]);
1615  $tpl->parseCurrentBlock();
1616  }
1617  }
1618  $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_materials"));
1619 
1620  return $tpl->get();
1621  }
getMaterialInfo($a_wsp_id, $a_user_id)
Get material file name and goto url.
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)
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjectId()

ilPersonalSkillsGUI::getObjectId ( )
Returns
int

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

References $obj_id.

320  : int
321  {
322  return $this->obj_id;
323  }

◆ getObjectSkills()

ilPersonalSkillsGUI::getObjectSkills ( )
Returns
array

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

References $obj_skills.

328  : array
329  {
330  return $this->obj_skills;
331  }

◆ getProfileId()

ilPersonalSkillsGUI::getProfileId ( )

Get profile id.

Returns

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

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

189  {
190  return $this->profile_id;
191  }
+ 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

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

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

Referenced by renderSkillHTML().

1630  {
1631  $lng = $this->lng;
1632 
1633  $profile = new ilSkillProfile($a_profile_id);
1634  $profile_levels = $profile->getSkillLevels();
1635 
1636  $a_activated_levels = array();
1637 
1638  foreach ($a_levels as $k => $v) {
1639  foreach ($profile_levels as $pl) {
1640  if ($pl["level_id"] == $v["id"] &&
1641  $pl["base_skill_id"] == $v["skill_id"] &&
1642  $a_tref_id == $pl["tref_id"]) {
1643  $a_activated_levels[] = $pl["level_id"];
1644  }
1645  }
1646  }
1647 
1648  $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1649  $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1650 
1651  $tpl->setVariable("TYPE", $lng->txt("skmg_target_level"));
1652  $tpl->setVariable("TITLE", "");
1653 
1654  return $tpl->get();
1655  }
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
+ 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

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

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

1742  {
1743  $vals = array();
1744 
1745  if (!is_array($a_activated_levels)) {
1746  $a_activated_levels = array($a_activated_levels);
1747  }
1748 
1749  foreach ($a_levels as $level) {
1750  $vals[$level["title"]] = (in_array($level["id"], $a_activated_levels));
1751  }
1752  $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1753 
1754  return $this->ui_ren->render($scale_bar);
1755  }
+ Here is the caller graph for this function:

◆ getSelfEvalGapItem()

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

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

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

Referenced by renderSkillHTML().

1706  {
1707  $lng = $this->lng;
1708 
1709  $self_vals = $this->getGapAnalysisSelfEvalLevels();
1710  if (count($self_vals) == 0) {
1711  return;
1712  }
1713 
1714  $a_activated_levels = array();
1715  foreach ($a_levels as $k => $v) {
1716  if ($self_vals[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1717  $a_activated_levels[] = $v["id"];
1718  }
1719  }
1720 
1721  $tpl = new ilTemplate("tpl.skill_eval_item.html", true, true, "Services/Skill");
1722  $tpl->setVariable("SCALE_BAR", $this->getScaleBar($a_levels, $a_activated_levels));
1723 
1724  $type = 3;
1725  $tpl->setVariable("TYPE", $lng->txt("skmg_eval_type_" . $type));
1726  if ($type > 0) {
1727  $tpl->touchBlock("st" . $type);
1728  $tpl->touchBlock("stb" . $type);
1729  }
1730 
1731  return $tpl->get();
1732  }
$type
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
+ 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 1822 of file class.ilPersonalSkillsGUI.php.

References $tpl, and ilSkillTreeNode\_lookupDescription().

Referenced by renderSkillHTML().

1822  : string
1823  {
1824  $tpl = new ilTemplate("tpl.skill_description_category.html", true, true, "Services/Skill");
1825 
1826  //if (ilSkillTreeNode::_lookupType($skill_id) == "scat") {
1827  $des = ilSkillTreeNode::_lookupDescription($skill_id);
1828  if (!is_null($des) && !empty($des)) {
1829  $tpl->setCurrentBlock("description_category");
1830  $tpl->setVariable("DESCRIPTION_CATEGORY", $des);
1831  $tpl->parseCurrentBlock();
1832  }
1833  //}
1834 
1835  return $tpl->get();
1836  }
static _lookupDescription($a_obj_id)
Lookup Description.
+ 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 528 of file class.ilPersonalSkillsGUI.php.

References renderSkillHTML().

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

529  {
530  // user interface plugin slot + default rendering
531  $uip = new ilUIHookProcessor(
532  "Services/Skill",
533  "personal_skill_html",
534  array("personal_skills_gui" => $this, "top_skill_id" => $a_top_skill_id, "user_id" => $a_user_id,
535  "edit" => $a_edit, "tref_id" => $a_tref_id)
536  );
537  if (!$uip->replaced()) {
538  $skill_html = $this->renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
539  }
540  $skill_html = $uip->getHTML($skill_html);
541 
542  return $skill_html;
543  }
renderSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Render skill html.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillLevelDescription()

ilPersonalSkillsGUI::getSkillLevelDescription (   $skill)

Get level description.

Parameters

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

References $tpl.

Referenced by renderSkillHTML().

1865  {
1866  $level_data = $skill->getLevelData();
1867  $tpl = new ilTemplate("tpl.skill_desc.html", true, true, "Services/Skill");
1868 
1869  $desc_exists = false;
1870  foreach ($level_data as $l) {
1871  if ($l["description"] != "") {
1872  $desc_exists = true;
1873  }
1874  }
1875  reset($level_data);
1876  if ($desc_exists) {
1877  foreach ($level_data as $l) {
1878  $tpl->setCurrentBlock("level");
1879  $tpl->setVariable("LEVEL_VAL", $l["title"]);
1880  $tpl->setVariable("LEVEL_DESC", nl2br($l["description"]));
1881  $tpl->parseCurrentBlock();
1882  }
1883  }
1884 
1885  return $tpl->get();
1886  }
+ 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

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

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

Referenced by renderSkillHTML().

1895  {
1896  $lng = $this->lng;
1897 
1898  $tpl = new ilTemplate("tpl.suggested_resources.html", true, true, "Services/Skill");
1899 
1900  // use a profile
1901  if ($a_profile_id > 0) {
1902  $too_low = true;
1903  $current_target_level = 0;
1904 
1905  foreach ($a_levels as $k => $v) {
1906  foreach ($this->profile_levels as $pl) {
1907  if ($pl["level_id"] == $v["id"] &&
1908  $pl["base_skill_id"] == $v["skill_id"]) {
1909  $too_low = true;
1910  $current_target_level = $v["id"];
1911  }
1912  }
1913 
1914  if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"]) {
1915  $too_low = false;
1916  }
1917  }
1918 
1919  // note for self-evaluation
1920  if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
1921  !ilBasicSkill::hasSelfEvaluated($this->user->getId(), $a_base_skill, $a_tref_id)) {
1922  $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_self_eval"));
1923  return $tpl->get();
1924  }
1925 
1926  // suggested resources
1927  if ($too_low) {
1928  $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1929  $res = $skill_res->getResources();
1930  $imp_resources = array();
1931  foreach ($res as $level) {
1932  foreach ($level as $r) {
1933  if ($r["imparting"] == true &&
1934  $current_target_level == $r["level_id"]) {
1935  $imp_resources[] = $r;
1936  }
1937  }
1938  }
1939  foreach ($imp_resources as $r) {
1940  $ref_id = $r["rep_ref_id"];
1942  $title = ilObject::_lookupTitle($obj_id);
1943  $tpl->setCurrentBlock("resource_item");
1944  $tpl->setVariable("TXT_RES", $title);
1945  $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1946  $tpl->parseCurrentBlock();
1947  }
1948  if (count($imp_resources) > 0) {
1949  $tpl->touchBlock("resources_list");
1950  $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_res"));
1951  return $tpl->get();
1952  } else {
1953  $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_no_res"));
1954  return $tpl->get();
1955  }
1956  } else {
1957  $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_no_needs_impr"));
1958  return $tpl->get();
1959  }
1960  } else {
1961  // no profile, just list all resources
1962  $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1963  $res = $skill_res->getResources();
1964  // add $r["level_id"] info
1965  $any = false;
1966  foreach ($res as $level) {
1967  $available = false;
1968  $cl = 0;
1969  foreach ($level as $r) {
1970  if ($r["imparting"]) {
1971  $ref_id = $r["rep_ref_id"];
1973  $title = ilObject::_lookupTitle($obj_id);
1974  $tpl->setCurrentBlock("resource_item");
1975  $tpl->setVariable("TXT_RES", $title);
1976  $tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1977  $tpl->parseCurrentBlock();
1978  $available = true;
1979  $any = true;
1980  $cl = $r["level_id"];
1981  }
1982  }
1983  if ($available) {
1984  $tpl->setCurrentBlock("resources_list_level");
1985  $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
1986  $tpl->setVariable("LEVEL_NAME", ilBasicSkill::lookupLevelTitle($cl));
1987  $tpl->parseCurrentBlock();
1988  $tpl->touchBlock("resources_list");
1989  }
1990  }
1991  if ($any) {
1992  $tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_suggested_resources"));
1993  return $tpl->get();
1994  }
1995  }
1996  return "";
1997  }
static _lookupTitle($a_id)
lookup object title
static lookupLevelTitle(int $a_id)
user()
Definition: user.php:4
static hasSelfEvaluated(int $a_user_id, int $a_skill_id, int $a_tref_id)
foreach($_POST as $key=> $value) $res
static _lookupObjId($a_id)
Manages resources for skills.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTriggerObjectsFilter()

ilPersonalSkillsGUI::getTriggerObjectsFilter ( )
Returns
array

Definition at line 236 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

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

276  {
277  $this->hidden_skills[] = $a_skill_id . ":" . $a_tref_id;
278  }

◆ listAssignedProfile()

ilPersonalSkillsGUI::listAssignedProfile ( )

List profile.

Parameters

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

References $ctrl, $lng, $tpl, determineCurrentProfile(), getActualLevels(), getFilter(), getProfileId(), getSkillHTML(), ilBasicSkill\hasSelfEvaluated(), setTabs(), showProfileSelectorToolbar(), and user().

Referenced by render().

2006  {
2007  $ilCtrl = $this->ctrl;
2008  $lng = $this->lng;
2009 
2010  $main_tpl = $this->tpl;
2011 
2012  $tpl = new ilTemplate("tpl.skill_filter.html", true, true, "Services/Skill");
2013 
2014  $this->setTabs("profile");
2015 
2016  $this->determineCurrentProfile();
2017  $this->showProfileSelectorToolbar();
2018 
2019  $filter_toolbar = new ilToolbarGUI();
2020  $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
2021  $this->getFilter()->addToToolbar($filter_toolbar, true);
2022 
2023  $skills = array();
2024  if ($this->getProfileId() > 0) {
2025  $profile = new ilSkillProfile($this->getProfileId());
2026  $this->profile_levels = $profile->getSkillLevels();
2027 
2028  foreach ($this->profile_levels as $l) {
2029  $skills[] = array(
2030  "base_skill_id" => $l["base_skill_id"],
2031  "tref_id" => $l["tref_id"],
2032  "level_id" => $l["level_id"]
2033  );
2034  }
2035  }
2036 
2037  $this->getActualLevels($skills, $this->user->getId());
2038 
2039  // render
2040  $html = "";
2041  $not_all_self_evaluated = false;
2042  foreach ($skills as $s) {
2043  if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2044  !ilBasicSkill::hasSelfEvaluated($this->user->getId(), $s["base_skill_id"], $s["tref_id"])) {
2045  $not_all_self_evaluated = true;
2046  }
2047 
2048  // todo draft check
2049  $html .= $this->getSkillHTML($s["base_skill_id"], 0, true, $s["tref_id"]);
2050  }
2051 
2052  if ($html != "") {
2053  $filter_toolbar->addFormButton($this->lng->txt("skmg_refresh_view"), "applyFilterAssignedProfiles");
2054 
2055  $tpl->setVariable("FILTER", $filter_toolbar->getHTML());
2056 
2057  $html = $tpl->get() . $html;
2058  }
2059 
2060  if ($not_all_self_evaluated) {
2061  $box = $this->ui_fac->messageBox()->info($lng->txt("skmg_skill_needs_self_eval_box"));
2062  $html = $this->ui_ren->render($box) . $html;
2063  }
2064 
2065  $main_tpl->setContent($html);
2066  }
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.
setTabs($a_activate)
Set tabs.
user()
Definition: user.php:4
static hasSelfEvaluated(int $a_user_id, int $a_skill_id, int $a_tref_id)
getActualLevels($skills, $user_id)
Get actual levels.
determineCurrentProfile()
Determine current profile id.
showProfileSelectorToolbar()
Show profile selector toolbar.
+ 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 1200 of file class.ilPersonalSkillsGUI.php.

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

1201  {
1202  $tpl = $this->tpl;
1203 
1204  //$a_user_id = $ilUser->getId();
1205 
1206  //$profiles = ilSkillProfile::getProfilesOfUser($a_user_id);
1207 
1208  if (count($this->cont_profiles) == 0 && $this->obj_skills == null) {
1209  return;
1210  }
1211 
1212  $this->determineCurrentProfile();
1213  $this->showProfileSelectorToolbar();
1214 
1215  $html = $this->showInfoBox() . $this->getGapAnalysisHTML();
1216  $tpl->setContent($html);
1217  }
getGapAnalysisHTML($a_user_id=0, $a_skills=null)
Get gap analysis html.
determineCurrentProfile()
Determine current profile id.
showProfileSelectorToolbar()
Show profile selector toolbar.
+ Here is the call graph for this function:

◆ listSkills()

ilPersonalSkillsGUI::listSkills ( )

List skills.

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

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

Referenced by render().

449  {
450  $ilCtrl = $this->ctrl;
452  $lng = $this->lng;
453  $main_tpl = $this->tpl;
454  $ilToolbar = $this->toolbar;
455 
456  $tpl = new ilTemplate("tpl.skill_filter.html", true, true, "Services/Skill");
457 
458  $this->setTabs("list_skills");
459 
460  $stree = new ilSkillTree();
461 
462  // skill selection / add new personal skill
463  $ilToolbar->addFormButton(
464  $lng->txt("skmg_add_skill"),
465  "listSkillsForAdd"
466  );
467  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
468 
469  $filter_toolbar = new ilToolbarGUI();
470  $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
471  $this->getFilter()->addToToolbar($filter_toolbar, false);
472 
474  $html = "";
475  foreach ($skills as $s) {
476  $path = $stree->getSkillTreePath($s["skill_node_id"]);
477 
478  // check draft
479  foreach ($path as $p) {
480  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
481  continue(2);
482  }
483  }
484  $html .= $this->getSkillHTML($s["skill_node_id"], 0, true);
485  }
486 
487  // list skills
488 
489  if ($html != "") {
490  $filter_toolbar->addFormButton($this->lng->txt("skmg_refresh_view"), "applyFilter");
491  $tpl->setVariable("FILTER", $filter_toolbar->getHTML());
492  $html = $tpl->get() . $html;
493  } else {
494  $box = $this->ui_fac->messageBox()->info($lng->txt("skmg_no_skills_selected_info"));
495  $html = $this->ui_ren->render($box);
496  }
497 
498  $main_tpl->setContent($html);
499  }
Skill tree.
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.
setTabs($a_activate)
Set tabs.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkillsForAdd()

ilPersonalSkillsGUI::listSkillsForAdd ( )

LIst skills for adding.

Parameters

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

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

1172  {
1173  $ilCtrl = $this->ctrl;
1174  $lng = $this->lng;
1175  $tpl = $this->tpl;
1176  $ilTabs = $this->tabs;
1177 
1178 
1179  $ilTabs->setBackTarget(
1180  $lng->txt("back"),
1181  $ilCtrl->getLinkTarget($this, "")
1182  );
1183 
1184  $exp = new ilPersonalSkillExplorerGUI($this, "listSkillsForAdd", $this, "addSkill");
1185  if ($exp->getHasSelectableNodes()) {
1186  if (!$exp->handleCommand()) {
1187  $tpl->setContent($exp->getHTML());
1188  }
1189  ilUtil::sendInfo($lng->txt("skmg_select_skill"));
1190  } else {
1191  ilUtil::sendInfo($lng->txt("skmg_no_nodes_selectable"));
1192  }
1193  }
Explorer for selecting a personal skill.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ removeMaterial()

ilPersonalSkillsGUI::removeMaterial ( )

Remove material.

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

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

1040  {
1041  $ilCtrl = $this->ctrl;
1042  $ilUser = $this->user;
1043  $lng = $this->lng;
1044 
1045 
1047  $ilUser->getId(),
1048  (int) $_GET["tref_id"],
1049  (int) $_GET["level_id"],
1050  (int) $_GET["wsp_id"]
1051  );
1052  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1053  $ilCtrl->redirect($this, "assignMaterials");
1054  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18
static removeMaterial($a_user_id, $a_tref_id, $a_level_id, $a_wsp_id)
Remove material.
+ Here is the call graph for this function:

◆ removeSkills()

ilPersonalSkillsGUI::removeSkills ( )

Remove skills.

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

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

838  {
839  $ilCtrl = $this->ctrl;
841  $lng = $this->lng;
842 
843  if (is_array($_POST["id"])) {
844  foreach ($_POST["id"] as $n_id) {
845  ilPersonalSkill::removeSkill($ilUser->getId(), $n_id);
846  }
847  }
848 
849  ilUtil::sendSuccess($lng->txt("msg_object_modified"));
850  $ilCtrl->redirect($this, "listSkills");
851  }
static removeSkill($a_user_id, $a_skill_node_id)
Remove personal skill.
$ilUser
Definition: imgupload.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ render()

ilPersonalSkillsGUI::render ( )
protected

Render.

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

References listAssignedProfile(), and listSkills().

432  {
433  switch ($this->list_mode) {
434  case self::LIST_PROFILES:
435  $this->listAssignedProfile();
436  break;
437 
438  default:
439  $this->listSkills();
440  break;
441  }
442  }
+ 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

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

References $ctrl, $ilUser, $lng, $panel, $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().

552  {
553  $ilCtrl = $this->ctrl;
555  $lng = $this->lng;
556 
557  $sub_panels = array();
558 
559  if ($a_user_id == 0) {
560  $user = $ilUser;
561  } else {
562  $user = new ilObjUser($a_user_id);
563  }
564 
565  $tpl = new ilTemplate("tpl.skill_pres.html", true, true, "Services/Skill");
566 
567  $stree = new ilSkillTree();
568 
569  $vtree = new ilVirtualSkillTree();
570  $tref_id = $a_tref_id;
571  $skill_id = $a_top_skill_id;
572  if (ilSkillTreeNode::_lookupType($a_top_skill_id) == "sktr") {
573  $tref_id = $a_top_skill_id;
574  $skill_id = ilSkillTemplateReference::_lookupTemplateId($a_top_skill_id);
575  }
576  $b_skills = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
577 
578  foreach ($b_skills as $bs) {
579  $bs["id"] = $bs["skill_id"];
580  $bs["tref"] = $bs["tref_id"];
581 
582  $path = $stree->getSkillTreePath($bs["id"], $bs["tref"]);
583 
584  $panel_comps = array();
585 
586 
587  // check draft
588  foreach ($path as $p) {
589  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT) {
590  continue(2);
591  }
592  }
593  reset($path);
594 
595  $skill = ilSkillTreeNodeFactory::getInstance($bs["id"]);
596  $level_data = $skill->getLevelData();
597 
598 
599  $title = $sep = "";
600  $description = "";
601  $found = false;
602  foreach ($path as $p) {
603  if ($found) {
604  $title .= $sep . $p["title"];
605  $sep = " > ";
606  $description = $p["description"];
607  }
608  if ($a_top_skill_id == $p["child"]) {
609  $found = true;
610  }
611  }
612 
613  // skill description
614  $panel_comps[] = $this->ui_fac->legacy($this->getBasicSkillDescription((string) $description));
615 
616 
617  // skill level description
618  $panel_comps[] = $this->ui_fac->legacy($this->getSkillLevelDescription($skill));
619 
620 
621  if ($this->getProfileId() > 0) {
622  if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
623  ilBasicSkill::hasSelfEvaluated($user->getId(), $bs["id"], $bs["tref"])) {
624  if ($this->getFilter()->showTargetLevel()) {
625  $panel_comps[] = $this->ui_fac->legacy($this->getProfileTargetItem($this->getProfileId(), $level_data, $bs["tref"]));
626  }
627  }
628  }
629 
630  if ($this->mode == "gap" && !$this->history_view) {
631  $panel_comps[] = $this->ui_fac->legacy($this->getActualGapItem($level_data, $bs["tref"]) . "");
632  $panel_comps[] = $this->ui_fac->legacy($this->getSelfEvalGapItem($level_data, $bs["tref"]) . "");
633  } else {
634  // get date of self evaluation
635  $se_date = ilPersonalSkill::getSelfEvaluationDate($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]);
636  $se_rendered = ($se_date == "")
637  ? true
638  : false;
639 
640  // get all object triggered entries and render them
641  foreach ($skill->getAllHistoricLevelEntriesOfUser($bs["tref"], $user->getId(), ilBasicSkill::EVAL_BY_ALL) as $level_entry) {
642  if (count($this->getTriggerObjectsFilter()) && !in_array($level_entry['trigger_obj_id'], $this->getTriggerObjectsFilter())) {
643  continue;
644  }
645 
646  // render the self evaluation at the correct position within the list of object triggered entries
647  if ($se_date > $level_entry["status_date"] && !$se_rendered) {
648  $se_rendered = true;
649  }
650  if ($this->getFilter()->isInRange($level_data, $level_entry)) {
651  $panel_comps[] = $this->ui_fac->legacy($this->getEvalItem($level_data, $level_entry));
652  }
653  }
654  }
655 
656  // materials (new)
657  if ($this->mode != "gap") {
658  if ($this->getFilter()->showMaterialsRessources() && $this->use_materials) {
659  $mat = $this->getMaterials($level_data, $bs["tref"], $user->getId());
660  }
661  if ($mat != "") {
662  $panel_comps[] = $this->ui_fac->legacy($mat);
663  }
664  }
665 
666  // suggested resources
667  if ($this->getFilter()->showMaterialsRessources()) {
668  $sugg = $this->getSuggestedResources($this->getProfileId(), $level_data, $bs["id"], $bs["tref"]);
669  }
670  if ($sugg != "") {
671  $panel_comps[] = $this->ui_fac->legacy($sugg);
672  }
673 
674  $sub = $this->ui_fac->panel()->sub((string) $title, $panel_comps);
675  if ($a_edit) {
676  $actions = array();
677  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
678  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
679  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
680  if ($this->use_materials) {
681  $actions[] = $this->ui_fac->button()->shy(
682  $lng->txt('skmg_assign_materials'),
683  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")
684  );
685  }
686  $actions[] = $this->ui_fac->button()->shy(
687  $lng->txt('skmg_self_evaluation'),
688  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation")
689  );
690  $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
691  }
692 
693  $sub_panels[] = $sub;
694 
695  $tpl->parseCurrentBlock();
696  }
697 
698  $des = $this->getSkillCategoryDescription($skill_id, $tref_id);
699 
700  //put the description of the skill category to the very top of the sub panels
701  $sub_panels = $this->ui_fac->legacy($des . $this->ui_ren->render($sub_panels));
702 
703  $panel = $this->ui_fac->panel()->standard(
704  (string) ilSkillTreeNode::_lookupTitle($skill_id, $tref_id),
705  $sub_panels
706  );
707 
708  if ($a_edit && $this->getProfileId() == 0) {
709  $actions = array();
710 
711  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
712  $actions[] = $this->ui_fac->button()->shy(
713  $lng->txt('skmg_remove_skill'),
714  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove")
715  );
716 
717  $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->txt("actions")));
718  }
719 
720  return $this->ui_ren->render($panel);
721  }
getSkillCategoryDescription(int $skill_id, int $tref_id)
Get description for skill category.
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:138
Skill tree.
getMaterials($a_levels, $a_tref_id=0, $a_user_id=0)
Get materials.
getEvalItem($a_levels, $a_level_entry)
Get eval item.
static hasSelfEvaluated(int $a_user_id, int $a_skill_id, int $a_tref_id)
static _lookupType($a_obj_id)
Lookup Type.
getActualGapItem($a_levels, $a_tref_id=0)
getSuggestedResources($a_profile_id, $a_levels, $a_base_skill, $a_tref_id)
Render suggested resources.
getSelfEvalGapItem($a_levels, $a_tref_id=0)
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
getSkillLevelDescription($skill)
Get level description.
getProfileTargetItem($a_profile_id, $a_levels, $a_tref_id=0)
Get profile target item.
getBasicSkillDescription(string $description)
Get description for basic skill.
$ilUser
Definition: imgupload.php:18
static getSelfEvaluationDate($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
+ 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 1142 of file class.ilPersonalSkillsGUI.php.

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

1143  {
1144  $ilCtrl = $this->ctrl;
1145  $ilUser = $this->user;
1146  $lng = $this->lng;
1147 
1149  $ilUser->getId(),
1150  (int) $_GET["skill_id"],
1151  (int) $_GET["tref_id"],
1152  (int) $_GET["basic_skill_id"],
1153  (int) $_POST["se"]
1154  );
1155  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1156 
1157  /* $ilCtrl->saveParameter($this, "skill_id");
1158  $ilCtrl->saveParameter($this, "level_id");
1159  $ilCtrl->saveParameter($this, "tref_id");
1160  $ilCtrl->saveParameter($this, "basic_skill_id");*/
1161 
1162  $ilCtrl->redirect($this, "render");
1163  }
$_GET["client_id"]
static saveSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level)
Save self evaluation.
$ilUser
Definition: imgupload.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ selectMaterial()

ilPersonalSkillsGUI::selectMaterial ( )

Select material.

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

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

1007  {
1008  $ilCtrl = $this->ctrl;
1009  $ilUser = $this->user;
1010  $lng = $this->lng;
1011 
1012 
1013  if (is_array($_POST["wsp_id"])) {
1014  foreach ($_POST["wsp_id"] as $w) {
1016  $ilUser->getId(),
1017  (int) $_GET["skill_id"],
1018  (int) $_GET["tref_id"],
1019  (int) $_GET["basic_skill_id"],
1020  (int) $_GET["level_id"],
1021  (int) $w
1022  );
1023  }
1024  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1025  }
1026 
1027  $ilCtrl->saveParameter($this, "skill_id");
1028  $ilCtrl->saveParameter($this, "level_id");
1029  $ilCtrl->saveParameter($this, "tref_id");
1030  $ilCtrl->saveParameter($this, "basic_skill_id");
1031 
1032  $ilCtrl->redirect($this, "assignMaterials");
1033  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18
$_POST["username"]
static assignMaterial($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level, $a_wsp_id)
Assign material to skill level.
+ Here is the call graph for this function:

◆ selectProfile()

ilPersonalSkillsGUI::selectProfile ( )

Select profile.

Parameters

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

References $_POST, and $ctrl.

1555  {
1556  $ilCtrl = $this->ctrl;
1557 
1558  $ilCtrl->setParameter($this, "profile_id", $_POST["profile_id"]);
1559  if ($this->mode == "gap") {
1560  $ilCtrl->redirect($this, "listProfilesForGap");
1561  } else {
1562  $ilCtrl->redirect($this, "listAssignedProfile");
1563  }
1564  }
$_POST["username"]

◆ selfEvaluation()

ilPersonalSkillsGUI::selfEvaluation ( )

Assign materials to skill levels.

Parameters

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

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

1068  {
1069  $ilCtrl = $this->ctrl;
1070  $lng = $this->lng;
1071  $tpl = $this->tpl;
1072  $ilToolbar = $this->toolbar;
1073  $ilTabs = $this->tabs;
1074 
1075 
1076  $ilTabs->setBackTarget(
1077  $lng->txt("back"),
1078  $ilCtrl->getLinkTarget($this, "render")
1079  );
1080 
1081  $ilCtrl->saveParameter($this, "skill_id");
1082  $ilCtrl->saveParameter($this, "basic_skill_id");
1083  $ilCtrl->saveParameter($this, "tref_id");
1084 
1085  $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
1086  $tpl->setTitleIcon(ilUtil::getImagePath("icon_" .
1087  ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) .
1088  ".svg"));
1089 
1090  // basic skill selection
1091  $vtree = new ilVirtualSkillTree();
1092  $tref_id = 0;
1093  $skill_id = (int) $_GET["skill_id"];
1094  if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr") {
1095  $tref_id = $_GET["skill_id"];
1096  $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
1097  }
1098  $bs = $vtree->getSubTreeForCSkillId($skill_id . ":" . $tref_id, true);
1099 
1100 
1101  $options = array();
1102  foreach ($bs as $b) {
1103  $options[$b["skill_id"]] = ilSkillTreeNode::_lookupTitle($b["skill_id"]);
1104  }
1105 
1106  $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
1107  ? (int) $_POST["basic_skill_id"]
1108  : (((int) $_GET["basic_skill_id"] > 0)
1109  ? (int) $_GET["basic_skill_id"]
1110  : key($options));
1111 
1112  $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
1113 
1114  if (count($options) > 1) {
1115  $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "basic_skill_id");
1116  $si->setOptions($options);
1117  $si->setValue($cur_basic_skill_id);
1118  $ilToolbar->addInputItem($si, true);
1119  $ilToolbar->addFormButton(
1120  $lng->txt("select"),
1121  "selfEvaluation"
1122  );
1123 
1124  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1125  }
1126 
1127  // table
1128  $tab = new ilSelfEvaluationSimpleTableGUI(
1129  $this,
1130  "selfEvaluation",
1131  (int) $_GET["skill_id"],
1132  (int) $_GET["tref_id"],
1133  $cur_basic_skill_id
1134  );
1135 
1136  $tpl->setContent($tab->getHTML());
1137  }
$_GET["client_id"]
static _lookupType($a_obj_id)
Lookup Type.
Self evaluation, second simplier implementation.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
$_POST["username"]
+ 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 1287 of file class.ilPersonalSkillsGUI.php.

1288  {
1289  $this->gap_mode = "max_per_object";
1290  $this->gap_mode_obj_id = $a_obj_id;
1291  $this->gap_cat_title = $a_cat_title;
1292  $this->mode = "gap";
1293  }

◆ setGapAnalysisActualStatusModePerType()

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

Set gap analysis actual status mode "per type".

Parameters
string$a_typetype

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

1275  {
1276  $this->gap_mode = "max_per_type";
1277  $this->gap_mode_type = $a_type;
1278  $this->gap_cat_title = $a_cat_title;
1279  $this->mode = "gap";
1280  }

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

199  {
200  $this->gap_self_eval_levels = $a_val;
201  }

◆ setHistoryView()

ilPersonalSkillsGUI::setHistoryView (   $a_val)

Set history view.

Parameters
bool$a_valhistory view

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

219  {
220  $this->history_view = $a_val;
221  }

◆ setIntroText()

ilPersonalSkillsGUI::setIntroText (   $a_val)

Set intro text.

Parameters
string$a_valintro text html

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

255  {
256  $this->intro_text = $a_val;
257  }

◆ setObjectSkillProfiles()

ilPersonalSkillsGUI::setObjectSkillProfiles ( ilContainerGlobalProfiles  $a_g_profiles,
ilContainerLocalProfiles  $a_l_profils 
)

Set object skill profiles.

Parameters
ilContainerGlobalProfiles$a_g_profiles
ilContainerLocalProfiles$a_l_profils

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

References ilContainerLocalProfiles\getProfiles(), and ilContainerGlobalProfiles\getProfiles().

354  {
355  $this->cont_profiles = array_merge($a_g_profiles->getProfiles(), $a_l_profils->getProfiles());
356  }
+ Here is the call graph for this function:

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

340  {
341  $this->obj_id = $a_obj_id;
342  $this->obj_skills = $a_skills;
343  }

◆ setOfflineMode()

ilPersonalSkillsGUI::setOfflineMode (   $a_file_path)

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

424  {
425  $this->offline_mode = $a_file_path;
426  }

◆ setProfileId()

ilPersonalSkillsGUI::setProfileId (   $a_val)

Set profile id.

Parameters
$a_val

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

Referenced by determineCurrentProfile().

179  {
180  $this->profile_id = $a_val;
181  }
+ Here is the caller graph for this function:

◆ setTabs()

ilPersonalSkillsGUI::setTabs (   $a_activate)

Set tabs.

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

References $ctrl, $lng, and $tabs.

Referenced by listAssignedProfile(), and listSkills().

394  {
395  $ilCtrl = $this->ctrl;
396  $lng = $this->lng;
397  $ilTabs = $this->tabs;
398 
399  // list skills
400  $ilCtrl->setParameter($this, "list_mode", self::LIST_SELECTED);
401  $ilTabs->addTab(
402  "list_skills",
403  $lng->txt("skmg_selected_skills"),
404  $ilCtrl->getLinkTarget($this, "render")
405  );
406 
407  if (count($this->user_profiles) > 0) {
408  $ilCtrl->setParameter($this, "list_mode", self::LIST_PROFILES);
409  $ilTabs->addTab(
410  "profile",
411  $lng->txt("skmg_assigned_profiles"),
412  $ilCtrl->getLinkTarget($this, "render")
413  );
414  }
415 
416  $ilCtrl->clearParameterByClass(get_class($this), "list_mode");
417 
418  // assign materials
419 
420  $ilTabs->activateTab($a_activate);
421  }
+ Here is the caller graph for this function:

◆ setTriggerObjectsFilter()

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

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

References $trigger_objects_filter.

245  {
246  $this->trigger_objects_filter = $trigger_objects_filter;
247  }

◆ showInfoBox()

ilPersonalSkillsGUI::showInfoBox ( )

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

Referenced by listProfilesForGap().

1219  : string
1220  {
1221  $link = $this->ui_fac->link()->standard(
1222  $this->lng->txt("skmg_open_all_assigned_profiles"),
1223  $this->ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilAchievementsGUI", "ilPersonalSkillsGUI"])
1224  );
1225  $box = $this->ui_fac->messageBox()->info($this->lng->txt("skmg_cont_profiles_info"))->withLinks([$link]);
1226 
1227  return $this->ui_ren->render($box);
1228  }
+ Here is the caller graph for this function:

◆ showProfileSelectorToolbar()

ilPersonalSkillsGUI::showProfileSelectorToolbar ( )

Show profile selector toolbar.

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

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

Referenced by listAssignedProfile(), and listProfilesForGap().

1236  {
1237  $ilToolbar = $this->toolbar;
1238  $lng = $this->lng;
1239  $ilCtrl = $this->ctrl;
1240 
1241  $options = array();
1242  $cont_options = array();
1243  if (is_array($this->obj_skills) && $this->obj_id > 0) {
1244  $options[0] = $lng->txt("obj_" . ilObject::_lookupType($this->obj_id)) . ": " . ilObject::_lookupTitle($this->obj_id);
1245  foreach ($this->cont_profiles as $p) {
1246  $cont_options[$p["profile_id"]] = $p["title"];
1247  }
1248  asort($cont_options);
1249  $options = $options + $cont_options;
1250  }
1251  else {
1252  foreach ($this->user_profiles as $p) {
1253  $options[$p["id"]] = $p["title"];
1254  }
1255  }
1256 
1257  $si = new ilSelectInputGUI($lng->txt("skmg_profile"), "profile_id");
1258  $si->setOptions($options);
1259  $si->setValue($this->getProfileId());
1260  $ilToolbar->addInputItem($si, true);
1261  $ilToolbar->addFormButton(
1262  $lng->txt("select"),
1263  "selectProfile"
1264  );
1265  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1266  }
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
+ 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 75 of file class.ilPersonalSkillsGUI.php.

Referenced by getEvalItem().

◆ $actual_levels

ilPersonalSkillsGUI::$actual_levels = array()
protected

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

◆ $ctrl

◆ $filter

ilPersonalSkillsGUI::$filter
protected

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

Referenced by getFilter().

◆ $gap_self_eval_levels

ilPersonalSkillsGUI::$gap_self_eval_levels = array()
protected

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

Referenced by getGapAnalysisSelfEvalLevels().

◆ $help

ilPersonalSkillsGUI::$help
protected

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

Referenced by __construct().

◆ $hidden_skills

ilPersonalSkillsGUI::$hidden_skills = array()
protected

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

◆ $history_view

ilPersonalSkillsGUI::$history_view = false
protected

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

Referenced by getHistoryView().

◆ $intro_text

ilPersonalSkillsGUI::$intro_text = ""
protected

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

Referenced by getIntroText().

◆ $list_mode

ilPersonalSkillsGUI::$list_mode = self::LIST_SELECTED
protected

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

◆ $lng

◆ $mode

ilPersonalSkillsGUI::$mode = ""
protected

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

◆ $obj_definition

ilPersonalSkillsGUI::$obj_definition
protected

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

◆ $obj_id

ilPersonalSkillsGUI::$obj_id = 0
protected

◆ $obj_skills

ilPersonalSkillsGUI::$obj_skills = array()
protected

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

Referenced by getGapAnalysisHTML(), and getObjectSkills().

◆ $offline_mode

ilPersonalSkillsGUI::$offline_mode
protected

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

◆ $setting

ilPersonalSkillsGUI::$setting
protected

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

Referenced by __construct(), and assignMaterial().

◆ $skill_tree

ilPersonalSkillsGUI::$skill_tree
protected

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

◆ $skill_tt_cnt

ilPersonalSkillsGUI::$skill_tt_cnt = 1
static

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

◆ $tabs

ilPersonalSkillsGUI::$tabs
protected

◆ $toolbar

ilPersonalSkillsGUI::$toolbar
protected

◆ $tpl

◆ $tree_service

ilPersonalSkillsGUI::$tree_service
protected

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

◆ $trigger_objects_filter

ilPersonalSkillsGUI::$trigger_objects_filter = array()
protected

◆ $ui

ilPersonalSkillsGUI::$ui
protected

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

Referenced by assignMaterial().

◆ $ui_fac

ilPersonalSkillsGUI::$ui_fac
protected

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

◆ $ui_ren

ilPersonalSkillsGUI::$ui_ren
protected

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

◆ $user

◆ LIST_PROFILES

const ilPersonalSkillsGUI::LIST_PROFILES = "profiles"

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

◆ LIST_SELECTED

const ilPersonalSkillsGUI::LIST_SELECTED = ""

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


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