ILIAS  release_4-4 Revision
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 ($a_val)
 Set self evaluation levels for gap analysis. More...
 
 getGapAnalysisSelfEvalLevels ()
 Get self evaluation levels for gap analysis. 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...
 
 getTooltipsJs ()
 
 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...
 
 switchAssignMaterials ()
 Switch self evaluation. More...
 
 assignMaterials ()
 Assign materials to skill levels. More...
 
 assignMaterial ()
 Assign materials to skill level. More...
 
 selectMaterial ()
 Select material. More...
 
 removeMaterial ()
 Remove material. More...
 
 switchSelfEvaluation ()
 Switch self evaluation. More...
 
 selfEvaluation ()
 Assign materials to skill levels. More...
 
 saveSelfEvaluation ()
 Save self evaluation. More...
 
 listSkillsForAdd ()
 LIst skills for adding. More...
 
 listProfiles ()
 List profiles. 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...
 
 renderSelfEvaluationRow ($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
 Render self evaluation row. More...
 
 renderMaterialsRow ($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
 Render materials row. More...
 
 renderProfileTargetRow ($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
 Render profile target row. More...
 
 renderActualLevelsRow ($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
 Render actual levels row (gap analysis) More...
 
 renderGapSelfEvalRow ($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
 Render actual levels row (gap analysis) More...
 
 renderObjectEvalRow ($a_tpl, $a_levels, $a_level_entry)
 Render object evaluation row (has_level table) More...
 
 renderSuggestedResources ($a_tpl, $a_levels, $a_base_skill, $a_tref_id)
 Render suggested resources. More...
 

Static Public Attributes

static $skill_tt_cnt = 1
 

Protected Attributes

 $offline_mode
 
 $skill_tree
 
 $actual_levels = array()
 
 $gap_self_eval_levels = array()
 
 $mode = ""
 

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$

ilPersonalSkillsGUI:

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

Constructor & Destructor Documentation

◆ __construct()

ilPersonalSkillsGUI::__construct ( )

Contructor.

public

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

References $ilCtrl, $ilSetting, and $lng.

33  {
34  global $ilCtrl, $lng, $ilHelp, $ilSetting;
35 
36  $lng->loadLanguageModule('skmg');
37 
38  $ilHelp->setScreenIdComponent("skill");
39 
40  $ilCtrl->saveParameter($this, "skill_id");
41  $ilCtrl->saveParameter($this, "tref_id");
42  $ilCtrl->saveParameter($this, "profile_id");
43 
44  include_once("./Services/Skill/classes/class.ilSkillTree.php");
45  $this->skill_tree = new ilSkillTree();
46 
47  $this->use_materials = !$ilSetting->get("disable_personal_workspace");
48  }
Skill tree.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40

Member Function Documentation

◆ addSkill()

ilPersonalSkillsGUI::addSkill ( )

Add personal skill.

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

References $_GET, $ilCtrl, $ilUser, $lng, ilPersonalSkill\addPersonalSkill(), and ilUtil\sendSuccess().

469  {
470  global $ilUser, $ilCtrl, $lng;
471 
472  ilPersonalSkill::addPersonalSkill($ilUser->getId(), (int) $_GET["obj_id"]);
473 
474  ilUtil::sendSuccess($lng->txt("msg_object_modified"));
475  $ilCtrl->redirect($this, "listSkills");
476  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
addPersonalSkill($a_user_id, $a_skill_node_id)
Add personal skill.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ assignMaterial()

ilPersonalSkillsGUI::assignMaterial ( )

Assign materials to skill level.

Parameters

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

References $_GET, $_POST, $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, ilWorkspaceExplorer\SEL_TYPE_CHECK, and ilUtil\sendInfo().

634  {
635  global $tpl, $ilUser, $ilCtrl, $ilTabs, $lng, $ilSetting;
636 
637  if(!$ilSetting->get("disable_personal_workspace"))
638  {
639  ilUtil::sendInfo($lng->txt("skmg_ass_materials_from_workspace")." ยป <a href='ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace'>".$lng->txt("personal_workspace")."</a>");
640  }
641 
642  $ilCtrl->saveParameter($this, "skill_id");
643  $ilCtrl->saveParameter($this, "level_id");
644  $ilCtrl->saveParameter($this, "tref_id");
645  $ilCtrl->saveParameter($this, "basic_skill_id");
646 
647  $ilTabs->setBackTarget($lng->txt("back"),
648  $ilCtrl->getLinkTarget($this, "assignMaterials"));
649 
650  // get ws tree
651  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
652  $tree = new ilWorkspaceTree($ilUser->getId());
653 
654  // get access handler
655  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
656  $acc_handler = new ilWorkspaceAccessHandler($tree);
657 
658  // get es explorer
659  include_once("./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
661  'skill_wspexpand', $tree, $acc_handler);
662  $exp->setTargetGet('wsp_id');
663  $exp->setFiltered(false);
664  $exp->removeAllFormItemTypes();
665  $exp->addFormItemForType("file");
666  $exp->addFormItemForType("tstv");
667  $exp->addFormItemForType("excv");
668 
669  if($_GET['skill_wspexpand'] == '')
670  {
671  // not really used as session is already set [see above]
672  $expanded = $tree->readRootId();
673  }
674  else
675  {
676  $expanded = $_GET['skill_wspexpand'];
677  }
678  $exp->setCheckedItems(array((int)$_POST['wsp_id']));
679  $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'assignMaterial'));
680  $exp->setPostVar('wsp_id[]');
681  $exp->setExpand($expanded);
682  $exp->setOutput(0);
683 
684  // fill template
685  $mtpl = new ilTemplate("tpl.materials_selection.html", true, true, "Services/Skill");
686  $mtpl->setVariable("EXP", $exp->getOutput());
687 
688  // toolbars
689  $tb = new ilToolbarGUI();
690  $tb->addFormButton($lng->txt("select"),
691  "selectMaterial");
692  $tb->setFormAction($ilCtrl->getFormAction($this));
693  $tb->setOpenFormTag(true);
694  $tb->setCloseFormTag(false);
695  $mtpl->setVariable("TOOLBAR1", $tb->getHTML());
696  $tb->setOpenFormTag(false);
697  $tb->setCloseFormTag(true);
698  $mtpl->setVariable("TOOLBAR2", $tb->getHTML());
699 
700  $tpl->setContent($mtpl->get());
701  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
Access handler for personal workspace.
Tree handler for personal workspace.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ assignMaterials()

ilPersonalSkillsGUI::assignMaterials ( )

Assign materials to skill levels.

Parameters

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

References $_GET, $ilCtrl, $lng, $options, $si, $tab, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), and ilUtil\getImagePath().

563  {
564  global $ilTabs, $lng, $ilCtrl, $tpl, $ilToolbar;
565 
566  $ilTabs->setBackTarget($lng->txt("back"),
567  $ilCtrl->getLinkTarget($this, "listSkills"));
568 
569  $ilCtrl->saveParameter($this, "skill_id");
570  $ilCtrl->saveParameter($this, "basic_skill_id");
571  $ilCtrl->saveParameter($this, "tref_id");
572 
573  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
574  $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
575  $tpl->setTitleIcon(ilUtil::getImagePath("icon_".
576  ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]).
577  "_b.png"));
578 
579  // basic skill selection
580  include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
581  $vtree = new ilVirtualSkillTree();
582  $tref_id = 0;
583  $skill_id = (int) $_GET["skill_id"];
584  if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr")
585  {
586  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
587  $tref_id = $_GET["skill_id"];
588  $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
589  }
590  $bs = $vtree->getSubTreeForCSkillId($skill_id.":".$tref_id, true);
591 
592  $options = array();
593  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
594  foreach ($bs as $b)
595  {
596  $options[$b["skill_id"].":".$b["tref_id"]] = ilBasicSkill::_lookupTitle($b["skill_id"], $b["tref_id"]);
597  }
598 
599 /* $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
600  ? (int) $_POST["basic_skill_id"]
601  : (((int) $_GET["basic_skill_id"] > 0)
602  ? (int) $_GET["basic_skill_id"]
603  : key($options));*/
604 
605 // $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);
606 
607  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
608  $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "cskill_id");
609  $si->setOptions($options);
610  $si->setValue($_GET["basic_skill_id"].":".((int) $_GET["tref_id"]));
611  $ilToolbar->addInputItem($si, true);
612  $ilToolbar->addFormButton($lng->txt("select"),
613  "switchAssignMaterials");
614 
615  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
616 
617  // table
618  include_once("./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
619  $tab = new ilSkillAssignMaterialsTableGUI($this, "assignMaterials",
620  (int) $_GET["skill_id"], (int) $_GET["tref_id"], (int) $_GET["basic_skill_id"]);
621 
622  $tpl->setContent($tab->getHTML());
623 
624  }
This class represents a selection list property in a property form.
$_GET["client_id"]
Assign materials to skill levels table.
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ confirmSkillRemove()

ilPersonalSkillsGUI::confirmSkillRemove ( )

Confirm skill remove.

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

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

484  {
485  global $ilCtrl, $tpl, $lng;
486 
487  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
488  if ($_GET["skill_id"] > 0)
489  {
490  $_POST["id"][] = $_GET["skill_id"];
491  }
492  if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
493  {
494  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
495  $ilCtrl->redirect($this, "listSkills");
496  }
497  else
498  {
499  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
500  $cgui = new ilConfirmationGUI();
501  $cgui->setFormAction($ilCtrl->getFormAction($this));
502  $cgui->setHeaderText($lng->txt("skmg_really_remove_skills"));
503  $cgui->setCancel($lng->txt("cancel"), "listSkills");
504  $cgui->setConfirm($lng->txt("delete"), "removeSkills");
505 
506  foreach ($_POST["id"] as $i)
507  {
508  $cgui->addItem("id[]", $i, ilSkillTreeNode::_lookupTitle($i));
509  }
510 
511  $tpl->setContent($cgui->getHTML());
512  }
513  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $lng
Definition: privfeed.php:40
Confirmation screen class.
+ Here is the call graph for this function:

◆ executeCommand()

ilPersonalSkillsGUI::executeCommand ( )

Execute command.

public

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

References $cmd, $ilCtrl, $ilUser, $lng, $tpl, ilUtil\getImagePath(), and ilSkillProfile\getProfilesOfUser().

97  {
98  global $ilCtrl, $tpl, $lng, $ilUser;
99 
100  $next_class = $ilCtrl->getNextClass($this);
101 
102  $profiles = ilSkillProfile::getProfilesOfUser($ilUser->getId());
103 
104  // determin standard command
105  $std_cmd = "listSkills";
106  if (count($profiles) > 0)
107  {
108 // $std_cmd = "listProfiles";
109  }
110 
111  $cmd = $ilCtrl->getCmd($std_cmd);
112 
113  $tpl->setTitle($lng->txt("skills"));
114  $tpl->setTitleIcon(ilUtil::getImagePath("icon_skmg_b.png"));
115 
116  switch($next_class)
117  {
118  default:
119  $this->$cmd();
120  break;
121  }
122  return true;
123  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
static getProfilesOfUser($a_user_id)
Get profiles of a user.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getGapAnalysisHTML()

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

Get gap analysis html.

Parameters

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

References $ilUser, $lng, $path, ilSkillTreeNode\_lookupTitle(), ilObject\_lookupTitle(), getGapAnalysisSelfEvalLevels(), getProfileId(), getSkillHTML(), and ilSkillTreeNode\STATUS_DRAFT.

Referenced by listProfiles().

968  {
969  global $ilUser, $lng;
970 
971 // $this->setTabs("list_skills");
972 
973  if ($a_user_id == 0)
974  {
975  $user_id = $ilUser->getId();
976  }
977  else
978  {
979  $user_id = $a_user_id;
980  }
981 
982  $skills = array();
983  if ($this->getProfileId() > 0)
984  {
985  $profile = new ilSkillProfile($this->getProfileId());
986  $this->profile_levels = $profile->getSkillLevels();
987 
988  foreach ($this->profile_levels as $l)
989  {
990  $skills[] = array(
991  "base_skill_id" => $l["base_skill_id"],
992  "tref_id" => $l["tref_id"],
993  "level_id" => $l["level_id"]
994  );
995  }
996  }
997  else if (is_array($a_skills))
998  {
999  $skills = $a_skills;
1000  }
1001 
1002  // get actual levels for gap analysis
1003  $this->actual_levels = array();
1004  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
1005  foreach ($skills as $sk)
1006  {
1007  $bs = new ilBasicSkill($sk["base_skill_id"]);
1008  if ($this->gap_mode == "max_per_type")
1009  {
1010  $max = $bs->getMaxLevelPerType($sk["tref_id"], $this->gap_mode_type, $user_id);
1011  $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1012  }
1013  else if ($this->gap_mode == "max_per_object")
1014  {
1015  $max = $bs->getMaxLevelPerObject($sk["tref_id"], $this->gap_mode_obj_id, $user_id);
1016  $this->actual_levels[$sk["base_skill_id"]][$sk["tref_id"]] = $max;
1017  }
1018  }
1019 
1020  $incl_self_eval = false;
1021  if (count($this->getGapAnalysisSelfEvalLevels() > 0))
1022  {
1023  $incl_self_eval = true;
1024  $self_vals = $this->getGapAnalysisSelfEvalLevels();
1025  }
1026 
1027  // output spider stuff
1028  if (count($skills) >= 3)
1029  {
1030  $max_cnt = 0;
1031  $leg_labels = array();
1032 //var_dump($this->profile_levels);
1033  //foreach ($this->profile_levels as $k => $l)
1034 
1035  // write target, actual and self counter to skill array
1036  foreach ($skills as $k => $l)
1037  {
1038  //$bs = new ilBasicSkill($l["base_skill_id"]);
1039  $bs = new ilBasicSkill($l["base_skill_id"]);
1040  $leg_labels[] = ilBasicSkill::_lookupTitle($l["base_skill_id"] , $l["tref_id"]);
1041  $levels = $bs->getLevelData();
1042  $cnt = 0;
1043  foreach ($levels as $lv)
1044  {
1045  $cnt++;
1046  if ($l["level_id"] == $lv["id"])
1047  {
1048  $skills[$k]["target_cnt"] = $cnt;
1049  }
1050  if ($this->actual_levels[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"])
1051  {
1052  $skills[$k]["actual_cnt"] = $cnt;
1053  }
1054  if ($incl_self_eval)
1055  {
1056  if ($self_vals[$l["base_skill_id"]][$l["tref_id"]] == $lv["id"])
1057  {
1058  $skills[$k]["self_cnt"] = $cnt;
1059  }
1060  }
1061  $max_cnt = max($max_cnt, $cnt);
1062  }
1063  }
1064 
1065 // $leg_labels = array("AAAAA", "BBBBB", "CCCCC");
1066 
1067 //var_dump($this->profile_levels);
1068 //var_dump($this->actual_levels);
1069 
1070  include_once("./Services/Chart/classes/class.ilChart.php");
1071  $chart = new ilChart("gap_chart", 800, 300);
1072  $chart->setYAxisMax($max_cnt);
1073  $chart->setLegLabels($leg_labels);
1074 
1075  // target level
1076  $cd = new ilChartData("spider");
1077  $cd->setLabel($lng->txt("skmg_target_level"));
1078  $cd->setFill("true", "#A0A0A0");
1079 
1080  // other users
1081  $cd2 = new ilChartData("spider");
1082  if ($this->gap_cat_title != "")
1083  {
1084  $cd2->setLabel($this->gap_cat_title);
1085  }
1086  else if ($this->gap_mode == "max_per_type")
1087  {
1088  $cd2->setLabel($lng->txt("objs_".$this->gap_mode_type));
1089  }
1090  else if ($this->gap_mode == "max_per_object")
1091  {
1092  $cd2->setLabel(ilObject::_lookupTitle($this->gap_mode_obj_id));
1093  }
1094  $cd2->setFill("true", "#8080FF");
1095 
1096  // self evaluation
1097  if ($incl_self_eval)
1098  {
1099  $cd3 = new ilChartData("spider");
1100  $cd3->setLabel($lng->txt("skmg_self_evaluation"));
1101  $cd3->setFill("true", "#FF8080");
1102  }
1103 
1104  // fill in data
1105  $cnt = 0;
1106  foreach ($skills as $pl)
1107  {
1108  $cd->addPoint($cnt, (int) $pl["target_cnt"]);
1109  $cd2->addPoint($cnt, (int) $pl["actual_cnt"]);
1110  if ($incl_self_eval)
1111  {
1112  $cd3->addPoint($cnt, (int) $pl["self_cnt"]);
1113  }
1114  $cnt++;
1115  }
1116 
1117  // add data to chart
1118  if ($this->getProfileId() > 0)
1119  {
1120  $chart->addData($cd);
1121  }
1122  $chart->addData($cd2);
1123  if ($incl_self_eval && count($this->getGapAnalysisSelfEvalLevels()) > 0)
1124  {
1125  $chart->addData($cd3);
1126  }
1127 
1128  $lg = new ilChartLegend();
1129  $chart->setLegend($lg);
1130 
1131  $chart_html = $chart->getHTML();
1132  }
1133 
1134  $stree = new ilSkillTree();
1135  $html = "";
1136  foreach ($skills as $s)
1137  {
1138  $path = $stree->getSkillTreePath($s["base_skill_id"]);
1139 
1140  // check draft
1141  foreach ($path as $p)
1142  {
1143  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT)
1144  {
1145  continue(2);
1146  }
1147  }
1148  $html.= $this->getSkillHTML($s["base_skill_id"], $user_id, false, $s["tref_id"]);
1149  }
1150 
1151  // list skills
1152 // include_once("./Services/Skill/classes/class.ilPersonalSkillTableGUI.php");
1153 // $sktab = new ilPersonalSkillTableGUI($this, "listSkills");
1154 
1155  return $chart_html.$html;
1156  }
Chart legend.
Skill tree.
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.
Chart generator.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22
Chart data series.
Basic Skill.
+ 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 85 of file class.ilPersonalSkillsGUI.php.

References $gap_self_eval_levels.

Referenced by getGapAnalysisHTML(), and renderGapSelfEvalRow().

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

References $file, ilObject\_lookupTitle(), and ilObject\_lookupType().

Referenced by renderMaterialsRow().

408  {
409  if(!$this->ws_tree)
410  {
411  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
412  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
413  $this->ws_tree = new ilWorkspaceTree($a_user_id);
414  $this->ws_access = new ilWorkspaceAccessHandler($caption);
415  }
416 
417  $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
418  $caption = ilObject::_lookupTitle($obj_id);
419 
420  if(!$this->offline_mode)
421  {
422  $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
423  }
424  else
425  {
426  $url = $this->offline_mode."file_".$obj_id."/";
427 
428  // all possible material types for now
429  switch(ilObject::_lookupType($obj_id))
430  {
431  case "tstv":
432  include_once "Modules/Test/classes/class.ilObjTestVerification.php";
433  $obj = new ilObjTestVerification($obj_id, false);
434  $url .= $obj->getOfflineFilename();
435  break;
436 
437  case "excv":
438  include_once "Modules/Exercise/classes/class.ilObjExerciseVerification.php";
439  $obj = new ilObjExerciseVerification($obj_id, false);
440  $url .= $obj->getOfflineFilename();
441  break;
442 
443  case "crsv":
444  include_once "Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
445  $obj = new ilObjCourseVerification($obj_id, false);
446  $url .= $obj->getOfflineFilename();
447  break;
448 
449  case "scov":
450  include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
451  $obj = new ilObjSCORMVerification($obj_id, false);
452  $url .= $obj->getOfflineFilename();
453  break;
454 
455  case "file":
456  $file = new ilObjFile($obj_id, false);
457  $url .= $file->getFilename();
458  break;
459  }
460  }
461 
462  return array($caption, $url);
463  }
print $file
Access handler for personal workspace.
static _lookupTitle($a_id)
lookup object title
Tree handler for personal workspace.
Class ilObjFile.
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:

◆ getProfileId()

ilPersonalSkillsGUI::getProfileId ( )

Get profile id.

Returns

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

Referenced by getGapAnalysisHTML(), getSkillHTML(), renderActualLevelsRow(), renderProfileTargetRow(), and renderSuggestedResources().

66  {
67  return $this->profile_id;
68  }
+ 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 200 of file class.ilPersonalSkillsGUI.php.

References $ilCtrl, $ilSetting, $ilUser, $lng, $path, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), ilTooltipGUI\addTooltip(), ilAdvancedSelectionListGUI\DOWN_ARROW_DARK, ilSkillTreeNodeFactory\getInstance(), getProfileId(), ilPersonalSkill\getSelfEvaluationDate(), renderActualLevelsRow(), renderGapSelfEvalRow(), renderMaterialsRow(), renderObjectEvalRow(), renderProfileTargetRow(), renderSelfEvaluationRow(), renderSuggestedResources(), and ilSkillTreeNode\STATUS_DRAFT.

Referenced by getGapAnalysisHTML(), and listSkills().

201  {
202  global $ilUser, $lng, $ilCtrl, $ilSetting;
203 
204 //echo "<br>".$a_top_skill_id.":".$a_tref_id;
205  $this->tooltips = array();
206 
207  if ($a_user_id == 0)
208  {
209  $user = $ilUser;
210  }
211  else
212  {
213  $user = new ilObjUser($a_user_id);
214  }
215 
216  $tpl = new ilTemplate("tpl.skill_pres.html", true, true, "Services/Skill");
217 
218  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
219 
220  include_once("./Services/Skill/classes/class.ilSkillTree.php");
221  $stree = new ilSkillTree();
222 
223  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
224  include_once("./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
225 
226  // general settings for the action drop down
227  include_once("Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
228  $act_list = new ilAdvancedSelectionListGUI();
229  $act_list->setListTitle($lng->txt("actions"));
230  $act_list->setSelectionHeaderClass("small");
231 // $act_list->setLinksMode("il_ContainerItemCommand2");
232  $act_list->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
233  $act_list->setUseImages(false);
234 
235  include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
236  $vtree = new ilVirtualSkillTree();
237  $tref_id = $a_tref_id;
238  $skill_id = $a_top_skill_id;
239  if (ilSkillTreeNode::_lookupType($a_top_skill_id) == "sktr")
240  {
241  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
242  $tref_id = $a_top_skill_id;
243  $skill_id = ilSkillTemplateReference::_lookupTemplateId($a_top_skill_id);
244  }
245  $b_skills = $vtree->getSubTreeForCSkillId($skill_id.":".$tref_id, true);
246 //if ($a_tref_id > 0) $a_top_skill_id = $a_tref_id;
247  foreach ($b_skills as $bs)
248  {
249 $bs["id"] = $bs["skill_id"];
250 $bs["tref"] = $bs["tref_id"];
251 //var_dump($bs); exit;
252  $path = $stree->getSkillTreePath($bs["id"], $bs["tref"]);
253 
254  // check draft
255  foreach ($path as $p)
256  {
257  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT)
258  {
259  continue(2);
260  }
261  }
262  reset($path);
263 
264  $skill = ilSkillTreeNodeFactory::getInstance($bs["id"]);
265  $level_data = $skill->getLevelData();
266 
267  if ($this->mode == "gap")
268  {
269  if ($this->getProfileId() > 0)
270  {
271  $this->renderProfileTargetRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
272  }
273  $this->renderActualLevelsRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
274  $this->renderGapSelfEvalRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
275  $this->renderSuggestedResources($tpl, $level_data, $bs["id"], $bs["tref"]);
276  }
277  else
278  {
279  if ($this->getProfileId() > 0)
280  {
281  $this->renderProfileTargetRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
282  }
283  $this->renderMaterialsRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
284 
285  // get date of self evaluation
286  $se_date = ilPersonalSkill::getSelfEvaluationDate($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]);
287  $se_rendered = ($se_date == "")
288  ? true
289  : false;
290 
291  // get all object triggered entries and render them
292  foreach ($skill->getAllLevelEntriesOfUser($bs["tref"] , $user->getId()) as $level_entry)
293  {
294  // render the self evaluation at the correct position within the list of object triggered entries
295  if ($se_date > $level_entry["status_date"] && !$se_rendered)
296  {
297  $this->renderSelfEvaluationRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
298  $se_rendered = true;
299  }
300  $this->renderObjectEvalRow($tpl, $level_data, $level_entry);
301  }
302 
303  // if not rendered yet, render self evaluation now
304  if (!$se_rendered)
305  {
306  $this->renderSelfEvaluationRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"], $user->getId());
307  }
308  $this->renderSuggestedResources($tpl, $level_data, $bs["id"], $bs["tref"]);
309  }
310 
311  $too_low = true;
312  $current_target_level = 0;
313 
314  foreach ($level_data as $k => $v)
315  {
316  // level
317  $tpl->setCurrentBlock("level_td");
318  $tpl->setVariable("VAL_LEVEL", $v["title"]);
319  $tt_id = "skmg_skl_tt_".self::$skill_tt_cnt;
320  self::$skill_tt_cnt++;
321  $tpl->setVariable("TT_ID", $tt_id);
322  if ($v["description"] != "")
323  {
324  ilTooltipGUI::addTooltip($tt_id, $v["description"]);
325  }
326  $tpl->parseCurrentBlock();
327  }
328 
329 
330  $title = $sep = "";
331  $found = false;
332  foreach ($path as $p)
333  {
334  if ($found)
335  {
336  $title.= $sep.$p["title"];
337  $sep = " > ";
338  }
339  if ($a_top_skill_id == $p["child"])
340  {
341  $found = true;
342  }
343  }
344 
345  $tpl->setCurrentBlock("skill");
346  $tpl->setVariable("BSKILL_TITLE", $title);
347 /* $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
348  $tpl->setVariable("TXT_SELF_EVAL", $lng->txt("skmg_self_evaluation"));
349  if ($this->use_materials)
350  {
351  $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_material"));
352  }*/
353  $tpl->setVariable("TXT_TARGET", $lng->txt("skmg_target_level"));
354  $tpl->setVariable("TXT_360_SURVEY", $lng->txt("skmg_360_survey"));
355 
356  if ($a_edit)
357  {
358  $act_list->flush();
359  $act_list->setId("act_".$a_top_skill_id."_".$bs["id"]."_".$bs["tref"]);
360  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
361  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
362  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
363  if ($this->use_materials)
364  {
365  $act_list->addItem($lng->txt('skmg_assign_materials'), "",
366  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
367  }
368  $act_list->addItem($lng->txt('skmg_self_evaluation'), "",
369  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation"));
370  $tpl->setVariable("ACTIONS2", $act_list->getHTML());
371  }
372 
373  $tpl->parseCurrentBlock();
374 
375  }
376 
377  $tpl->setVariable("SKILL_TITLE", ilSkillTreeNode::_lookupTitle($skill_id, $tref_id));
378 
379  if ($a_edit)
380  {
381  $act_list->flush();
382  $act_list->setId("act_".$a_top_skill_id);
383  $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
384 // $act_list->addItem($lng->txt('skmg_assign_materials'), "",
385 // $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
386  $act_list->addItem($lng->txt('skmg_remove_skill'), "",
387  $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove"));
388  $tpl->setVariable("ACTIONS1", $act_list->getHTML());
389  }
390 
391 
392 
393  return $tpl->get();
394  }
renderSuggestedResources($a_tpl, $a_levels, $a_base_skill, $a_tref_id)
Render suggested resources.
renderActualLevelsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render actual levels row (gap analysis)
Skill tree.
renderGapSelfEvalRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render actual levels row (gap analysis)
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
static addTooltip($a_el_id, $a_text, $a_container="", $a_my="bottom center", $a_at="top center", $a_use_htmlspecialchars=true)
Adds a tooltip to an HTML element.
special template class to simplify handling of ITX/PEAR
renderProfileTargetRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render profile target row.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTemplateId($a_obj_id)
Lookup template ID.
renderObjectEvalRow($a_tpl, $a_levels, $a_level_entry)
Render object evaluation row (has_level table)
User interface class for advanced drop-down selection lists.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22
renderSelfEvaluationRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render self evaluation row.
static getSelfEvaluationDate($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
renderMaterialsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render materials row.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTooltipsJs()

ilPersonalSkillsGUI::getTooltipsJs ( )

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

397  {
398  return $this->tooltips;
399  }

◆ listProfiles()

ilPersonalSkillsGUI::listProfiles ( )

List profiles.

Parameters

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

References $_GET, $ilCtrl, $ilUser, $lng, $options, $si, $tpl, getGapAnalysisHTML(), ilSkillProfile\getProfilesOfUser(), and setProfileId().

897  {
898  global $ilCtrl, $ilToolbar, $ilUser, $lng, $tpl;
899 
900  $profiles = ilSkillProfile::getProfilesOfUser($ilUser->getId());
901 
902  if (count($profiles) == 0)
903  {
904  return;
905  }
906 
907  // select profiles
908  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
909  $options = array();
910  foreach ($profiles as $p)
911  {
912  $options[$p["id"]] = $p["title"];
913  }
914 
915  if (!isset($options[$_GET["profile_id"]]))
916  {
917  $_GET["profile_id"] = (int) key($options);
918  $ilCtrl->setParameter($this, "profile_id", $_GET["profile_id"]);
919  }
920  $current_profile_id = $_GET["profile_id"];
921 
922  $si = new ilSelectInputGUI($lng->txt("skmg_profile"), "");
923  $si->setOptions($options);
924  $si->setValue($current_profile_id);
925  $ilToolbar->addInputItem($si, true);
926  $ilToolbar->addFormButton($lng->txt("select"),
927  "selectProfile");
928  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
929 
930  $this->setProfileId($current_profile_id);
931 
932  $tpl->setContent($this->getGapAnalysisHTML());
933  }
setProfileId($a_val)
Set profile id.
This class represents a selection list property in a property form.
$_GET["client_id"]
getGapAnalysisHTML($a_user_id=0, $a_skills=null)
Get gap analysis html.
global $ilCtrl
Definition: ilias.php:18
static getProfilesOfUser($a_user_id)
Get profiles of a user.
if(!is_array($argv)) $options
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ listSkills()

ilPersonalSkillsGUI::listSkills ( )

List skills.

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

References $ilCtrl, $ilUser, $lng, $path, $tpl, ilPersonalSkill\getSelectedUserSkills(), getSkillHTML(), setTabs(), and ilSkillTreeNode\STATUS_DRAFT.

154  {
155  global $tpl, $ilTabs, $lng, $ilCtrl, $ilToolbar, $ilUser;
156 
157  $this->setTabs("list_skills");
158 
159  include_once("./Services/Skill/classes/class.ilSkillTree.php");
160  $stree = new ilSkillTree();
161 
162  // skill selection / add new personal skill
163  $ilToolbar->addFormButton($lng->txt("skmg_add_skill"),
164  "listSkillsForAdd");
165  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
166 
167  $skills = ilPersonalSkill::getSelectedUserSkills($ilUser->getId());
168  $html = "";
169  foreach ($skills as $s)
170  {
171  $path = $stree->getSkillTreePath($s["skill_node_id"]);
172 
173  // check draft
174  foreach ($path as $p)
175  {
176  if ($p["status"] == ilSkillTreeNode::STATUS_DRAFT)
177  {
178  continue(2);
179  }
180  }
181  $html.= $this->getSkillHTML($s["skill_node_id"], 0, true);
182  }
183 
184  // list skills
185 // include_once("./Services/Skill/classes/class.ilPersonalSkillTableGUI.php");
186 // $sktab = new ilPersonalSkillTableGUI($this, "listSkills");
187 
188  $tpl->setContent($html);
189 
190  }
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.
global $ilCtrl
Definition: ilias.php:18
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22
+ Here is the call graph for this function:

◆ listSkillsForAdd()

ilPersonalSkillsGUI::listSkillsForAdd ( )

LIst skills for adding.

Parameters

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

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

868  {
869  global $ilUser, $tpl, $ilCtrl, $lng, $ilTabs;
870 
871  $ilTabs->setBackTarget($lng->txt("back"),
872  $ilCtrl->getLinkTarget($this, ""));
873 
874  include_once("./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
875  $exp = new ilPersonalSkillExplorerGUI($this, "listSkillsForAdd", $this, "addSkill");
876  if ($exp->getHasSelectableNodes())
877  {
878  if (!$exp->handleCommand())
879  {
880  $tpl->setContent($exp->getHTML());
881  }
882  ilUtil::sendInfo($lng->txt("skmg_select_skill"));
883  }
884  else
885  {
886  ilUtil::sendInfo($lng->txt("skmg_no_nodes_selectable"));
887  }
888  }
Explorer for selecting a personal skill.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ removeMaterial()

ilPersonalSkillsGUI::removeMaterial ( )

Remove material.

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

References $_GET, $ilCtrl, $ilUser, $lng, ilPersonalSkill\removeMaterial(), and ilUtil\sendSuccess().

735  {
736  global $ilUser, $lng, $ilCtrl;
737 
738  ilPersonalSkill::removeMaterial($ilUser->getId(), (int) $_GET["tref_id"],
739  (int) $_GET["level_id"],
740  (int) $_GET["wsp_id"]);
741  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
742  $ilCtrl->saveParameter($this, array("skill_id", "basic_skill_id", "tref_id"));
743  $ilCtrl->redirect($this, "assignMaterials");
744  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
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 518 of file class.ilPersonalSkillsGUI.php.

References $_POST, $ilCtrl, $ilUser, $lng, ilPersonalSkill\removeSkill(), and ilUtil\sendSuccess().

519  {
520  global $ilUser, $lng, $ilCtrl;
521 
522  if (is_array($_POST["id"]))
523  {
524  foreach ($_POST["id"] as $n_id)
525  {
526  ilPersonalSkill::removeSkill($ilUser->getId(), $n_id);
527  }
528  }
529 
530  ilUtil::sendSuccess($lng->txt("msg_object_modified"));
531  $ilCtrl->redirect($this, "listSkills");
532  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
removeSkill($a_user_id, $a_skill_node_id)
Remove personal skill.
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ renderActualLevelsRow()

ilPersonalSkillsGUI::renderActualLevelsRow (   $a_tpl,
  $a_levels,
  $a_top_skill_id,
  $a_base_skill,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Render actual levels row (gap analysis)

Parameters

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

References $ilUser, $lng, ilObject\_lookupTitle(), and getProfileId().

Referenced by getSkillHTML().

1371  {
1372  global $ilUser, $lng;
1373 
1374  if ($a_user_id == 0)
1375  {
1376  $a_user_id = $ilUser->getId();
1377  }
1378 
1379  $profile = new ilSkillProfile($this->getProfileId());
1380  $profile_levels = $profile->getSkillLevels();
1381 
1382  foreach ($a_levels as $k => $v)
1383  {
1384  $a_tpl->setCurrentBlock("val_level_td");
1385  $survey_level = false;
1386  if ($this->actual_levels[$v["skill_id"]][$a_tref_id] == $v["id"])
1387  {
1388  $survey_level = true;
1389  $too_low = false;
1390  }
1391  if ($survey_level)
1392  {
1393  $a_tpl->setVariable("VAL_LEVEL", "x");
1394  $a_tpl->setVariable("TD_CLASS", "ilSkillSelf");
1395  }
1396  else
1397  {
1398  $a_tpl->setVariable("VAL_LEVEL", " ");
1399  }
1400  $a_tpl->parseCurrentBlock();
1401  }
1402 
1403  $a_tpl->setCurrentBlock("value_row");
1404  if ($this->gap_cat_title != "")
1405  {
1406  $a_tpl->setVariable("TXT_VAL_TITLE", $this->gap_cat_title);
1407  }
1408  else if ($this->gap_mode == "max_per_type")
1409  {
1410  $a_tpl->setVariable("TXT_VAL_TITLE", $lng->txt("objs_".$this->gap_mode_type));
1411  }
1412  else if ($this->gap_mode == "max_per_object")
1413  {
1414  $a_tpl->setVariable("TXT_VAL_TITLE", ilObject::_lookupTitle($this->gap_mode_obj_id));
1415  }
1416 
1417  $a_tpl->parseCurrentBlock();
1418  }
static _lookupTitle($a_id)
lookup object title
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderGapSelfEvalRow()

ilPersonalSkillsGUI::renderGapSelfEvalRow (   $a_tpl,
  $a_levels,
  $a_top_skill_id,
  $a_base_skill,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Render actual levels row (gap analysis)

Parameters

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

References $ilUser, $lng, and getGapAnalysisSelfEvalLevels().

Referenced by getSkillHTML().

1427  {
1428  global $ilUser, $lng;
1429 
1430  if ($a_user_id == 0)
1431  {
1432  $a_user_id = $ilUser->getId();
1433  }
1434 
1435  $self_vals = $this->getGapAnalysisSelfEvalLevels();
1436  if (count($self_vals) == 0)
1437  {
1438  return;
1439  }
1440 
1441  foreach ($a_levels as $k => $v)
1442  {
1443  $a_tpl->setCurrentBlock("val_level_td");
1444  $survey_level = false;
1445  if ($self_vals[$v["skill_id"]][$a_tref_id] == $v["id"])
1446  {
1447  $survey_level = true;
1448  }
1449  if ($survey_level)
1450  {
1451  $a_tpl->setVariable("VAL_LEVEL", "x");
1452  $a_tpl->setVariable("TD_CLASS", "ilSkillSelf");
1453  }
1454  else
1455  {
1456  $a_tpl->setVariable("VAL_LEVEL", " ");
1457  }
1458  $a_tpl->parseCurrentBlock();
1459  }
1460 
1461  $a_tpl->setCurrentBlock("value_row");
1462  $a_tpl->setVariable("TXT_VAL_TITLE", $lng->txt("skmg_self_evaluation"));
1463 
1464  $a_tpl->parseCurrentBlock();
1465  }
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderMaterialsRow()

ilPersonalSkillsGUI::renderMaterialsRow (   $a_tpl,
  $a_levels,
  $a_top_skill_id,
  $a_base_skill,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Render materials row.

Parameters

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

References $ilUser, $lng, ilTooltipGUI\addTooltip(), ilPersonalSkill\countAssignedMaterial(), ilPersonalSkill\getAssignedMaterial(), and getMaterialInfo().

Referenced by getSkillHTML().

1239  {
1240  global $ilUser, $lng;
1241 
1242  if ($a_user_id == 0)
1243  {
1244  $a_user_id = $ilUser->getId();
1245  }
1246 
1247  $got_mat = false;
1248  foreach ($a_levels as $v)
1249  {
1250  $mat_cnt = ilPersonalSkill::countAssignedMaterial($a_user_id,
1251  $a_tref_id, $v["id"]);
1252  if ($mat_cnt > 0)
1253  {
1254  $got_mat = true;
1255  }
1256  }
1257  if (!$got_mat)
1258  {
1259  return;
1260  }
1261 
1262  foreach ($a_levels as $k => $v)
1263  {
1264  $mat_cnt = ilPersonalSkill::countAssignedMaterial($a_user_id,
1265  $a_tref_id, $v["id"]);
1266  if ($mat_cnt == 0)
1267  {
1268  $a_tpl->setCurrentBlock("val_level_td");
1269  $a_tpl->setVariable("VAL_LEVEL", " ");
1270  $a_tpl->parseCurrentBlock();
1271  }
1272  else
1273  {
1274  // links to material files
1275  $a_tpl->setCurrentBlock("level_link");
1276 
1277  $mat_tt = array();
1278  $cnt = 1;
1279  foreach(ilPersonalSkill::getAssignedMaterial($a_user_id,
1280  $a_tref_id, $v["id"]) as $item)
1281  {
1282  $mat_data = $this->getMaterialInfo($item["wsp_id"], $a_user_id);
1283  $a_tpl->setVariable("HREF_LINK", $mat_data[1]);
1284  $a_tpl->setVariable("TXT_LINK", $cnt);
1285 
1286  // tooltip
1287  $mat_tt_id = "skmg_skl_tt_mat_".self::$skill_tt_cnt;
1288  self::$skill_tt_cnt++;
1289  $a_tpl->setVariable("LEVEL_LINK_ID", $mat_tt_id);
1290 
1291  if(!$this->offline_mode)
1292  {
1293  ilTooltipGUI::addTooltip($mat_tt_id, $mat_data[0]);
1294  }
1295  else
1296  {
1297  $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
1298  }
1299 
1300  $a_tpl->parseCurrentBlock();
1301  $cnt++;
1302  }
1303 
1304  $a_tpl->setCurrentBlock("val_level_td");
1305  $a_tpl->setVariable("TD_CLASS", "ilSkillMat");
1306  $a_tpl->parseCurrentBlock();
1307  }
1308  }
1309 
1310  $a_tpl->setCurrentBlock("value_row");
1311  $a_tpl->setVariable("TXT_VAL_TITLE", $lng->txt("skmg_material"));
1312  $a_tpl->parseCurrentBlock();
1313  }
getMaterialInfo($a_wsp_id, $a_user_id)
Get material file name and goto url.
static addTooltip($a_el_id, $a_text, $a_container="", $a_my="bottom center", $a_at="top center", $a_use_htmlspecialchars=true)
Adds a tooltip to an HTML element.
static getAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
global $ilUser
Definition: imgupload.php:15
static countAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderObjectEvalRow()

ilPersonalSkillsGUI::renderObjectEvalRow (   $a_tpl,
  $a_levels,
  $a_level_entry 
)

Render object evaluation row (has_level table)

Parameters

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

References ilDatePresentation\formatDate(), IL_CAL_DATETIME, and ilDatePresentation\setUseRelativeDates().

Referenced by getSkillHTML().

1474  {
1475  $se_level = $a_level_entry["level_id"];
1476 
1477  // check, if current self eval level is in current level data
1478  $valid_sel_level = false;
1479  if ($se_level > 0)
1480  {
1481  foreach ($a_levels as $k => $v)
1482  {
1483  if ($v["id"] == $se_level)
1484  {
1485  $valid_sel_level = true;
1486  }
1487  }
1488  }
1489  reset($a_levels);
1490  $found = false;
1491  foreach ($a_levels as $k => $v)
1492  {
1493  $a_tpl->setCurrentBlock("val_level_td");
1494  if ($valid_sel_level && $v["id"] == $se_level)
1495  {
1496  $a_tpl->setVariable("VAL_LEVEL", "x");
1497  $a_tpl->setVariable("TD_CLASS", "ilSkillSelf");
1498  }
1499  else
1500  {
1501  $a_tpl->setVariable("VAL_LEVEL", " ");
1502  }
1503  $a_tpl->parseCurrentBlock();
1504  /*if ($v["id"] == $se_level)
1505  {
1506  $found = true;
1507  }*/
1508  }
1509 
1510  $a_tpl->setCurrentBlock("value_row");
1512  $a_tpl->setVariable("TXT_VAL_TITLE", $a_level_entry["trigger_title"].
1513  ", ".ilDatePresentation::formatDate(new ilDateTime($a_level_entry["status_date"], IL_CAL_DATETIME)));
1515  $a_tpl->parseCurrentBlock();
1516  }
const IL_CAL_DATETIME
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderProfileTargetRow()

ilPersonalSkillsGUI::renderProfileTargetRow (   $a_tpl,
  $a_levels,
  $a_top_skill_id,
  $a_base_skill,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Render profile target row.

Parameters

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

References $ilUser, $lng, and getProfileId().

Referenced by getSkillHTML().

1322  {
1323  global $ilUser, $lng;
1324 
1325  if ($a_user_id == 0)
1326  {
1327  $a_user_id = $ilUser->getId();
1328  }
1329 
1330  $profile = new ilSkillProfile($this->getProfileId());
1331  $profile_levels = $profile->getSkillLevels();
1332 
1333  foreach ($a_levels as $k => $v)
1334  {
1335  $a_tpl->setCurrentBlock("val_level_td");
1336  $target_level = false;
1337  foreach ($profile_levels as $pl)
1338  {
1339  if ($pl["level_id"] == $v["id"] &&
1340  $pl["base_skill_id"] == $v["skill_id"])
1341  {
1342  $target_level = true;
1343  $current_target_level = $v["id"];
1344  }
1345  }
1346  if ($target_level)
1347  {
1348  $too_low = true;
1349  $a_tpl->setVariable("VAL_LEVEL", "x");
1350  $a_tpl->setVariable("TD_CLASS", "ilSkillSelf");
1351  }
1352  else
1353  {
1354  $a_tpl->setVariable("VAL_LEVEL", " ");
1355  }
1356  $a_tpl->parseCurrentBlock();
1357  }
1358 
1359  $a_tpl->setCurrentBlock("value_row");
1360  $a_tpl->setVariable("TXT_VAL_TITLE", $lng->txt("skmg_target_level"));
1361  $a_tpl->parseCurrentBlock();
1362  }
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderSelfEvaluationRow()

ilPersonalSkillsGUI::renderSelfEvaluationRow (   $a_tpl,
  $a_levels,
  $a_top_skill_id,
  $a_base_skill,
  $a_tref_id = 0,
  $a_user_id = 0 
)

Render self evaluation row.

Parameters

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

References $ilUser, $lng, ilPersonalSkill\getSelfEvaluation(), ilPersonalSkill\getSelfEvaluationDate(), IL_CAL_DATETIME, and ilDatePresentation\setUseRelativeDates().

Referenced by getSkillHTML().

1179  {
1180  global $ilUser, $lng;
1181 
1182  if ($a_user_id == 0)
1183  {
1184  $a_user_id = $ilUser->getId();
1185  }
1186 
1187  $se_date = ilPersonalSkill::getSelfEvaluationDate($a_user_id, $a_top_skill_id, $a_tref_id, $a_base_skill);
1188 
1189  $se_level = ilPersonalSkill::getSelfEvaluation($a_user_id,
1190  $a_top_skill_id, $a_tref_id, $a_base_skill);
1191  // check, if current self eval level is in current level data
1192  $valid_sel_level = false;
1193  if ($se_level > 0)
1194  {
1195  foreach ($a_levels as $k => $v)
1196  {
1197  if ($v["id"] == $se_level)
1198  {
1199  $valid_sel_level = true;
1200  }
1201  }
1202  }
1203  reset($a_levels);
1204  $found = false;
1205  foreach ($a_levels as $k => $v)
1206  {
1207  $a_tpl->setCurrentBlock("val_level_td");
1208  if ($valid_sel_level && $v["id"] == $se_level)
1209  {
1210  $a_tpl->setVariable("VAL_LEVEL", "x");
1211  $a_tpl->setVariable("TD_CLASS", "ilSkillSelf");
1212  }
1213  else
1214  {
1215  $a_tpl->setVariable("VAL_LEVEL", " ");
1216  }
1217  $a_tpl->parseCurrentBlock();
1218  /*if ($v["id"] == $se_level)
1219  {
1220  $found = true;
1221  }*/
1222  }
1223 
1224  $a_tpl->setCurrentBlock("value_row");
1226  $a_tpl->setVariable("TXT_VAL_TITLE", $lng->txt("skmg_self_evaluation").
1227  ", ".ilDatePresentation::formatDate(new ilDateTime($se_date, IL_CAL_DATETIME)));
1229  $a_tpl->parseCurrentBlock();
1230  }
const IL_CAL_DATETIME
static setUseRelativeDates($a_status)
set use relative dates
Date and time handling
static getSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
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:

◆ renderSuggestedResources()

ilPersonalSkillsGUI::renderSuggestedResources (   $a_tpl,
  $a_levels,
  $a_base_skill,
  $a_tref_id 
)

Render suggested resources.

Parameters

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

References $lng, $r, $ref_id, $res, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), getProfileId(), and ilBasicSkill\lookupLevelTitle().

Referenced by getSkillHTML().

1525  {
1526  global $lng;
1527 
1528  // use a profile
1529  if ($this->getProfileId() > 0)
1530  {
1531  $profile = new ilSkillProfile($this->getProfileId());
1532  $profile_levels = $profile->getSkillLevels();
1533 
1534  $too_low = true;
1535  $current_target_level = 0;
1536 
1537 
1538  foreach ($a_levels as $k => $v)
1539  {
1540  foreach ($this->profile_levels as $pl)
1541  {
1542  if ($pl["level_id"] == $v["id"] &&
1543  $pl["base_skill_id"] == $v["skill_id"])
1544  {
1545  $too_low = true;
1546  $current_target_level = $v["id"];
1547  }
1548  }
1549 
1550  if ($this->actual_levels[$v["skill_id"]][0] == $v["id"])
1551  {
1552  $too_low = false;
1553  }
1554  }
1555 
1556  // suggested resources
1557  if ($too_low)
1558  {
1559  include_once("./Services/Skill/classes/class.ilSkillResources.php");
1560  $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1561  $res = $skill_res->getResources();
1562  $imp_resources = array();
1563  foreach ($res as $level)
1564  {
1565  foreach($level as $r)
1566  {
1567  if ($r["imparting"] == true &&
1568  $current_target_level == $r["level_id"])
1569  {
1570  $imp_resources[] = $r;
1571  }
1572  }
1573  }
1574  foreach($imp_resources as $r)
1575  {
1576  $ref_id = $r["rep_ref_id"];
1577  $obj_id = ilObject::_lookupObjId($ref_id);
1578  $title = ilObject::_lookupTitle($obj_id);
1579  include_once("./Services/Link/classes/class.ilLink.php");
1580  $a_tpl->setCurrentBlock("resource_item");
1581  $a_tpl->setVariable("TXT_RES", $title);
1582  $a_tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1583  $a_tpl->parseCurrentBlock();
1584  }
1585  if (count($imp_resources) > 0)
1586  {
1587  $a_tpl->touchBlock("resources_list");
1588  $a_tpl->setCurrentBlock("resources");
1589  $a_tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_res"));
1590  $a_tpl->parseCurrentBlock();
1591  }
1592  else
1593  {
1594  $a_tpl->setCurrentBlock("resources");
1595  $a_tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_needs_impr_no_res"));
1596  $a_tpl->parseCurrentBlock();
1597  }
1598  }
1599  else
1600  {
1601  $a_tpl->setCurrentBlock("resources");
1602  $a_tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_skill_no_needs_impr"));
1603  $a_tpl->parseCurrentBlock();
1604  }
1605  }
1606  else
1607  {
1608  // no profile, just list all resources
1609  include_once("./Services/Skill/classes/class.ilSkillResources.php");
1610  $skill_res = new ilSkillResources($a_base_skill, $a_tref_id);
1611  $res = $skill_res->getResources();
1612  // add $r["level_id"] info
1613  $any = false;
1614  foreach ($res as $level)
1615  {
1616  $available = false;
1617  $cl = 0;
1618  foreach($level as $r)
1619  {
1620  if ($r["imparting"])
1621  {
1622  $ref_id = $r["rep_ref_id"];
1623  $obj_id = ilObject::_lookupObjId($ref_id);
1624  $title = ilObject::_lookupTitle($obj_id);
1625  include_once("./Services/Link/classes/class.ilLink.php");
1626  $a_tpl->setCurrentBlock("resource_item");
1627  $a_tpl->setVariable("TXT_RES", $title);
1628  $a_tpl->setVariable("HREF_RES", ilLink::_getLink($ref_id));
1629  $a_tpl->parseCurrentBlock();
1630  $available = true;
1631  $any = true;
1632  $cl = $r["level_id"];
1633  }
1634  }
1635  if ($available)
1636  {
1637  $a_tpl->setCurrentBlock("resources_list_level");
1638  $a_tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
1639  $a_tpl->setVariable("LEVEL_NAME", ilBasicSkill::lookupLevelTitle($cl));
1640  $a_tpl->parseCurrentBlock();
1641  $a_tpl->touchBlock("resources_list");
1642  }
1643  }
1644  if ($any)
1645  {
1646  $a_tpl->setCurrentBlock("resources");
1647  $a_tpl->setVariable("SUGGESTED_MAT_MESS", $lng->txt("skmg_suggested_resources"));
1648  $a_tpl->parseCurrentBlock();
1649  }
1650  }
1651  }
static lookupLevelTitle($a_id)
Lookup level title.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
Manages resources for skills.
$ref_id
Definition: sahs_server.php:39
global $lng
Definition: privfeed.php:40
$r
+ 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 844 of file class.ilPersonalSkillsGUI.php.

References $_GET, $_POST, $ilCtrl, $ilUser, $lng, ilPersonalSkill\saveSelfEvaluation(), and ilUtil\sendSuccess().

845  {
846  global $ilUser, $lng, $ilCtrl;
847 
848  ilPersonalSkill::saveSelfEvaluation($ilUser->getId(), (int) $_GET["skill_id"],
849  (int) $_GET["tref_id"], (int) $_GET["basic_skill_id"], (int) $_POST["se"]);
850  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
851 
852 /* $ilCtrl->saveParameter($this, "skill_id");
853  $ilCtrl->saveParameter($this, "level_id");
854  $ilCtrl->saveParameter($this, "tref_id");
855  $ilCtrl->saveParameter($this, "basic_skill_id");*/
856 
857  $ilCtrl->redirect($this, "listSkills");
858 
859  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static saveSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level)
Save self evaluation.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ selectMaterial()

ilPersonalSkillsGUI::selectMaterial ( )

Select material.

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

References $_GET, $_POST, $ilCtrl, $ilUser, $lng, ilPersonalSkill\assignMaterial(), and ilUtil\sendSuccess().

707  {
708  global $ilUser, $ilCtrl, $lng;
709 
710  include_once("./Services/Skill/classes/class.ilPersonalSkill.php");
711  if (is_array($_POST["wsp_id"]))
712  {
713  foreach ($_POST["wsp_id"] as $w)
714  {
715  ilPersonalSkill::assignMaterial($ilUser->getId(), (int) $_GET["skill_id"],
716  (int) $_GET["tref_id"],
717  (int) $_GET["basic_skill_id"], (int) $_GET["level_id"], (int) $w);
718  }
719  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
720  }
721 
722  $ilCtrl->saveParameter($this, "skill_id");
723  $ilCtrl->saveParameter($this, "level_id");
724  $ilCtrl->saveParameter($this, "tref_id");
725  $ilCtrl->saveParameter($this, "basic_skill_id");
726 
727  $ilCtrl->redirect($this, "assignMaterials");
728  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
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 1164 of file class.ilPersonalSkillsGUI.php.

References $_GET, and $ilCtrl.

1165  {
1166  global $ilCtrl;
1167 
1168  $ilCtrl->setParameter($this, "profile_id", $_GET["profile_id"]);
1169  $ilCtrl->redirect($this, "listProfiles");
1170  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ selfEvaluation()

ilPersonalSkillsGUI::selfEvaluation ( )

Assign materials to skill levels.

Parameters

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

References $_GET, $ilCtrl, $lng, $options, $si, $tab, $tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTreeNode\_lookupTitle(), ilSkillTreeNode\_lookupType(), and ilUtil\getImagePath().

776  {
777  global $ilTabs, $lng, $ilCtrl, $tpl, $ilToolbar;
778 
779  $ilTabs->setBackTarget($lng->txt("back"),
780  $ilCtrl->getLinkTarget($this, "listSkills"));
781 
782  $ilCtrl->saveParameter($this, "skill_id");
783  $ilCtrl->saveParameter($this, "basic_skill_id");
784  $ilCtrl->saveParameter($this, "tref_id");
785 
786  include_once("./Services/Skill/classes/class.ilSkillTreeNode.php");
787  $tpl->setTitle(ilSkillTreeNode::_lookupTitle((int) $_GET["skill_id"]));
788  $tpl->setTitleIcon(ilUtil::getImagePath("icon_".
789  ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]).
790  "_b.png"));
791 
792  // basic skill selection
793  include_once("./Services/Skill/classes/class.ilVirtualSkillTree.php");
794  $vtree = new ilVirtualSkillTree();
795  $tref_id = 0;
796  $skill_id = (int) $_GET["skill_id"];
797  if (ilSkillTreeNode::_lookupType((int) $_GET["skill_id"]) == "sktr")
798  {
799  include_once("./Services/Skill/classes/class.ilSkillTemplateReference.php");
800  $tref_id = $_GET["skill_id"];
801  $skill_id = ilSkillTemplateReference::_lookupTemplateId($_GET["skill_id"]);
802  }
803  $bs = $vtree->getSubTreeForCSkillId($skill_id.":".$tref_id, true);
804 
805 
806  $options = array();
807  include_once("./Services/Skill/classes/class.ilBasicSkill.php");
808 
809  foreach ($bs as $b)
810  {
811  $options[$b["skill_id"].":".$b["tref_id"]] = ilBasicSkill::_lookupTitle($b["skill_id"], $b["tref_id"]);
812  }
813 
814 /* $cur_basic_skill_id = ((int) $_POST["basic_skill_id"] > 0)
815  ? (int) $_POST["basic_skill_id"]
816  : (((int) $_GET["basic_skill_id"] > 0)
817  ? (int) $_GET["basic_skill_id"]
818  : key($options));
819 
820  $ilCtrl->setParameter($this, "basic_skill_id", $cur_basic_skill_id);*/
821 
822  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
823  $si = new ilSelectInputGUI($lng->txt("skmg_skill"), "cskill_id");
824  $si->setOptions($options);
825  $si->setValue(((int) $_GET["basic_skill_id"]).":".((int) $_GET["tref_id"]));
826  $ilToolbar->addInputItem($si, true);
827  $ilToolbar->addFormButton($lng->txt("select"),
828  "switchSelfEvaluation");
829 
830  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
831 
832  // table
833  include_once("./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
834  $tab = new ilSelfEvaluationSimpleTableGUI($this, "selfEvaluation",
835  (int) $_GET["skill_id"], (int) $_GET["tref_id"], (int) $_GET["basic_skill_id"]);
836 
837  $tpl->setContent($tab->getHTML());
838 
839  }
This class represents a selection list property in a property form.
$_GET["client_id"]
static _lookupType($a_obj_id)
Lookup Type.
global $ilCtrl
Definition: ilias.php:18
if(!is_array($argv)) $options
Self evaluation, second simplier implementation.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $lng
Definition: privfeed.php:40
+ 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 953 of file class.ilPersonalSkillsGUI.php.

954  {
955  $this->gap_mode = "max_per_object";
956  $this->gap_mode_obj_id = $a_obj_id;
957  $this->gap_cat_title = $a_cat_title;
958  $this->mode = "gap";
959  }

◆ setGapAnalysisActualStatusModePerType()

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

Set gap analysis actual status mode "per type".

Parameters
string$a_typetype

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

941  {
942  $this->gap_mode = "max_per_type";
943  $this->gap_mode_type = $a_type;
944  $this->gap_cat_title = $a_cat_title;
945  $this->mode = "gap";
946  }

◆ setGapAnalysisSelfEvalLevels()

ilPersonalSkillsGUI::setGapAnalysisSelfEvalLevels (   $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 75 of file class.ilPersonalSkillsGUI.php.

76  {
77  $this->gap_self_eval_levels = $a_val;
78  }

◆ setOfflineMode()

ilPersonalSkillsGUI::setOfflineMode (   $a_file_path)

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

146  {
147  $this->offline_mode = $a_file_path;
148  }

◆ setProfileId()

ilPersonalSkillsGUI::setProfileId (   $a_val)

Set profile id.

Parameters
$a_val

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

Referenced by listProfiles().

56  {
57  $this->profile_id = $a_val;
58  }
+ Here is the caller graph for this function:

◆ setTabs()

ilPersonalSkillsGUI::setTabs (   $a_activate)

Set tabs.

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

References $ilCtrl, and $lng.

Referenced by listSkills().

129  {
130  global $ilTabs, $lng, $ilCtrl;
131 
132  // list skills
133  $ilTabs->addTab("list_skills",
134  $lng->txt("skmg_list_skills"),
135  $ilCtrl->getLinkTarget($this, "listSkills"));
136 
137  // assign materials
138 /* $ilTabs->addTab("assign_materials",
139  $lng->txt("skmg_assign_materials"),
140  $ilCtrl->getLinkTarget($this, "assignMaterials"));*/
141 
142  $ilTabs->activateTab($a_activate);
143  }
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ switchAssignMaterials()

ilPersonalSkillsGUI::switchAssignMaterials ( )

Switch self evaluation.

Parameters

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

References $_GET, $_POST, and $ilCtrl.

546  {
547  global $ilCtrl;
548 
549  $cskill = explode(":", $_POST["cskill_id"]);
550  $ilCtrl->setParameter($this, "skill_id", $_GET["skill_id"]);
551  $ilCtrl->setParameter($this, "basic_skill_id", (int) $cskill[0]);
552  $ilCtrl->setParameter($this, "tref_id", (int) $cskill[1]);
553  $ilCtrl->redirect($this, "assignMaterials");
554  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ switchSelfEvaluation()

ilPersonalSkillsGUI::switchSelfEvaluation ( )

Switch self evaluation.

Parameters

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

References $_GET, $_POST, and $ilCtrl.

758  {
759  global $ilCtrl;
760 
761  $cskill = explode(":", $_POST["cskill_id"]);
762  $ilCtrl->setParameter($this, "skill_id", $_GET["skill_id"]);
763  $ilCtrl->setParameter($this, "basic_skill_id", (int) $cskill[0]);
764  $ilCtrl->setParameter($this, "tref_id", (int) $cskill[1]);
765  $ilCtrl->redirect($this, "selfEvaluation");
766  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

Field Documentation

◆ $actual_levels

ilPersonalSkillsGUI::$actual_levels = array()
protected

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

◆ $gap_self_eval_levels

ilPersonalSkillsGUI::$gap_self_eval_levels = array()
protected

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

Referenced by getGapAnalysisSelfEvalLevels().

◆ $mode

ilPersonalSkillsGUI::$mode = ""
protected

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

◆ $offline_mode

ilPersonalSkillsGUI::$offline_mode
protected

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

◆ $skill_tree

ilPersonalSkillsGUI::$skill_tree
protected

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

◆ $skill_tt_cnt

ilPersonalSkillsGUI::$skill_tt_cnt = 1
static

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


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