5include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
 
    6include_once(
"./Services/Skill/classes/class.ilSkillProfile.php");
 
   96        $this->ctrl = 
$DIC->ctrl();
 
   97        $this->lng = 
$DIC->language();
 
   98        $this->help = 
$DIC[
"ilHelp"];
 
   99        $this->setting = 
$DIC[
"ilSetting"];
 
  100        $this->
user = $DIC->user();
 
  101        $this->tpl = 
$DIC[
"tpl"];
 
  102        $this->tabs = 
$DIC->tabs();
 
  103        $this->toolbar = 
$DIC->toolbar();
 
  104        $this->access = 
$DIC->access();
 
  105        $this->ui_fac = 
$DIC->ui()->factory();
 
  106        $this->ui_ren = 
$DIC->ui()->renderer();
 
  114        $lng->loadLanguageModule(
'skmg');
 
  115        $ilHelp->setScreenIdComponent(
"skill");
 
  117        $ilCtrl->saveParameter($this, 
"skill_id");
 
  118        $ilCtrl->saveParameter($this, 
"tref_id");
 
  119        $ilCtrl->saveParameter($this, 
"profile_id");
 
  123        include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
  126        $this->use_materials = !
$ilSetting->get(
"disable_personal_workspace");
 
  128        include_once(
"./Services/Skill/classes/class.ilSkillManagementSettings.php");
 
  139        $this->profile_id = $a_val;
 
  149        return $this->profile_id;
 
  159        $this->gap_self_eval_levels = $a_val;
 
  179        $this->history_view = $a_val;
 
  199        $this->intro_text = $a_val;
 
  220        $this->hidden_skills[] = $a_skill_id . 
