ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Survey\Mode\IndividualFeedback\UIModifier Class Reference

Interface for modes. More...

+ Inheritance diagram for ILIAS\Survey\Mode\IndividualFeedback\UIModifier:
+ Collaboration diagram for ILIAS\Survey\Mode\IndividualFeedback\UIModifier:

Public Member Functions

 getSurveySettingsGeneral (\ilObjSurvey $survey)
 
 getSurveySettingsResults (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 getSurveySettingsReminderTargets (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 setValuesFromForm (\ilObjSurvey $survey, \ilPropertyFormGUI $form)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 addRaterSelectionToToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 Add rater selection to toolbar. More...
 
- Public Member Functions inherited from ILIAS\Survey\Mode\AbstractUIModifier
 __construct (InternalGUIService $gui)
 
 setInternalService (InternalService $internal_service)
 
 getInternalService ()
 
 getSurveySettingsGeneral (\ilObjSurvey $survey)
 
 getSurveySettingsReminderTargets (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 getSurveySettingsResults (\ilObjSurvey $survey, InternalGUIService $ui_service)
 
 setValuesFromForm (\ilObjSurvey $survey, \ilPropertyFormGUI $form)
 
 setResultsOverviewToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id, \ilTemplate $eval_tpl)
 
 addApprSelectionToToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 getDetailPanels (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 

Protected Member Functions

 getPanelChart (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 getPanelText (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval, \ilSurveyEvaluationResults $question_res)
 
 getParticipantByActiveId (array $participants, int $active_id)
 
 getCaptionForParticipant (array $part_array)
 
- Protected Member Functions inherited from ILIAS\Survey\Mode\AbstractUIModifier
 addExportAndPrintButton (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details, \ilTemplate $eval_tpl)
 
 buildExportButtonAndModal (\ilTemplate $eval_tpl, string $export_cmd)
 
 getExportModal ()
 
 getPanelTable (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 getPanelChart (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 getPanelText (\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval, \ilSurveyEvaluationResults $question_res)
 
 getPanelCard (\ilSurveyEvaluationResults $question_res)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Survey\Mode\AbstractUIModifier
InternalGUIService $gui
 
InternalService $service = null
 

Detailed Description

Interface for modes.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 30 of file class.UIModifier.php.

Member Function Documentation

◆ addRaterSelectionToToolbar()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::addRaterSelectionToToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id 
)

Add rater selection to toolbar.

Definition at line 159 of file class.UIModifier.php.

References $lng, XapiProxy\$req, ilToolbarGUI\addInputItem(), and ilToolbarGUI\addSeparator().

Referenced by ILIAS\Survey\Mode\IndividualFeedback\UIModifier\setResultsCompetenceToolbar().

163  : void {
164  $lng = $this->service->gui()->lng();
165  $ctrl = $this->service->gui()->ctrl();
166  $req = $this->service->gui()->evaluation($survey)->request();
167 
168  $evaluation_manager = $this->service->domain()->evaluation(
169  $survey,
170  $user_id,
171  $req->getAppraiseeId(),
172  $req->getRaterId()
173  );
174 
175 
176  if (!$evaluation_manager->isMultiParticipantsView()) {
177  $raters = $evaluation_manager->getSelectableRaters();
178 
179  if (count($raters) > 0) {
180  $options = [];
181  //$options["-"] = $lng->txt("svy_all_raters");
182  foreach ($raters as $rater) {
183  $options[$rater["user_id"]] = $rater["name"];
184  }
185 
186  $rat = new \ilSelectInputGUI($lng->txt("svy_rater"), "rater_id");
187  $rat->setOptions($options);
188  $rat->setValue($evaluation_manager->getCurrentRater(true));
189  $toolbar->addInputItem($rat, true);
190 
191  $this->gui->button(
192  $this->gui->lng()->txt("svy_select_rater"),
193  $ctrl->getCmd()
194  )->submit()->toToolbar(false, $toolbar);
195 
196 
197  $toolbar->addSeparator();
198  }
199  }
200  }
catch(\Exception $e) $req
Definition: xapiproxy.php:91
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCaptionForParticipant()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getCaptionForParticipant ( array  $part_array)
protected

Definition at line 401 of file class.UIModifier.php.

Referenced by ILIAS\Survey\Mode\IndividualFeedback\UIModifier\getPanelText().

401  : string
402  {
403  return $part_array["sortname"];
404  }
+ Here is the caller graph for this function:

◆ getPanelChart()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getPanelChart ( \ILIAS\Survey\Evaluation\EvaluationGUIRequest  $request,
\SurveyQuestionEvaluation  $a_eval 
)
protected

Definition at line 203 of file class.UIModifier.php.

206  : string {
207  return "";
208  }

◆ getPanelText()

◆ getParticipantByActiveId()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getParticipantByActiveId ( array  $participants,
int  $active_id 
)
protected

Definition at line 391 of file class.UIModifier.php.

References null.

Referenced by ILIAS\Survey\Mode\IndividualFeedback\UIModifier\getPanelText().

391  : ?array
392  {
393  foreach ($participants as $part) {
394  if ((int) $part["active_id"] === $active_id) {
395  return $part;
396  }
397  }
398  return null;
399  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getSurveySettingsGeneral()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getSurveySettingsGeneral ( \ilObjSurvey  $survey)
Returns
[]

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 32 of file class.UIModifier.php.

34  : array {
35  $items = [];
36 
37  return $items;
38  }

◆ getSurveySettingsReminderTargets()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getSurveySettingsReminderTargets ( \ilObjSurvey  $survey,
InternalGUIService  $ui_service 
)
Returns
[]

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 66 of file class.UIModifier.php.

References $lng, ilObjSurvey\getReminderTarget(), ILIAS\Survey\InternalGUIService\lng(), ilObjSurvey\NOTIFICATION_APPRAISEES, ilObjSurvey\NOTIFICATION_APPRAISEES_AND_RATERS, and ilObjSurvey\NOTIFICATION_RATERS.

69  : array {
70  $items = [];
71  $lng = $ui_service->lng();
72 
73  // remind appraisees
74  $cb = new \ilCheckboxInputGUI($lng->txt("survey_notification_target_group"), "remind_appraisees");
75  $cb->setOptionTitle($lng->txt("survey_360_appraisees"));
76  $cb->setInfo($lng->txt("survey_360_appraisees_remind_info"));
77  $cb->setValue("1");
78  $cb->setChecked(in_array(
79  $survey->getReminderTarget(),
81  true
82  ));
83  $items[] = $cb;
84 
85  // remind raters
86  $cb = new \ilCheckboxInputGUI("", "remind_raters");
87  $cb->setOptionTitle($lng->txt("survey_360_raters"));
88  $cb->setInfo($lng->txt("survey_360_raters_remind_info"));
89  $cb->setValue("1");
90  $cb->setChecked(in_array(
91  $survey->getReminderTarget(),
93  true
94  ));
95  $items[] = $cb;
96 
97  return $items;
98  }
const NOTIFICATION_APPRAISEES
const NOTIFICATION_APPRAISEES_AND_RATERS
global $lng
Definition: privfeed.php:31
const NOTIFICATION_RATERS
+ Here is the call graph for this function:

◆ getSurveySettingsResults()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::getSurveySettingsResults ( \ilObjSurvey  $survey,
InternalGUIService  $ui_service 
)
Returns
[]

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 40 of file class.UIModifier.php.

References $lng, ilObjSurvey\get360Results(), ILIAS\Survey\InternalGUIService\lng(), ilObjSurvey\RESULTS_360_NONE, and ilObjSurvey\RESULTS_360_OWN.

43  : array {
44  $items = [];
45  $lng = $ui_service->lng();
46 
47  $ts_results = new \ilRadioGroupInputGUI($lng->txt("survey_360_results"), "ts_res");
48  $ts_results->setValue((string) $survey->get360Results());
49 
50  $option = new \ilRadioOption($lng->txt("survey_360_results_none"), (string) \ilObjSurvey::RESULTS_360_NONE);
51  $option->setInfo($lng->txt("survey_360_results_none_info"));
52  $ts_results->addOption($option);
53 
54  $option = new \ilRadioOption(
55  $lng->txt("survey_360_results_own"),
57  );
58  $option->setInfo($lng->txt("survey_360_results_own_info"));
59  $ts_results->addOption($option);
60 
61  $items[] = $ts_results;
62 
63  return $items;
64  }
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ setResultsCompetenceToolbar()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::setResultsCompetenceToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 138 of file class.UIModifier.php.

References ILIAS\Survey\Mode\AbstractUIModifier\addApprSelectionToToolbar(), and ILIAS\Survey\Mode\IndividualFeedback\UIModifier\addRaterSelectionToToolbar().

142  : void {
144  $survey,
145  $toolbar,
146  $user_id
147  );
148 
150  $survey,
151  $toolbar,
152  $user_id
153  );
154  }
addRaterSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
Add rater selection to toolbar.
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
+ Here is the call graph for this function:

◆ setResultsDetailToolbar()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::setResultsDetailToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id,
\ilTemplate  $eval_tpl 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 118 of file class.UIModifier.php.

References ILIAS\Survey\Mode\AbstractUIModifier\addApprSelectionToToolbar(), and ILIAS\Survey\Mode\AbstractUIModifier\addExportAndPrintButton().

123  : void {
125  $survey,
126  $toolbar,
127  $user_id
128  );
129 
131  $survey,
132  $toolbar,
133  true,
134  $eval_tpl
135  );
136  }
addExportAndPrintButton(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details, \ilTemplate $eval_tpl)
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
+ Here is the call graph for this function:

◆ setValuesFromForm()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::setValuesFromForm ( \ilObjSurvey  $survey,
\ilPropertyFormGUI  $form 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 100 of file class.UIModifier.php.

References ilPropertyFormGUI\getInput(), ilObjSurvey\NOTIFICATION_APPRAISEES, ilObjSurvey\NOTIFICATION_APPRAISEES_AND_RATERS, ilObjSurvey\NOTIFICATION_RATERS, ilObjSurvey\set360Results(), and ilObjSurvey\setReminderTarget().

103  : void {
104  if ($form->getInput("remind_appraisees") && $form->getInput("remind_raters")) {
105  $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_APPRAISEES_AND_RATERS);
106  } elseif ($form->getInput("remind_appraisees")) {
107  $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_APPRAISEES);
108  } elseif ($form->getInput("remind_raters")) {
109  $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_RATERS);
110  } else {
111  $survey->setReminderTarget(0);
112  }
113 
114  $survey->set360Results((int) $form->getInput("ts_res"));
115  }
const NOTIFICATION_APPRAISEES
const NOTIFICATION_APPRAISEES_AND_RATERS
const NOTIFICATION_RATERS
+ Here is the call graph for this function:

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