ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSurveySkillDeterminationGUI.php
Go to the documentation of this file.
1 <?php
2 
25 {
27  protected ilObjSurvey $survey;
28  protected ilCtrl $ctrl;
30  protected ilLanguage $lng;
31 
32  public function __construct(ilObjSurvey $a_survey)
33  {
34  global $DIC;
35 
36  $this->ctrl = $DIC->ctrl();
37  $this->tpl = $DIC->ui()->mainTemplate();
38  $this->toolbar = $DIC->toolbar();
39  $this->lng = $DIC->language();
40  $this->survey = $a_survey;
41  }
42 
43  public function executeCommand(): void
44  {
45  $ilCtrl = $this->ctrl;
46 
47  $cmd = $ilCtrl->getCmd("listSkillChanges");
48 
49  if ($cmd === "listSkillChanges") {
50  $this->$cmd();
51  }
52  }
53 
54  public function listSkillChanges(): void
55  {
56  $tpl = $this->tpl;
57 
58  if ($this->survey->get360Mode()) {
59  $apps = $this->survey->getAppraiseesData();
60  } else { // Mode self evaluation, No Appraisee and Rater involved.
61  $apps = $this->survey->getSurveyParticipants();
62  }
63  $ctpl = new ilTemplate("tpl.svy_skill_list_changes.html", true, true, "Modules/Survey");
64  foreach ($apps as $app) {
65  $changes_table = new ilSurveySkillChangesTableGUI(
66  $this,
67  "listSkillChanges",
68  $this->survey,
69  $app
70  );
71 
72  $ctpl->setCurrentBlock("appraisee");
73  $ctpl->setVariable("LASTNAME", $app["lastname"]);
74  $ctpl->setVariable("FIRSTNAME", $app["firstname"]);
75 
76  $ctpl->setVariable("CHANGES_TABLE", $changes_table->getHTML());
77 
78  $ctpl->parseCurrentBlock();
79  }
80 
81  $tpl->setContent($ctpl->get());
82  }
83 }
$app
Definition: cli.php:39
getCmd(string $fallback_command=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...