ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\Survey\Mode\AbstractUIModifier Class Reference
+ Inheritance diagram for ILIAS\Survey\Mode\AbstractUIModifier:
+ Collaboration diagram for ILIAS\Survey\Mode\AbstractUIModifier:

Public Member Functions

 __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)
 
 setResultsCompetenceToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 setResultsDetailToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 addApprSelectionToToolbar (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
 
 getDetailPanels (array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
 

Protected Member Functions

 addExportAndPrintButton (\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details)
 
 buildExportModal (string $a_id, string $a_cmd)
 
 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)
 

Protected Attributes

InternalGUIService $gui
 
InternalService $service = null
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Survey\Mode\AbstractUIModifier::__construct ( InternalGUIService  $gui)

Definition at line 35 of file class.AbstractUIModifier.php.

References ILIAS\Survey\Mode\AbstractUIModifier\$gui.

36  {
37  $this->gui = $gui;
38  }

Member Function Documentation

◆ addApprSelectionToToolbar()

ILIAS\Survey\Mode\AbstractUIModifier::addApprSelectionToToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id 
)

Definition at line 266 of file class.AbstractUIModifier.php.

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

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\setResultsCompetenceToolbar(), ILIAS\Survey\Mode\IndividualFeedback\UIModifier\setResultsCompetenceToolbar(), ILIAS\Survey\Mode\AbstractUIModifier\setResultsDetailToolbar(), ILIAS\Survey\Mode\IndividualFeedback\UIModifier\setResultsDetailToolbar(), and ILIAS\Survey\Mode\AbstractUIModifier\setResultsOverviewToolbar().

270  : void {
271  $lng = $this->service->gui()->lng();
272  $ctrl = $this->service->gui()->ctrl();
273  $req = $this->service->gui()->evaluation($survey)->request();
274 
275  $evaluation_manager = $this->service->domain()->evaluation(
276  $survey,
277  $user_id,
278  $req->getAppraiseeId(),
279  $req->getRaterId()
280  );
281 
282  if ($evaluation_manager->isMultiParticipantsView()) {
283  $appr_id = $evaluation_manager->getCurrentAppraisee();
284  $options = array();
285  if (!$appr_id) {
286  $options[""] = $lng->txt("please_select");
287  }
288 
289  foreach ($evaluation_manager->getSelectableAppraisees() as $appraisee_usr_id) {
290  $options[$appraisee_usr_id] = \ilUserUtil::getNamePresentation(
291  $appraisee_usr_id,
292  false,
293  false,
294  "",
295  true
296  );
297  }
298 
299  $appr = new \ilSelectInputGUI($lng->txt("survey_360_appraisee"), "appr_id");
300  $appr->setOptions($options);
301  $appr->setValue($appr_id);
302  $toolbar->addInputItem($appr, true);
303 
304  $this->gui->button(
305  $lng->txt("survey_360_select_appraisee"),
306  $ctrl->getCmd()
307  )->submit()->toToolbar(false, $toolbar);
308 
309  if ($appr_id) {
310  $toolbar->addSeparator();
311  }
312  }
313  }
catch(\Exception $e) $req
Definition: xapiproxy.php:93
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
$lng
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addExportAndPrintButton()

ILIAS\Survey\Mode\AbstractUIModifier::addExportAndPrintButton ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
bool  $details 
)
protected

Definition at line 164 of file class.AbstractUIModifier.php.

References ilToolbarGUI\addComponent(), ilToolbarGUI\addSeparator(), ilToolbarGUI\addText(), ILIAS\Survey\Mode\AbstractUIModifier\buildExportModal(), and ilObject\getRefId().

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\setResultsDetailToolbar(), ILIAS\Survey\Mode\IndividualFeedback\UIModifier\setResultsDetailToolbar(), and ILIAS\Survey\Mode\AbstractUIModifier\setResultsOverviewToolbar().

