ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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$ 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.

References $DIC.

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

Member Function Documentation

◆ executeCommand()

ilSurveySkillDeterminationGUI::executeCommand ( )

Execute command.

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

References $ctrl, and $ilCtrl.

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

◆ listSkillChanges()

ilSurveySkillDeterminationGUI::listSkillChanges ( )

List skill changes.

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

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

71  {
72  $tpl = $this->tpl;
73  $ilToolbar = $this->toolbar;
74  $lng = $this->lng;
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  if ($this->survey->get360Mode()) {
82  $apps = $this->survey->getAppraiseesData();
83  } else { // Mode self evaluation, No Appraisee and Rater involved.
84  $apps = $this->survey->getSurveyParticipants();
85  }
86  $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
87  foreach ($apps as $app) {
88  $changes_table = new ilSurveySkillChangesTableGUI(
89  $this,
90  "listSkillChanges",
91  $this->survey,
92  $app
93  );
94 
95  $ctpl->setCurrentBlock("appraisee");
96  $ctpl->setVariable("LASTNAME", $app["lastname"]);
97  $ctpl->setVariable("FIRSTNAME", $app["firstname"]);
98 
99  $ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
100 
101  $ctpl->parseCurrentBlock();
102  }
103 
104  $tpl->setContent($ctpl->get());
105  }
TableGUI class for survey skill changes.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR

◆ writeSkills()

ilSurveySkillDeterminationGUI::writeSkills ( )

Write skills.

Parameters

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

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

114  {
115  $lng = $this->lng;
117  return;
118  include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
119  $sskill = new ilSurveySkill($this->survey);
120  $apps = $this->survey->getAppraiseesData();
121  $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
122  foreach ($apps as $app) {
123  $new_levels = $sskill->determineSkillLevelsForAppraisee($app["user_id"]);
124  foreach ($new_levels as $nl) {
125  if ($nl["new_level_id"] > 0) {
127  $nl["new_level_id"],
128  $app["user_id"],
129  $this->survey->getRefId(),
130  $nl["tref_id"],
132  );
133  }
134  }
135  }
136  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
137  $ilCtrl->redirect($this, "listSkillChanges");
138  }
global $ilCtrl
Definition: ilias.php:18
Skill/Competence handling in surveys.
special template class to simplify handling of ITX/PEAR
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.
+ 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: