ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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$ 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.

References $cmd, $ilCtrl, and array.

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  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ listSkillChanges()

ilSurveySkillDeterminationGUI::listSkillChanges ( )

List skill changes.

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

References $ilCtrl, $lng, and $tpl.

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

◆ writeSkills()

ilSurveySkillDeterminationGUI::writeSkills ( )

Write skills.

Parameters

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

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

80  {
81  global $lng, $ilCtrl;
82 return;
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  {
94  ilBasicSkill::writeUserSkillLevelStatus($nl["new_level_id"],
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

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