168  : void {
169  $modal_id = "svy_ev_exp";
170  $modal = $this->buildExportModal($modal_id, $details
171  ? 'exportDetailData'
172  : 'exportData');
173 
174  $this->gui->button(
175  $this->gui->lng()->txt("export"),
176  "#"
177  )->onClick('$(\'#' . $modal_id . '\').modal(\'show\')')->toToolbar(false, $toolbar);
178 
179  $toolbar->addSeparator();
180 
181  if ($details) {
182  $pv = $this->service->gui()->print()->resultsDetails($survey->getRefId());
183  $this->service->gui()->ctrl()->setParameterByClass(
184  "ilSurveyEvaluationGUI",
185  "vw",
186  $this->service->gui()->evaluation($survey)->request()->getVW()
187  );
188  $this->service->gui()->ctrl()->setParameterByClass(
189  "ilSurveyEvaluationGUI",
190  "cp",
191  $this->service->gui()->evaluation($survey)->request()->getCP()
192  );
193  $modal_elements = $pv->getModalElements(
194  $this->service->gui()->ctrl()->getLinkTargetByClass(
195  "ilSurveyEvaluationGUI",
196  "printResultsDetailsSelection"
197  )
198  );
199  } else {
200  $pv = $this->service->gui()->print()->resultsOverview($survey->getRefId());
201  $modal_elements = $pv->getModalElements(
202  $this->service->gui()->ctrl()->getLinkTargetByClass(
203  "ilSurveyEvaluationGUI",
204  "printResultsOverviewSelection"
205  )
206  );
207  }
208 
209  $toolbar->addComponent($modal_elements->button);
210  $toolbar->addComponent($modal_elements->modal);
211 
212  /*
213  $button = \ilLinkButton::getInstance();
214  $button->setCaption("print");
215  $button->setOnClick("if(il.Accordion) { il.Accordion.preparePrint(); } window.print(); return false;");
216  $button->setOmitPreventDoubleSubmission(true);
217  $toolbar->addButtonInstance($button);*/
218 
219  $toolbar->addText($modal);
220  }
buildExportModal(string $a_id, string $a_cmd)
array $details
Details for error message relating to last request processed.
Definition: System.php:109
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildExportModal()

ILIAS\Survey\Mode\AbstractUIModifier::buildExportModal ( string  $a_id,
string  $a_cmd 
)
protected

Definition at line 222 of file class.AbstractUIModifier.php.

References $lng, ilModalGUI\getInstance(), ilSurveyEvaluationGUI\TYPE_SPSS, and ilSurveyEvaluationGUI\TYPE_XLS.

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\addExportAndPrintButton().

225  : string {
226  $tpl = $this->service->gui()->mainTemplate();
227  $lng = $this->service->gui()->lng();
228  $ctrl = $this->service->gui()->ctrl();
229 
230  $form_id = "svymdfrm";
231 
232  // hide modal on form submit
233  $tpl->addOnLoadCode('$("#form_' . $form_id . '").submit(function() { $("#' . $a_id . '").modal("hide"); });');
234 
235  $modal = \ilModalGUI::getInstance();
236  $modal->setId($a_id);
237  $modal->setHeading(($lng->txt("svy_export_format")));
238 
239  $form = new \ilPropertyFormGUI();
240  $form->setId($form_id);
241  $form->setFormAction($ctrl->getFormActionByClass("ilsurveyevaluationgui", $a_cmd));
242 
243  $format = new \ilSelectInputGUI($lng->txt("filetype"), "export_format");
244  $format->setOptions(array(
245  \ilSurveyEvaluationGUI::TYPE_XLS => $lng->txt('exp_type_excel'),
246  \ilSurveyEvaluationGUI::TYPE_SPSS => $lng->txt('exp_type_csv')
247  ));
248  $form->addItem($format);
249 
250  $label = new \ilSelectInputGUI($lng->txt("title"), "export_label");
251  $label->setOptions(array(
252  'label_only' => $lng->txt('export_label_only'),
253  'title_only' => $lng->txt('export_title_only'),
254  'title_label' => $lng->txt('export_title_label')
255  ));
256  $form->addItem($label);
257 
258  $form->addCommandButton($a_cmd, $lng->txt("export"));
259  $form->setPreventDoubleSubmission(false);
260 
261  $modal->setBody($form->getHTML());
262 
263  return $modal->getHTML();
264  }
$lng
static getInstance()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDetailPanels()

