ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, 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, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, int $user_id)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsParticipantToolbar (\ilObjSurvey $survey, int $user_id)
 
 addApprSelectionToToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 getDetailPanels (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 
 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, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, int $user_id, \ilTemplate $eval_tpl)
 
 setResultsParticipantToolbar (\ilObjSurvey $survey, int $user_id)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, 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
 getExportAndPrintComponents (\ilObjSurvey $survey, bool $details, \ilTemplate $eval_tpl)
 
 getApprSelectionComponents (\ilObjSurvey $survey, int $user_id)
 
 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 163 of file class.UIModifier.php.

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

References $lng, ILIAS\UI\Implementation\Component\Input\Field\$options, ilToolbarGUI\addInputItem(), and ilToolbarGUI\addSeparator().

+ Here is the call graph for this function:

◆ getCaptionForParticipant()

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

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

411 : string
412 {
413 return $part_array["sortname"];
414 }

◆ getPanelChart()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

207 : string {
208 return "";
209 }

◆ getPanelText()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

215 : string {
216 return "";
217 }

◆ getParticipantByActiveId()

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

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

401 : ?array
402 {
403 foreach ($participants as $part) {
404 if ((int) $part["active_id"] === $active_id) {
405 return $part;
406 }
407 }
408 return null;
409 }

◆ getSurveySettingsGeneral()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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
\ilFormPropertyGUI[]

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

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(
79 in_array(
80 $survey->getReminderTarget(),
82 true
83 )
84 );
85 $items[] = $cb;
86
87 // remind raters
88 $cb = new \ilCheckboxInputGUI("", "remind_raters");
89 $cb->setOptionTitle($lng->txt("survey_360_raters"));
90 $cb->setInfo($lng->txt("survey_360_raters_remind_info"));
91 $cb->setValue("1");
92 $cb->setChecked(
93 in_array(
94 $survey->getReminderTarget(),
96 true
97 )
98 );
99 $items[] = $cb;
100
101 return $items;
102 }
const NOTIFICATION_APPRAISEES_AND_RATERS
const NOTIFICATION_APPRAISEES
const NOTIFICATION_RATERS

◆ getSurveySettingsResults()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

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 }

◆ setResultsCompetenceToolbar()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

142 : array {
143 $toolbar = $this->gui->toolbar();
144
146 $survey,
147 $toolbar,
149 );
150
152 $survey,
153 $toolbar,
155 );
156
157 return [];
158 }
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
addRaterSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
Add rater selection to toolbar.

◆ setResultsDetailToolbar()

ILIAS\Survey\Mode\IndividualFeedback\UIModifier::setResultsDetailToolbar ( \ilObjSurvey  $survey,
int  $user_id,
\ilTemplate  $eval_tpl 
)
Returns
\ILIAS\UI\Component\Component[]

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

125 : array {
127 $survey,
128 $this->gui->toolbar(),
130 );
131
132 return $this->getExportAndPrintComponents(
133 $survey,
134 true,
135 $eval_tpl
136 );
137 }
getExportAndPrintComponents(\ilObjSurvey $survey, bool $details, \ilTemplate $eval_tpl)

◆ setValuesFromForm()

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

Reimplemented from ILIAS\Survey\Mode\AbstractUIModifier.

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

107 : void {
108 if ($form->getInput("remind_appraisees") && $form->getInput("remind_raters")) {
109 $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_APPRAISEES_AND_RATERS);
110 } elseif ($form->getInput("remind_appraisees")) {
111 $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_APPRAISEES);
112 } elseif ($form->getInput("remind_raters")) {
113 $survey->setReminderTarget(\ilObjSurvey::NOTIFICATION_RATERS);
114 } else {
115 $survey->setReminderTarget(0);
116 }
117
118 $survey->set360Results((int) $form->getInput("ts_res"));
119 }

References ilObjSurvey\NOTIFICATION_APPRAISEES_AND_RATERS, and ilObjSurvey\setReminderTarget().

+ Here is the call graph for this function:

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