":" . $a_tref_id;
 
  233        if (count($this->user_profiles) == 0) {
 
  236        $current_prof_id = 0;
 
  237        if ((
int) 
$_GET[
"profile_id"] > 0) {
 
  238            foreach ($this->user_profiles as $p) {
 
  239                if ($p[
"id"] == (
int) 
$_GET[
"profile_id"]) {
 
  240                    $current_prof_id = (int) 
$_GET[
"profile_id"];
 
  245        if ($current_prof_id == 0 && !(is_array($this->obj_skills) && $this->obj_id > 0)) {
 
  246            $current_prof_id = $this->user_profiles[0][
"id"];
 
  248        $ilCtrl->setParameter($this, 
"profile_id", $current_prof_id);
 
  260        $this->obj_id = $a_obj_id;
 
  261        $this->obj_skills = $a_skills;
 
  277        $next_class = 
$ilCtrl->getNextClass($this);
 
  281        $std_cmd = 
"listSkills";
 
  283        $cmd = 
$ilCtrl->getCmd($std_cmd);
 
  285        $tpl->setTitle(
$lng->txt(
"skills"));
 
  288        switch ($next_class) {
 
  308            $lng->txt(
"skmg_selected_skills"),
 
  309            $ilCtrl->getLinkTarget($this, 
"listSkills")
 
  312        if (count($this->user_profiles) > 0) {
 
  315                $lng->txt(
"skmg_assigned_profiles"),
 
  316                $ilCtrl->getLinkTarget($this, 
"listAssignedProfile")
 
  322        $ilTabs->activateTab($a_activate);
 
  327        $this->offline_mode = $a_file_path;
 
  343        include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
  347        $ilToolbar->addFormButton(
 
  348            $lng->txt(
"skmg_add_skill"),
 
  351        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  355        foreach ($skills as 
$s) {
 
  356            $path = $stree->getSkillTreePath(
$s[
"skill_node_id"]);
 
  359            foreach (
$path as $p) {
 
  382    public function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit = 
false, $a_tref_id = 0)
 
  385        include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
 
  388            "personal_skill_html",
 
  389            array(
"personal_skills_gui" => $this, 
"top_skill_id" => $a_top_skill_id, 
"user_id" => $a_user_id,
 
  390                "edit" => $a_edit, 
"tref_id" => $a_tref_id)
 
  392        if (!$uip->replaced()) {
 
  393            $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
 
  395        $skill_html = $uip->getHTML($skill_html);
 
  406    public function renderSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit = 
false, $a_tref_id = 0)
 
  412        $sub_panels = array();
 
  414        if ($a_user_id == 0) {
 
  420        $tpl = 
new ilTemplate(
"tpl.skill_pres.html", 
true, 
true, 
"Services/Skill");
 
  422        include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
  425        include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
 
  427        $tref_id = $a_tref_id;
 
  428        $skill_id = $a_top_skill_id;
 
  430            include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
 
  431            $tref_id = $a_top_skill_id;
 
  434        $b_skills = $vtree->getSubTreeForCSkillId($skill_id . 
":" . $tref_id, 
true);
 
  436        foreach ($b_skills as $bs) {
 
  437            $bs[
"id"] = $bs[
"skill_id"];
 
  438            $bs[
"tref"] = $bs[
"tref_id"];
 
  440            $path = $stree->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
 
  442            $panel_comps = array();
 
  446            foreach (
$path as $p) {
 
  454            $level_data = $skill->getLevelData();
 
  462                if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
 
  468            if ($this->mode == 
"gap" && !$this->history_view) {
 
  469                $panel_comps[] = $this->ui_fac->legacy($this->
getActualGapItem($level_data, $bs[
"tref"]) . 
"");
 
  470                $panel_comps[] = $this->ui_fac->legacy($this->
getSelfEvalGapItem($level_data, $bs[
"tref"]) . 
"");
 
  474                $se_rendered = ($se_date == 
"")
 
  481                    if ($se_date > $level_entry[
"status_date"] && !$se_rendered) {
 
  484                    $panel_comps[] = $this->ui_fac->legacy($this->
getEvalItem($level_data, $level_entry));
 
  489            if ($this->mode != 
"gap") {
 
  492                    $panel_comps[] = $this->ui_fac->legacy($mat);
 
  499                $panel_comps[] = $this->ui_fac->legacy($sugg);
 
  504            foreach (
$path as $p) {
 
  506                    $title.= $sep . $p[
"title"];
 
  509                if ($a_top_skill_id == $p[
"child"]) {
 
  514            $sub = $this->ui_fac->panel()->sub((
string) 
$title, $panel_comps);
 
  517                $ilCtrl->setParameterByClass(
"ilpersonalskillsgui", 
"skill_id", $a_top_skill_id);
 
  518                $ilCtrl->setParameterByClass(
"ilpersonalskillsgui", 
"tref_id", $bs[
"tref"]);
 
  519                $ilCtrl->setParameterByClass(
"ilpersonalskillsgui", 
"basic_skill_id", $bs[
"id"]);
 
  520                if ($this->use_materials) {
 
  521                    $actions[] = $this->ui_fac->button()->shy(
 
  522                        $lng->txt(
'skmg_assign_materials'),
 
  523                        $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui", 
"assignMaterials")
 
  526                $actions[] = $this->ui_fac->button()->shy(
 
  527                    $lng->txt(
'skmg_self_evaluation'),
 
  528                    $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui", 
"selfEvaluation")
 
  530                $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel(
$lng->txt(
"actions")));
 
  533            $sub_panels[] = $sub;
 
  535            $tpl->parseCurrentBlock();
 
  538        $panel = $this->ui_fac->panel()->standard(
 
  546            $ilCtrl->setParameterByClass(
"ilpersonalskillsgui", 
"skill_id", $a_top_skill_id);
 
  547            $actions[] = $this->ui_fac->button()->shy(
 
  548                $lng->txt(
'skmg_remove_skill'),
 
  549                $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui", 
"confirmSkillRemove")
 
  552            $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel(
$lng->txt(
"actions")));
 
  555        return $this->ui_ren->render($panel);
 
  567        if (!$this->ws_tree) {
 
  568            include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  569            include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
 
  574        $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
 
  577        if (!$this->offline_mode) {
 
  578            $url = $this->ws_access->getGotoLink($a_wsp_id, 
$obj_id);
 
  580            $url = $this->offline_mode . 
"file_" . 
$obj_id . 
"/";
 
  585                    include_once 
"Modules/Test/classes/class.ilObjTestVerification.php";
 
  587                    $url .= $obj->getOfflineFilename();
 
  591                    include_once 
"Modules/Exercise/classes/class.ilObjExerciseVerification.php";
 
  593                    $url .= $obj->getOfflineFilename();
 
  597                    include_once 
"Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
 
  599                    $url .= $obj->getOfflineFilename();
 
  603                    include_once 
"Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
 
  605                    $url .= $obj->getOfflineFilename();
 
  615        return array($caption, 
$url);
 
  630        $ilCtrl->redirect($this, 
"listSkills");
 
  644        include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
 
  645        if (
$_GET[
"skill_id"] > 0) {
 
  648        if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
 
  650            $ilCtrl->redirect($this, 
"listSkills");
 
  652            include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  654            $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  655            $cgui->setHeaderText(
$lng->txt(
"skmg_really_remove_skills"));
 
  656            $cgui->setCancel(
$lng->txt(
"cancel"), 
"listSkills");
 
  657            $cgui->setConfirm(
$lng->txt(
"remove"), 
"removeSkills");
 
  663            $tpl->setContent($cgui->getHTML());
 
  676        if (is_array(
$_POST[
"id"])) {
 
  677            foreach (
$_POST[
"id"] as $n_id) {
 
  683        $ilCtrl->redirect($this, 
"listSkills");
 
  706        $ilTabs->setBackTarget(
 
  708            $ilCtrl->getLinkTarget($this, 
"listSkills")
 
  711        $ilCtrl->saveParameter($this, 
"skill_id");
 
  712        $ilCtrl->saveParameter($this, 
"basic_skill_id");
 
  713        $ilCtrl->saveParameter($this, 
"tref_id");
 
  715        include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
 
  722        include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
 
  725        $skill_id = (int) 
$_GET[
"skill_id"];
 
  727            include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
 
  728            $tref_id = 
$_GET[
"skill_id"];
 
  731        $bs = $vtree->getSubTreeForCSkillId($skill_id . 
":" . $tref_id, 
true);
 
  734        foreach ($bs as $b) {
 
  739        $cur_basic_skill_id = ((int) 
$_POST[
"basic_skill_id"] > 0)
 
  740            ? (int) 
$_POST[
"basic_skill_id"]
 
  741            : (((
int) 
$_GET[
"basic_skill_id"] > 0)
 
  742                ? (
int) 
$_GET[
"basic_skill_id"]
 
  745        $ilCtrl->setParameter($this, 
"basic_skill_id", $cur_basic_skill_id);
 
  747        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  750        $si->setValue($cur_basic_skill_id);
 
  751        $ilToolbar->addInputItem(
$si, 
true);
 
  752        $ilToolbar->addFormButton(
 
  757        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  760        include_once(
"./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
 
  764            (
int) 
$_GET[
"skill_id"],
 
  765            (
int) 
$_GET[
"tref_id"],
 
  788        if (!
$ilSetting->get(
"disable_personal_workspace")) {
 
  789            ilUtil::sendInfo(
$lng->txt(
"skmg_ass_materials_from_workspace") . 
" » <a href='ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace'>" . 
$lng->txt(
"personal_workspace") . 
"</a>");
 
  792        $ilCtrl->saveParameter($this, 
"skill_id");
 
  793        $ilCtrl->saveParameter($this, 
"level_id");
 
  794        $ilCtrl->saveParameter($this, 
"tref_id");
 
  795        $ilCtrl->saveParameter($this, 
"basic_skill_id");
 
  797        $ilTabs->setBackTarget(
 
  799            $ilCtrl->getLinkTarget($this, 
"assignMaterials")
 
  803        include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorerGUI.php");
 
  805        $exp->setTypeWhiteList(array(
"blog", 
"wsrt", 
"wfld", 
"file", 
"tstv", 
"excv"));
 
  806        $exp->setSelectableTypes(array(
"file", 
"tstv", 
"excv"));
 
  807        $exp->setSelectMode(
"wsp_id", 
true);
 
  808        if ($exp->handleCommand()) {
 
  813        $mtpl = 
new ilTemplate(
"tpl.materials_selection.html", 
true, 
true, 
"Services/Skill");
 
  814        $mtpl->setVariable(
"EXP", $exp->getHTML());
 
  822        $tb->setFormAction(
$ilCtrl->getFormAction($this));
 
  823        $tb->setOpenFormTag(
true);
 
  824        $tb->setCloseFormTag(
false);
 
  825        $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
 
  826        $tb->setOpenFormTag(
false);
 
  827        $tb->setCloseFormTag(
true);
 
  828        $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
 
  830        $tpl->setContent($mtpl->get());
 
  843        include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
 
  844        if (is_array(
$_POST[
"wsp_id"])) {
 
  848                    (
int) 
$_GET[
"skill_id"],
 
  849                    (
int) 
$_GET[
"tref_id"],
 
  850                    (
int) 
$_GET[
"basic_skill_id"],
 
  851                    (
int) 
$_GET[
"level_id"],
 
  858        $ilCtrl->saveParameter($this, 
"skill_id");
 
  859        $ilCtrl->saveParameter($this, 
"level_id");
 
  860        $ilCtrl->saveParameter($this, 
"tref_id");
 
  861        $ilCtrl->saveParameter($this, 
"basic_skill_id");
 
  863        $ilCtrl->redirect($this, 
"assignMaterials");
 
  879            (
int) 
$_GET[
"tref_id"],
 
  880            (
int) 
$_GET[
"level_id"],
 
  881            (
int) 
$_GET[
"wsp_id"]
 
  884        $ilCtrl->redirect($this, 
"assignMaterials");
 
  907        $ilTabs->setBackTarget(
 
  909            $ilCtrl->getLinkTarget($this, 
"listSkills")
 
  912        $ilCtrl->saveParameter($this, 
"skill_id");
 
  913        $ilCtrl->saveParameter($this, 
"basic_skill_id");
 
  914        $ilCtrl->saveParameter($this, 
"tref_id");
 
  916        include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
 
  923        include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
 
  926        $skill_id = (int) 
$_GET[
"skill_id"];
 
  928            include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
 
  929            $tref_id = 
$_GET[
"skill_id"];
 
  932        $bs = $vtree->getSubTreeForCSkillId($skill_id . 
":" . $tref_id, 
true);
 
  936        foreach ($bs as $b) {
 
  940        $cur_basic_skill_id = ((int) 
$_POST[
"basic_skill_id"] > 0)
 
  941            ? (int) 
$_POST[
"basic_skill_id"]
 
  942            : (((
int) 
$_GET[
"basic_skill_id"] > 0)
 
  943                ? (
int) 
$_GET[
"basic_skill_id"]
 
  946        $ilCtrl->setParameter($this, 
"basic_skill_id", $cur_basic_skill_id);
 
  948        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  951        $si->setValue($cur_basic_skill_id);
 
  952        $ilToolbar->addInputItem(
$si, 
true);
 
  953        $ilToolbar->addFormButton(
 
  958        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  961        include_once(
"./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
 
  965            (
int) 
$_GET[
"skill_id"],
 
  966            (
int) 
$_GET[
"tref_id"],
 
  984            (
int) 
$_GET[
"skill_id"],
 
  985            (
int) 
$_GET[
"tref_id"],
 
  986            (
int) 
$_GET[
"basic_skill_id"],
 
  996        $ilCtrl->redirect($this, 
"listSkills");
 
 1013        $ilTabs->setBackTarget(
 
 1015            $ilCtrl->getLinkTarget($this, 
"")
 
 1018        include_once(
"./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
 
 1020        if ($exp->getHasSelectableNodes()) {
 
 1021            if (!$exp->handleCommand()) {
 
 1022                $tpl->setContent($exp->getHTML());
 
 1043        if (count($this->user_profiles) == 0 && $this->obj_skills == 
null) {
 
 1065        if (is_array($this->obj_skills) && $this->obj_id > 0) {
 
 1069        foreach ($this->user_profiles as $p) {
 
 1070            $options[$p[
"id"]] = 
$lng->txt(
"skmg_profile") . 
": " . $p[
"title"];
 
 1073        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 1077        $ilToolbar->addInputItem(
$si, 
true);
 
 1078        $ilToolbar->addFormButton(
 
 1079            $lng->txt(
"select"),
 
 1082        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
 1093        $this->gap_mode = 
"max_per_type";
 
 1094        $this->gap_mode_type = 
$a_type;
 
 1095        $this->gap_cat_title = $a_cat_title;
 
 1096        $this->mode = 
"gap";
 
 1106        $this->gap_mode = 
"max_per_object";
 
 1107        $this->gap_mode_obj_id = $a_obj_id;
 
 1108        $this->gap_cat_title = $a_cat_title;
 
 1109        $this->mode = 
"gap";
 
 1121        $this->actual_levels = array();
 
 1122        include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
 1123        foreach ($skills as $sk) {
 
 1125            if ($this->gap_mode == 
"max_per_type") {
 
 1126                $max = $bs->getMaxLevelPerType($sk[
"tref_id"], $this->gap_mode_type, $user_id);
 
 1127                $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
 
 1128            } elseif ($this->gap_mode == 
"max_per_object") {
 
 1129                $max = $bs->getMaxLevelPerObject($sk[
"tref_id"], $this->gap_mode_obj_id, $user_id);
 
 1130                $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
 
 1132                $max = $bs->getMaxLevel($sk[
"tref_id"], $user_id);
 
 1133                $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
 
 1152        if ($a_skills == 
null) {
 
 1156        include_once(
"./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
 
 1162            $intro_html = $pan->getHTML();
 
 1167        if ($a_user_id == 0) {
 
 1170            $user_id = $a_user_id;
 
 1176            $this->profile_levels = $profile->getSkillLevels();
 
 1178            foreach ($this->profile_levels as 
$l) {
 
 1180                    "base_skill_id" => 
$l[
"base_skill_id"],
 
 1181                    "tref_id" => 
$l[
"tref_id"],
 
 1182                    "level_id" => 
$l[
"level_id"]
 
 1185        } elseif (is_array($a_skills)) {
 
 1186            $skills = $a_skills;
 
 1192        $incl_self_eval = 
false;
 
 1194            $incl_self_eval = 
true;
 
 1199        $all_chart_html = 
"";
 
 1202        $sw_skills = array();
 
 1203        foreach ($skills as $sk) {
 
 1204            if (!in_array($sk[
"base_skill_id"] . 
":" . $sk[
"tref_id"], $this->hidden_skills)) {
 
 1209        if (count($sw_skills) >= 3) {
 
 1210            $skill_packages = array();
 
 1212            if (count($sw_skills) < 8) {
 
 1213                $skill_packages[1] = $sw_skills;
 
 1215                $mod = count($sw_skills) % 7;
 
 1216                $pkg_num = floor((count($sw_skills) - 1) / 7) + 1;
 
 1218                foreach ($sw_skills as $k => 
$s) {
 
 1219                    $skill_packages[$cpkg][$k] = 
$s;
 
 1220                    if ($mod < 3 && count($skill_packages) == ($pkg_num - 1) && count($skill_packages[$cpkg]) == 3+$mod) {
 
 1222                    } elseif (count($skill_packages[$cpkg]) == 7) {
 
 1229            foreach ($skill_packages as $pskills) {
 
 1232                $leg_labels = array();
 
 1237                foreach ($pskills as $k => 
$l) {
 
 1241                    $levels = $bs->getLevelData();
 
 1243                    foreach ($levels as $lv) {
 
 1245                        if (
$l[
"level_id"] == $lv[
"id"]) {
 
 1246                            $pskills[$k][
"target_cnt"] = $cnt;
 
 1248                        if ($this->actual_levels[
$l[
"base_skill_id"]][
$l[
"tref_id"]] == $lv[
"id"]) {
 
 1249                            $pskills[$k][
"actual_cnt"] = $cnt;
 
 1251                        if ($incl_self_eval) {
 
 1252                            if ($self_vals[
$l[
"base_skill_id"]][
$l[
"tref_id"]] == $lv[
"id"]) {
 
 1253                                $pskills[$k][
"self_cnt"] = $cnt;
 
 1256                        $max_cnt = max($max_cnt, $cnt);
 
 1260                include_once(
"./Services/Chart/classes/class.ilChart.php");
 
 1262                $chart->setsize(800, 300);
 
 1263                $chart->setYAxisMax($max_cnt);
 
 1264                $chart->setLegLabels($leg_labels);
 
 1267                $cd = 
$chart->getDataInstance();
 
 1268                $cd->setLabel(
$lng->txt(
"skmg_target_level"));
 
 1269                $cd->setFill(
true, 
"#A0A0A0");
 
 1272                $cd2 = 
$chart->getDataInstance();
 
 1273                if ($this->gap_cat_title != 
"") {
 
 1274                    $cd2->setLabel($this->gap_cat_title);
 
 1275                } elseif ($this->gap_mode == 
"max_per_type") {
 
 1276                    $cd2->setLabel(
$lng->txt(
"objs_" . $this->gap_mode_type));
 
 1277                } elseif ($this->gap_mode == 
"max_per_object") {
 
 1281                $cd2->setFill(
true, 
"#FF8080");
 
 1282                $cd2->setFill(
true, 
"#cc8466");
 
 1285                if ($incl_self_eval) {
 
 1286                    $cd3 = 
$chart->getDataInstance();
 
 1287                    $cd3->setLabel(
$lng->txt(
"skmg_self_evaluation"));
 
 1288                    $cd3->setFill(
true, 
"#6ea03c");
 
 1293                foreach ($pskills as $pl) {
 
 1294                    $cd->addPoint($cnt, (
int) $pl[
"target_cnt"]);
 
 1295                    $cd2->addPoint($cnt, (
int) $pl[
"actual_cnt"]);
 
 1296                    if ($incl_self_eval) {
 
 1297                        $cd3->addPoint($cnt, (
int) $pl[
"self_cnt"]);
 
 1311                if ($pkg_cnt == 1) {
 
 1316                $chart_html = 
$chart->getHTML();
 
 1317                $all_chart_html.= $chart_html;
 
 1322            $pan->setBody($all_chart_html);
 
 1323            $all_chart_html = $pan->getHTML();
 
 1330        include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
 
 1332        $skills = $vtree->getOrderedNodeset($skills, 
"base_skill_id", 
"tref_id");
 
 1333        foreach ($skills as 
$s) {
 
 1334            $path = $stree->getSkillTreePath(
$s[
"base_skill_id"]);
 
 1337            foreach (
$path as $p) {
 
 1349        return $intro_html . $all_chart_html . 
$html;
 
 1361        $ilCtrl->setParameter($this, 
"profile_id", 
$_POST[
"profile_id"]);
 
 1362        if ($this->mode == 
"gap") {
 
 1363            $ilCtrl->redirect($this, 
"listProfilesForGap");
 
 1365            $ilCtrl->redirect($this, 
"listAssignedProfile");
 
 1380        if ($a_user_id == 0) {
 
 1381            $a_user_id = 
$ilUser->getId();
 
 1386        foreach ($a_levels as $v) {
 
 1400        $tpl = 
new ilTemplate(
"tpl.skill_materials.html", 
true, 
true, 
"Services/Skill");
 
 1401        foreach ($a_levels as $k => $v) {
 
 1408                $tpl->setCurrentBlock(
"material");
 
 1410                $tpl->setVariable(
"HREF_LINK", $mat_data[1]);
 
 1411                $tpl->setVariable(
"TXT_LINK", $mat_data[0]);
 
 1412                $tpl->parseCurrentBlock();
 
 1416                $tpl->setCurrentBlock(
"level");
 
 1417                $tpl->setVariable(
"LEVEL_VAL", $v[
"title"]);
 
 1418                $tpl->parseCurrentBlock();
 
 1421        $tpl->setVariable(
"TXT_MATERIAL", 
$lng->txt(
"skmg_materials"));
 
 1437        $profile_levels = $profile->getSkillLevels();
 
 1439        $a_activated_levels = array();
 
 1441        foreach ($a_levels as $k => $v) {
 
 1442            foreach ($profile_levels as $pl) {
 
 1443                if ($pl[
"level_id"] == $v[
"id"] &&
 
 1444                    $pl[
"base_skill_id"] == $v[
"skill_id"] &&
 
 1445                    $a_tref_id == $pl[
"tref_id"]) {
 
 1446                    $a_activated_levels[] = $pl[
"level_id"];
 
 1451        $tpl = 
new ilTemplate(
"tpl.skill_eval_item.html", 
true, 
true, 
"Services/Skill");
 
 1452        $tpl->setVariable(
"SCALE_BAR", $this->
getScaleBar($a_levels, $a_activated_levels));
 
 1454        $tpl->setVariable(
"TYPE", 
$lng->txt(
"skmg_target_level"));
 
 1455        $tpl->setVariable(
"TITLE", 
"");
 
 1470        $a_activated_levels = array();
 
 1471        foreach ($a_levels as $k => $v) {
 
 1472            if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
 
 1473                $a_activated_levels[] = $v[
"id"];
 
 1477        if ($this->gap_cat_title != 
"") {
 
 1478            $title = $this->gap_cat_title;
 
 1479        } elseif ($this->gap_mode == 
"max_per_type") {
 
 1480            $title = 
$lng->txt(
"objs_" . $this->gap_mode_type);
 
 1481        } elseif ($this->gap_mode == 
"max_per_object") {
 
 1485        $tpl = 
new ilTemplate(
"tpl.skill_eval_item.html", 
true, 
true, 
"Services/Skill");
 
 1486        $tpl->setVariable(
"SCALE_BAR", $this->
getScaleBar($a_levels, $a_activated_levels));
 
 1489        $tpl->setVariable(
"TYPE", 
$lng->txt(
"skmg_eval_type_" . 
$type));
 
 1513        if (count($self_vals) == 0) {
 
 1517        $a_activated_levels = array();
 
 1518        foreach ($a_levels as $k => $v) {
 
 1519            if ($self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
 
 1520                $a_activated_levels[] = $v[
"id"];
 
 1524        $tpl = 
new ilTemplate(
"tpl.skill_eval_item.html", 
true, 
true, 
"Services/Skill");
 
 1525        $tpl->setVariable(
"SCALE_BAR", $this->
getScaleBar($a_levels, $a_activated_levels));
 
 1528        $tpl->setVariable(
"TYPE", 
$lng->txt(
"skmg_eval_type_" . 
$type));
 
 1548        if (!is_array($a_activated_levels)) {
 
 1549            $a_activated_levels = array($a_activated_levels);
 
 1552        foreach ($a_levels as $level) {
 
 1553            $vals[$level[
"title"]] = (in_array($level[
"id"], $a_activated_levels));
 
 1555        $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
 
 1557        return $this->ui_ren->render($scale_bar);
 
 1571        $tpl = 
new ilTemplate(
"tpl.skill_eval_item.html", 
true, 
true, 
"Services/Skill");
 
 1572        $tpl->setVariable(
"SCALE_BAR", $this->
getScaleBar($a_levels, $a_level_entry[
"level_id"]));
 
 1574        include_once(
"./Services/Skill/classes/class.ilSkillEval.php");
 
 1577        if ($a_level_entry[
"self_eval"] == 1) {
 
 1581        if ($a_level_entry[
"trigger_obj_type"] == 
"tst") {
 
 1586        $title = ($a_level_entry[
"trigger_obj_id"] > 0)
 
 1587                ? $a_level_entry[
"trigger_title"]
 
 1590        if ($a_level_entry[
"trigger_ref_id"] > 0
 
 1591            && $ilAccess->checkAccess(
"read", 
"", $a_level_entry[
"trigger_ref_id"])) {
 
 1592            include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1596        $tpl->setVariable(
"TYPE", 
$lng->txt(
"skmg_eval_type_" . 
$type));
 
 1620        $level_data = $skill->getLevelData();
 
 1621        $tpl = 
new ilTemplate(
"tpl.skill_desc.html", 
true, 
true, 
"Services/Skill");
 
 1623        $desc_exists = 
false;
 
 1624        foreach ($level_data as 
$l) {
 
 1625            if (
$l[
"description"] != 
"") {
 
 1626                $desc_exists = 
true;
 
 1631            foreach ($level_data as 
$l) {
 
 1632                $tpl->setCurrentBlock(
"level");
 
 1633                $tpl->setVariable(
"LEVEL_VAL", 
$l[
"title"]);
 
 1634                $tpl->setVariable(
"LEVEL_DESC", nl2br(
$l[
"description"]));
 
 1635                $tpl->parseCurrentBlock();
 
 1652        $tpl = 
new ilTemplate(
"tpl.suggested_resources.html", 
true, 
true, 
"Services/Skill");
 
 1655        if ($a_profile_id > 0) {
 
 1657            $current_target_level = 0;
 
 1659            foreach ($a_levels as $k => $v) {
 
 1660                foreach ($this->profile_levels as $pl) {
 
 1661                    if ($pl[
"level_id"] == $v[
"id"] &&
 
 1662                        $pl[
"base_skill_id"] == $v[
"skill_id"]) {
 
 1664                        $current_target_level = $v[
"id"];
 
 1668                if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
 
 1675                include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
 
 1677                $res = $skill_res->getResources();
 
 1678                $imp_resources = array();
 
 1679                foreach (
$res as $level) {
 
 1680                    foreach ($level as 
$r) {
 
 1681                        if (
$r[
"imparting"] == 
true &&
 
 1682                            $current_target_level == 
$r[
"level_id"]) {
 
 1683                            $imp_resources[] = 
$r;
 
 1687                foreach ($imp_resources as 
$r) {
 
 1688                    $ref_id = 
$r[
"rep_ref_id"];
 
 1691                    include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1692                    $tpl->setCurrentBlock(
"resource_item");
 
 1695                    $tpl->parseCurrentBlock();
 
 1697                if (count($imp_resources) > 0) {
 
 1698                    $tpl->touchBlock(
"resources_list");
 
 1699                    $tpl->setVariable(
"SUGGESTED_MAT_MESS", 
$lng->txt(
"skmg_skill_needs_impr_res"));
 
 1702                    $tpl->setVariable(
"SUGGESTED_MAT_MESS", 
$lng->txt(
"skmg_skill_needs_impr_no_res"));
 
 1706                $tpl->setVariable(
"SUGGESTED_MAT_MESS", 
$lng->txt(
"skmg_skill_no_needs_impr"));
 
 1711            include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
 
 1713            $res = $skill_res->getResources();
 
 1716            foreach (
$res as $level) {
 
 1719                foreach ($level as 
$r) {
 
 1720                    if (
$r[
"imparting"]) {
 
 1721                        $ref_id = 
$r[
"rep_ref_id"];
 
 1724                        include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1725                        $tpl->setCurrentBlock(
"resource_item");
 
 1728                        $tpl->parseCurrentBlock();
 
 1731                        $cl = 
$r[
"level_id"];
 
 1735                    $tpl->setCurrentBlock(
"resources_list_level");
 
 1736                    $tpl->setVariable(
"TXT_LEVEL", 
$lng->txt(
"skmg_level"));
 
 1738                    $tpl->parseCurrentBlock();
 
 1739                    $tpl->touchBlock(
"resources_list");
 
 1743                $tpl->setVariable(
"SUGGESTED_MAT_MESS", 
$lng->txt(
"skmg_suggested_resources"));
 
 1768            $this->profile_levels = $profile->getSkillLevels();
 
 1770            foreach ($this->profile_levels as 
$l) {
 
 1772                    "base_skill_id" => 
$l[
"base_skill_id"],
 
 1773                    "tref_id" => 
$l[
"tref_id"],
 
 1774                    "level_id" => 
$l[
"level_id"]
 
 1783        foreach ($skills as 
$s) {
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static hasSelfEvaluated($a_user_id, $a_skill_id, $a_tref_id)
Has use self evaluated a skill?
static lookupLevelTitle($a_id)
Lookup level title.
static getInstanceByType($a_type, $a_id)
Get type instance.
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance()
Get instance.
const PANEL_STYLE_PRIMARY
Explorer for selecting a personal skill.
static getAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
static removeMaterial($a_user_id, $a_tref_id, $a_level_id, $a_wsp_id)
Remove material.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
static getSelfEvaluationDate($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
static addPersonalSkill($a_user_id, $a_skill_node_id)
Add personal skill.
static assignMaterial($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level, $a_wsp_id)
Assign material to skill level.
static removeSkill($a_user_id, $a_skill_node_id)
Remove personal skill.
static countAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
static saveSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level)
Save self evaluation.
Personal skills GUI class.
assignMaterials()
Assign materials to skill levels.
getScaleBar($a_levels, $a_activated_levels)
Get scale bar.
setHistoryView($a_val)
Set history view.
getIntroText()
Get intro text.
hideSkill($a_skill_id, $a_tref_id=0)
Hide skill.
getSkillDescription($skill)
Get level description.
selfEvaluation()
Assign materials to skill levels.
setObjectSkills($a_obj_id, $a_skills=null)
Set object skills.
setIntroText($a_val)
Set intro text.
confirmSkillRemove()
Confirm skill remove.
removeSkills()
Remove skills.
getMaterialInfo($a_wsp_id, $a_user_id)
Get material file name and goto url.
getActualLevels($skills, $user_id)
Get actual levels.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
getProfileId()
Get profile id.
selectProfile()
Select profile.
getActualGapItem($a_levels, $a_tref_id=0)
assignMaterial()
Assign materials to skill level.
renderSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Render skill html.
setGapAnalysisSelfEvalLevels(array $a_val)
Set self evaluation levels for gap analysis.
listAssignedProfile()
List profile.
setTabs($a_activate)
Set tabs.
getProfileTargetItem($a_profile_id, $a_levels, $a_tref_id=0)
Get profile target item.
showProfileSelectorToolbar()
Show profile selector toolbar.
listProfilesForGap()
List profiles.
getSelfEvalGapItem($a_levels, $a_tref_id=0)
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.
addSkill()
Add personal skill.
selectMaterial()
Select material.
determineCurrentProfile()
Determine current profile id.
removeMaterial()
Remove material.
setOfflineMode($a_file_path)
getGapAnalysisHTML($a_user_id=0, $a_skills=null)
Get gap analysis html.
getSuggestedResources($a_profile_id, $a_levels, $a_base_skill, $a_tref_id)
Render suggested resources.
setGapAnalysisActualStatusModePerObject($a_obj_id, $a_cat_title="")
Set gap analysis actual status mode "per object".
saveSelfEvaluation()
Save self evaluation.
getMaterials($a_levels, $a_tref_id=0, $a_user_id=0)
Get materials.
executeCommand()
Execute command.
setGapAnalysisActualStatusModePerType($a_type, $a_cat_title="")
Set gap analysis actual status mode "per type".
getHistoryView()
Get history view.
listSkillsForAdd()
LIst skills for adding.
setProfileId($a_val)
Set profile id.
getEvalItem($a_levels, $a_level_entry)
Get eval item.
Self evaluation, second simplier implementation.
Assign materials to skill levels table.
Skill management settings.
static getProfilesOfUser($a_user_id)
Get profiles of a user.
Manages resources for skills.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
static getInstance($a_id=0)
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static _lookupType($a_obj_id)
Lookup Type.
special template class to simplify handling of ITX/PEAR
UI interface hook processor.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Access handler for personal workspace.
Explorer for selecting a personal workspace item.
Tree handler for personal workspace.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
foreach($_POST as $key=> $value) $res