ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSurveySkillDeterminationGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
14{
20 function __construct(ilObjSurvey $a_survey)
21 {
22 $this->survey = $a_survey;
23 }
24
28 function executeCommand()
29 {
30 global $ilCtrl;
31
32 $cmd = $ilCtrl->getCmd("listSkillChanges");
33
34 //$ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
35
36 if (in_array($cmd, array("listSkillChanges", "writeSkills")))
37 {
38 $this->$cmd();
39 }
40 }
41
46 {
47 global $tpl, $ilToolbar, $lng, $ilCtrl;
48
49 include_once("./Modules/Survey/classes/class.ilSurveySkillChangesTableGUI.php");
50
51// $ilToolbar->addButton($lng->txt("survey_write_skills"),
52// $ilCtrl->getLinkTarget($this, "writeSkills"));
53
54 $apps = $this->survey->getAppraiseesData();
55 $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
56 foreach ($apps as $app)
57 {
58 $changes_table = new ilSurveySkillChangesTableGUI($this, "listSkillChanges",
59 $this->survey, $app);
60
61 $ctpl->setCurrentBlock("appraisee");
62 $ctpl->setVariable("LASTNAME", $app["lastname"]);
63 $ctpl->setVariable("FIRSTNAME", $app["firstname"]);
64
65 $ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
66
67 $ctpl->parseCurrentBlock();
68 }
69
70 $tpl->setContent($ctpl->get());
71 }
72
79 function writeSkills()
80 {
81 global $lng, $ilCtrl;
82return;
83 include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
84 $sskill = new ilSurveySkill($this->survey);
85 $apps = $this->survey->getAppraiseesData();
86 $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
87 foreach ($apps as $app)
88 {
89 $new_levels = $sskill->determineSkillLevelsForAppraisee($app["user_id"]);
90 foreach ($new_levels as $nl)
91 {
92 if ($nl["new_level_id"] > 0)
93 {
95 $app["user_id"], $this->survey->getRefId(), $nl["tref_id"], ilBasicSkill::ACHIEVED);
96 }
97 }
98 }
99 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
100 $ilCtrl->redirect($this, "listSkillChanges");
101 }
102
103}
104
105?>
global $tpl
Definition: ilias.php:8
static writeUserSkillLevelStatus($a_level_id, $a_user_id, $a_trigger_ref_id, $a_tref_id=0, $a_status=ilBasicSkill::ACHIEVED, $a_force=false, $a_self_eval=0, $a_unique_identifier="")
Write skill level status.
TableGUI class for survey skill changes.
Survey skill determination GUI class.
__construct(ilObjSurvey $a_survey)
Constructor.
Skill/Competence handling in surveys.
special template class to simplify handling of ITX/PEAR
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35