ILIAS\Survey\Mode\AbstractUIModifier::getDetailPanels ( array  $participants,
\ILIAS\Survey\Evaluation\EvaluationGUIRequest  $request,
\SurveyQuestionEvaluation  $a_eval 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 316 of file class.AbstractUIModifier.php.

References ILIAS\Survey\Mode\AbstractUIModifier\getPanelCard(), ILIAS\Survey\Mode\AbstractUIModifier\getPanelChart(), ILIAS\Survey\Mode\AbstractUIModifier\getPanelTable(), ILIAS\Survey\Mode\AbstractUIModifier\getPanelText(), and SurveyQuestionEvaluation\getResults().

320  : array {
321  $a_results = $a_eval->getResults();
322  $panels = [];
323  $ui_factory = $this->service->gui()->ui()->factory();
324 
325  $a_tpl = new \ilTemplate("tpl.svy_results_details_panel.html", true, true, "Modules/Survey/Evaluation");
326 
327  $question_res = $a_results;
328  $matrix = false;
329  if (is_array($question_res)) {
330  $question_res = $question_res[0][1];
331  $matrix = true;
332  }
333 
334  // see #28507 (matrix question without a row)
335  if (!is_object($question_res)) {
336  return [];
337  }
338 
339  $question = $question_res->getQuestion();
340 
341  // question "overview"
342  $qst_title = $question->getTitle();
343  $svy_text = nl2br($question->getQuestiontext());
344 
345  // Question title anchor
346  $anchor_id = "svyrdq" . $question->getId();
347  $title = "<span id='$anchor_id'>$qst_title</span>";
348  $panel_qst_card = $ui_factory->panel()->sub($title, $ui_factory->legacy($svy_text))
349  ->withFurtherInformation($this->getPanelCard($question_res));
350 
351  $panels[] = $panel_qst_card;
352 
353  $a_tpl->setVariable("TABLE", $this->getPanelTable(
354  $participants,
355  $request,
356  $a_eval
357  ));
358 
359  $a_tpl->setVariable("TEXT", $this->getPanelText(
360  $request,
361  $a_eval,
362  $question_res
363  ));
364 
365  $a_tpl->setVariable("CHART", $this->getPanelChart(
366  $request,
367  $a_eval
368  ));
369 
370 
371  $panels[] = $ui_factory->panel()->sub("", $ui_factory->legacy($a_tpl->get()));
372  return $panels;
373  }
getPanelTable(array $participants, \ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
getPanelCard(\ilSurveyEvaluationResults $question_res)
getPanelChart(\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval)
getPanelText(\ILIAS\Survey\Evaluation\EvaluationGUIRequest $request, \SurveyQuestionEvaluation $a_eval, \ilSurveyEvaluationResults $question_res)
+ Here is the call graph for this function:

◆ getInternalService()

ILIAS\Survey\Mode\AbstractUIModifier::getInternalService ( )

◆ getPanelCard()

ILIAS\Survey\Mode\AbstractUIModifier::getPanelCard ( \ilSurveyEvaluationResults  $question_res)
protected

Definition at line 496 of file class.AbstractUIModifier.php.

References ILIAS\LTI\ToolProvider\$key, $lng, SurveyQuestion\_getQuestionTypeName(), ilSurveyEvaluationResults\getMean(), ilSurveyEvaluationResults\getMedian(), ilSurveyEvaluationResults\getMedianAsText(), ilSurveyEvaluationResults\getModeNrOfSelections(), ilSurveyEvaluationResults\getModeValue(), ilSurveyEvaluationResults\getModeValueAsText(), ilSurveyEvaluationResults\getQuestion(), ilSurveyEvaluationResults\getUsersAnswered(), and ilSurveyEvaluationResults\getUsersSkipped().

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\getDetailPanels().

499  $ui_factory = $this->service->gui()->ui()->factory();
500  $lng = $this->service->gui()->lng();
501 
502  $question = $question_res->getQuestion();
503  $kv = array();
504  $kv["users_answered"] = $question_res->getUsersAnswered();
505  $kv["users_skipped"] = $question_res->getUsersSkipped();
506 
507  $card_table_tpl = new \ilTemplate(
508  "tpl.svy_results_details_card.html",
509  true,
510  true,
511  "Modules/Survey/Evaluation"
512  );
513 
514  if (true) { // formerly check for matrix type, shouldnt be needed
515  if ($question_res->getModeValue() !== null) {
516  $kv["mode"] = wordwrap($question_res->getModeValueAsText(), 50, "<br />");
517  $kv["mode_nr_of_selections"] = $question_res->getModeNrOfSelections();
518  }
519  if ($question_res->getMedian() !== null) {
520  $kv["median"] = $question_res->getMedianAsText();
521  }
522  if ($question_res->getMean() !== null) {
523  $kv["arithmetic_mean"] = $question_res->getMean();
524  }
525  }
526 
527  foreach ($kv as $key => $value) {
528  $card_table_tpl->setCurrentBlock("question_statistics_card");
529  $card_table_tpl->setVariable("QUESTION_STATISTIC_KEY", $lng->txt($key));
530  $card_table_tpl->setVariable("QUESTION_STATISTIC_VALUE", $value);
531  $card_table_tpl->parseCurrentBlock();
532  }
533 
534  $svy_type_title = \SurveyQuestion::_getQuestionTypeName($question->getQuestionType());
535 
536  return $ui_factory->card()
537  ->standard($svy_type_title)
538  ->withSections(
539  array($ui_factory->legacy($card_table_tpl->get()))
540  );
541  }
static _getQuestionTypeName(string $type_tag)
Return the translation for a given question type.
$lng
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPanelChart()

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

Definition at line 415 of file class.AbstractUIModifier.php.

References Vendor\Package\$b, $r, SurveyQuestionEvaluation\getChart(), and SurveyQuestionEvaluation\getResults().

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\getDetailPanels().

418  : string {
419  $a_results = $a_eval->getResults();
420 
421  $a_tpl = new \ilTemplate("tpl.svy_results_details_chart.html", true, true, "Modules/Survey/Evaluation");
422  // chart
423  if ($request->getShowChart()) {
424  $chart = $a_eval->getChart($a_results);
425  if ($chart) {
426  if (is_array($chart)) {
427  // legend
428  if (is_array($chart[1])) {
429  foreach ($chart[1] as $legend_item) {
430  $r = hexdec(substr($legend_item[1], 1, 2));
431  $g = hexdec(substr($legend_item[1], 3, 2));
432  $b = hexdec(substr($legend_item[1], 5, 2));
433 
434  $a_tpl->setCurrentBlock("legend_bl");
435  $a_tpl->setVariable("LEGEND_CAPTION", $legend_item[0]);
436  $a_tpl->setVariable("LEGEND_COLOR", $legend_item[1]);
437  $a_tpl->setVariable("LEGEND_COLOR_SVG", $r . "," . $g . "," . $b);
438  $a_tpl->parseCurrentBlock();
439  }
440  }
441 
442  $chart = $chart[0];
443  }
444 
445  $a_tpl->setVariable("CHART", $chart);
446  }
447  }
448 
449  return $a_tpl->get();
450  }
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPanelTable()

ILIAS\Survey\Mode\AbstractUIModifier::getPanelTable ( array  $participants,
\ILIAS\Survey\Evaluation\EvaluationGUIRequest  $request,
\SurveyQuestionEvaluation  $a_eval 
)
protected

Definition at line 375 of file class.AbstractUIModifier.php.

References SurveyQuestionEvaluation\getGrid(), and SurveyQuestionEvaluation\getResults().

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\getDetailPanels(), and ILIAS\Survey\Mode\IndividualFeedback\UIModifier\getPanelText().

379  : string {
380  $a_results = $a_eval->getResults();
381 
382  $a_tpl = new \ilTemplate("tpl.svy_results_details_table.html", true, true, "Modules/Survey/Evaluation");
383 
384  // grid
385  if ($request->getShowTable()) {
386  $grid = $a_eval->getGrid(
387  $a_results,
388  $request->getShowAbsolute(),
389  $request->getShowPercentage()
390  );
391  if ($grid) {
392  foreach ($grid["cols"] as $col) {
393  $a_tpl->setCurrentBlock("grid_col_header_bl");
394  $a_tpl->setVariable("COL_HEADER", $col);
395  $a_tpl->parseCurrentBlock();
396  }
397  foreach ($grid["rows"] as $cols) {
398  foreach ($cols as $idx => $col) {
399  if ($idx > 0) {
400  $a_tpl->touchBlock("grid_col_nowrap_bl");
401  }
402 
403  $a_tpl->setCurrentBlock("grid_col_bl");
404  $a_tpl->setVariable("COL_CAPTION", trim((string) ($col ?? "")));
405  $a_tpl->parseCurrentBlock();
406  }
407 
408  $a_tpl->touchBlock("grid_row_bl");
409  }
410  }
411  }
412  return $a_tpl->get();
413  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPanelText()

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

Definition at line 452 of file class.AbstractUIModifier.php.

References $lng, ilSurveyEvaluationResults\getQuestion(), SurveyQuestionEvaluation\getResults(), and SurveyQuestionEvaluation\getTextAnswers().

Referenced by ILIAS\Survey\Mode\AbstractUIModifier\getDetailPanels().

456  : string {
457  $a_results = $a_eval->getResults();
458  $question = $question_res->getQuestion();
459  $lng = $this->service->gui()->lng();
460 
461  $a_tpl = new \ilTemplate("tpl.svy_results_details_text.html", true, true, "Modules/Survey/Evaluation");
462 
463  // text answers
464  $texts = $a_eval->getTextAnswers($a_results);
465  if ($texts) {
466  if (array_key_exists("", $texts)) {
467  $a_tpl->setVariable("TEXT_HEADING", $lng->txt("given_answers"));
468  foreach ($texts[""] as $item) {
469  $a_tpl->setCurrentBlock("text_direct_item_bl");
470  $a_tpl->setVariable("TEXT_DIRECT", nl2br(htmlentities($item)));
471  $a_tpl->parseCurrentBlock();
472  }
473  } else {
474  $acc = new \ilAccordionGUI();
475  $acc->setId("svyevaltxt" . $question->getId());
476 
477  $a_tpl->setVariable("TEXT_HEADING", $lng->txt("freetext_answers"));
478 
479  foreach ($texts as $var => $items) {
480  $list = array("<ul class=\"small\">");
481  foreach ($items as $item) {
482  $list[] = "<li>" . nl2br(htmlentities($item)) . "</li>";
483  }
484  $list[] = "</ul>";
485  $acc->addItem((string) $var, implode("\n", $list));
486  }
487 
488  $a_tpl->setVariable("TEXT_ACC", $acc->getHTML());
489  }
490  }
491  return $a_tpl->get();
492  }
$lng
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSurveySettingsGeneral()

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

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 50 of file class.AbstractUIModifier.php.

52  : array {
53  return [];
54  }

◆ getSurveySettingsReminderTargets()

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

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 56 of file class.AbstractUIModifier.php.

59  : array {
60  return [];
61  }

◆ getSurveySettingsResults()

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

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 63 of file class.AbstractUIModifier.php.

66  : array {
67  return [];
68  }

◆ setInternalService()

ILIAS\Survey\Mode\AbstractUIModifier::setInternalService ( InternalService  $internal_service)

Implements ILIAS\Survey\Mode\UIModifier.

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

40  : void
41  {
42  $this->service = $internal_service;
43  }

◆ setResultsCompetenceToolbar()

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

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 97 of file class.AbstractUIModifier.php.

References ILIAS\Survey\Mode\AbstractUIModifier\addApprSelectionToToolbar().

101  : void {
103  $survey,
104  $toolbar,
105  $user_id
106  );
107  }
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
+ Here is the call graph for this function:

◆ setResultsDetailToolbar()

ILIAS\Survey\Mode\AbstractUIModifier::setResultsDetailToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 110 of file class.AbstractUIModifier.php.

References $lng, ILIAS\Survey\Mode\AbstractUIModifier\addApprSelectionToToolbar(), ILIAS\Survey\Mode\AbstractUIModifier\addExportAndPrintButton(), ilToolbarGUI\addInputItem(), ilToolbarGUI\addSeparator(), ILIAS\Survey\Mode\AbstractUIModifier\getInternalService(), ilObjSurvey\getMode(), and ILIAS\Survey\InternalGUIService\lng().

114  : void {
115  $request = $this->service
116  ->gui()
117  ->evaluation($survey)
118  ->request();
119 
120  $gui = $this->service->gui();
121  $lng = $gui->lng();
122 
123  $config = $this->getInternalService()->domain()->modeFeatureConfig($survey->getMode());
124  if ($config->usesAppraisees()) {
126  $survey,
127  $toolbar,
128  $user_id
129  );
130  }
131 
132  $captions = new \ilSelectInputGUI($lng->txt("svy_eval_captions"), "cp");
133  $captions->setOptions(array(
134  "ap" => $lng->txt("svy_eval_captions_abs_perc"),
135  "a" => $lng->txt("svy_eval_captions_abs"),
136  "p" => $lng->txt("svy_eval_captions_perc")
137  ));
138  $captions->setValue($request->getCP());
139  $toolbar->addInputItem($captions, true);
140 
141  $view = new \ilSelectInputGUI($lng->txt("svy_eval_view"), "vw");
142  $view->setOptions(array(
143  "tc" => $lng->txt("svy_eval_view_tables_charts"),
144  "t" => $lng->txt("svy_eval_view_tables"),
145  "c" => $lng->txt("svy_eval_view_charts")
146  ));
147  $view->setValue($request->getVW());
148  $toolbar->addInputItem($view, true);
149 
150  $this->gui->button(
151  $this->gui->lng()->txt("ok"),
152  "evaluationdetails"
153  )->submit()->toToolbar(false, $toolbar);
154 
155  $toolbar->addSeparator();
156 
158  $survey,
159  $toolbar,
160  true
161  );
162  }
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
$lng
addExportAndPrintButton(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details)
+ Here is the call graph for this function:

◆ setResultsOverviewToolbar()

ILIAS\Survey\Mode\AbstractUIModifier::setResultsOverviewToolbar ( \ilObjSurvey  $survey,
\ilToolbarGUI  $toolbar,
int  $user_id 
)

Implements ILIAS\Survey\Mode\UIModifier.

Definition at line 76 of file class.AbstractUIModifier.php.

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

80  : void {
81  $config = $this->getInternalService()->domain()->modeFeatureConfig($survey->getMode());
82  if ($config->usesAppraisees()) {
84  $survey,
85  $toolbar,
86  $user_id
87  );
88  }
89 
91  $survey,
92  $toolbar,
93  false
94  );
95  }
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
addExportAndPrintButton(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, bool $details)
+ Here is the call graph for this function:

◆ setValuesFromForm()

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

Implements ILIAS\Survey\Mode\UIModifier.

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

73  : void {
74  }

Field Documentation

◆ $gui

InternalGUIService ILIAS\Survey\Mode\AbstractUIModifier::$gui
protected

◆ $service

InternalService ILIAS\Survey\Mode\AbstractUIModifier::$service = null
protected

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