ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $toolbar
 
 $lng
 

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 40 of file class.ilSurveySkillDeterminationGUI.php.

41 {
42 global $DIC;
43
44 $this->ctrl = $DIC->ctrl();
45 $this->tpl = $DIC["tpl"];
46 $this->toolbar = $DIC->toolbar();
47 $this->lng = $DIC->language();
48 $this->survey = $a_survey;
49 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ executeCommand()

ilSurveySkillDeterminationGUI::executeCommand ( )

Execute command.

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

55 {
57
58 $cmd = $ilCtrl->getCmd("listSkillChanges");
59
60 //$ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
61
62 if (in_array($cmd, array("listSkillChanges", "writeSkills"))) {
63 $this->$cmd();
64 }
65 }
global $ilCtrl
Definition: ilias.php:18

References $ctrl, and $ilCtrl.

◆ listSkillChanges()

ilSurveySkillDeterminationGUI::listSkillChanges ( )

List skill changes.

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

71 {
73 $ilToolbar = $this->toolbar;
76
77 include_once("./Modules/Survey/classes/class.ilSurveySkillChangesTableGUI.php");
78
79 // $ilToolbar->addButton($lng->txt("survey_write_skills"),
80 // $ilCtrl->getLinkTarget($this, "writeSkills"));
81
82 $apps = $this->survey->getAppraiseesData();
83 $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
84 foreach ($apps as $app) {
85 $changes_table = new ilSurveySkillChangesTableGUI(
86 $this,
87 "listSkillChanges",
88 $this->survey,
89 $app
90 );
91
92 $ctpl->setCurrentBlock("appraisee");
93 $ctpl->setVariable("LASTNAME", $app["lastname"]);
94 $ctpl->setVariable("FIRSTNAME", $app["firstname"]);
95
96 $ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
97
98 $ctpl->parseCurrentBlock();
99 }
100
101 $tpl->setContent($ctpl->get());
102 }
TableGUI class for survey skill changes.
special template class to simplify handling of ITX/PEAR

References $ctrl, $ilCtrl, $lng, $toolbar, and $tpl.

◆ writeSkills()

ilSurveySkillDeterminationGUI::writeSkills ( )

Write skills.

Parameters

return

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

111 {
114 return;
115 include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
116 $sskill = new ilSurveySkill($this->survey);
117 $apps = $this->survey->getAppraiseesData();
118 $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
119 foreach ($apps as $app) {
120 $new_levels = $sskill->determineSkillLevelsForAppraisee($app["user_id"]);
121 foreach ($new_levels as $nl) {
122 if ($nl["new_level_id"] > 0) {
124 $nl["new_level_id"],
125 $app["user_id"],
126 $this->survey->getRefId(),
127 $nl["tref_id"],
129 );
130 }
131 }
132 }
133 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
134 $ilCtrl->redirect($this, "listSkillChanges");
135 }
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=false, $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 $ctrl, $ilCtrl, $lng, ilBasicSkill\ACHIEVED, ilUtil\sendSuccess(), and ilBasicSkill\writeUserSkillLevelStatus().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilSurveySkillDeterminationGUI::$ctrl
protected

◆ $lng

ilSurveySkillDeterminationGUI::$lng
protected

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

Referenced by listSkillChanges(), and writeSkills().

◆ $toolbar

ilSurveySkillDeterminationGUI::$toolbar
protected

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

Referenced by listSkillChanges().

◆ $tpl

ilSurveySkillDeterminationGUI::$tpl
protected

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

Referenced by listSkillChanges().


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