ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSurveySkillDeterminationGUI Class Reference

Survey skill determination GUI class. More...

+ Collaboration diagram for ilSurveySkillDeterminationGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 listSkillChanges ()
 List skill changes. More...
 
 writeSkills ()
 Write skills. More...
 

Detailed Description

Survey skill determination GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_Calls ilSurveySkillDeterminationGUI:

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

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillDeterminationGUI::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
object$a_survey

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

21 {
22 $this->survey = $a_survey;
23 }

Member Function Documentation

◆ executeCommand()

ilSurveySkillDeterminationGUI::executeCommand ( )

Execute command.

Definition at line 28 of file class.ilSurveySkillDeterminationGUI.php.

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 }
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35

References $cmd, and $ilCtrl.

◆ listSkillChanges()

ilSurveySkillDeterminationGUI::listSkillChanges ( )

List skill changes.

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

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 }
global $tpl
Definition: ilias.php:8
TableGUI class for survey skill changes.
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40

References $ilCtrl, $lng, and $tpl.

◆ writeSkills()

ilSurveySkillDeterminationGUI::writeSkills ( )

Write skills.

Parameters

return

Definition at line 79 of file class.ilSurveySkillDeterminationGUI.php.

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 }
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.
Skill/Competence handling in surveys.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilCtrl, $lng, ilBasicSkill\ACHIEVED, ilUtil\sendSuccess(), and ilBasicSkill\writeUserSkillLevelStatus().

+ Here is the call graph for this function:

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