ILIAS  release_8 Revision v8.23
ILIAS\Survey\Mode\AbstractUIModifier Class Reference
+ Inheritance diagram for ILIAS\Survey\Mode\AbstractUIModifier:
+ Collaboration diagram for ILIAS\Survey\Mode\AbstractUIModifier:

Public Member Functions

 __construct ()
 
 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

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 ( )

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

35  {
36  }

Member Function Documentation

◆ addApprSelectionToToolbar()

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

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

References $lng, XapiProxy\$req, ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addInputItem(), ilToolbarGUI\addSeparator(), ilSubmitButton\getInstance(), 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().

269  : void {
270  $lng = $this->service->gui()->lng();
271  $ctrl = $this->service->gui()->ctrl();
272  $req = $this->service->gui()->evaluation($survey)->request();
273 
274  $evaluation_manager = $this->service->domain()->evaluation(
275  $survey,
276  $user_id,
277  $req->getAppraiseeId(),
278  $req->getRaterId()
279  );
280 
281  if ($evaluation_manager->isMultiParticipantsView()) {
282  $appr_id = $evaluation_manager->getCurrentAppraisee();
283  $options = array();
284  if (!$appr_id) {
285  $options[""] = $lng->txt("please_select");
286  }
287 
288  foreach ($evaluation_manager->getSelectableAppraisees() as $appraisee_usr_id) {
289  $options[$appraisee_usr_id] = \ilUserUtil::getNamePresentation(
290  $appraisee_usr_id,
291  false,
292  false,
293  "",
294  true
295  );
296  }
297 
298  $appr = new \ilSelectInputGUI($lng->txt("survey_360_appraisee"), "appr_id");
299  $appr->setOptions($options);
300  $appr->setValue($appr_id);
301  $toolbar->addInputItem($appr, true);
302 
303  $button = \ilSubmitButton::getInstance();
304  $button->setCaption("survey_360_select_appraisee");
305  $button->setCommand($ctrl->getCmd());
306  $toolbar->addButtonInstance($button);
307 
308  if ($appr_id) {
309  $toolbar->addSeparator();
310  }
311  }
312  }
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
catch(\Exception $e) $req
Definition: xapiproxy.php:93
+ 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 163 of file class.AbstractUIModifier.php.

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

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

167  : void {
168  $modal_id = "svy_ev_exp";
169  $modal = $this->buildExportModal($modal_id, $details
170  ? 'exportDetailData'
171  : 'exportData');
172 
173  $button = \ilLinkButton::getInstance();
174  $button->setCaption("export");
175  $button->setOnClick('$(\'#' . $modal_id . '\').modal(\'show\')');
176  $toolbar->addButtonInstance($button);
177 
178  $toolbar->addSeparator();
179 
180  if ($details) {
181  $pv = $this->service->gui()->print()->resultsDetails($survey->getRefId());
182  $this->service->gui()->ctrl()->setParameterByClass(
183  "ilSurveyEvaluationGUI",
184  "vw",
185  $this->service->gui()->evaluation($survey)->request()->getVW()
186  );
187  $this->service->gui()->ctrl()->setParameterByClass(
188  "ilSurveyEvaluationGUI",
189  "cp",
190  $this->service->gui()->evaluation($survey)->request()->getCP()
191  );
192  $modal_elements = $pv->getModalElements(
193  $this->service->gui()->ctrl()->getLinkTargetByClass(
194  "ilSurveyEvaluationGUI",
195  "printResultsDetailsSelection"
196  )
197  );
198  } else {
199  $pv = $this->service->gui()->print()->resultsOverview($survey->getRefId());
200  $modal_elements = $pv->getModalElements(
201  $this->service->gui()->ctrl()->getLinkTargetByClass(
202  "ilSurveyEvaluationGUI",
203  "printResultsOverviewSelection"
204  )
205  );
206  }
207 
208  $toolbar->addComponent($modal_elements->button);
209  $toolbar->addComponent($modal_elements->modal);
210 
211  /*
212  $button = \ilLinkButton::getInstance();
213  $button->setCaption("print");
214  $button->setOnClick("if(il.Accordion) { il.Accordion.preparePrint(); } window.print(); return false;");
215  $button->setOmitPreventDoubleSubmission(true);
216  $toolbar->addButtonInstance($button);*/
217 
218  $toolbar->addText($modal);
219  }
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 221 of file class.AbstractUIModifier.php.

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

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

224  : string {
225  $tpl = $this->service->gui()->mainTemplate();
226  $lng = $this->service->gui()->lng();
227  $ctrl = $this->service->gui()->ctrl();
228 
229  $form_id = "svymdfrm";
230 
231  // hide modal on form submit
232  $tpl->addOnLoadCode('$("#form_' . $form_id . '").submit(function() { $("#' . $a_id . '").modal("hide"); });');
233 
234  $modal = \ilModalGUI::getInstance();
235  $modal->setId($a_id);
236  $modal->setHeading(($lng->txt("svy_export_format")));
237 
238  $form = new \ilPropertyFormGUI();
239  $form->setId($form_id);
240  $form->setFormAction($ctrl->getFormActionByClass("ilsurveyevaluationgui", $a_cmd));
241 
242  $format = new \ilSelectInputGUI($lng->txt("filetype"), "export_format");
243  $format->setOptions(array(
244  \ilSurveyEvaluationGUI::TYPE_XLS => $lng->txt('exp_type_excel'),
245  \ilSurveyEvaluationGUI::TYPE_SPSS => $lng->txt('exp_type_csv')
246  ));
247  $form->addItem($format);
248 
249  $label = new \ilSelectInputGUI($lng->txt("title"), "export_label");
250  $label->setOptions(array(
251  'label_only' => $lng->txt('export_label_only'),
252  'title_only' => $lng->txt('export_title_only'),
253  'title_label' => $lng->txt('export_title_label')
254  ));
255  $form->addItem($label);
256 
257  $form->addCommandButton($a_cmd, $lng->txt("export"));
258  $form->setPreventDoubleSubmission(false);
259 
260  $modal->setBody($form->getHTML());
261 
262  return $modal->getHTML();
263  }
$lng
$format
Definition: metadata.php:235
static getInstance()
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ 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 315 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().

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

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

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

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

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

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

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

378  : string {
379  $a_results = $a_eval->getResults();
380 
381  $a_tpl = new \ilTemplate("tpl.svy_results_details_table.html", true, true, "Modules/Survey/Evaluation");
382 
383  // grid
384  if ($request->getShowTable()) {
385  $grid = $a_eval->getGrid(
386  $a_results,
387  $request->getShowAbsolute(),
388  $request->getShowPercentage()
389  );
390  if ($grid) {
391  foreach ($grid["cols"] as $col) {
392  $a_tpl->setCurrentBlock("grid_col_header_bl");
393  $a_tpl->setVariable("COL_HEADER", $col);
394  $a_tpl->parseCurrentBlock();
395  }
396  foreach ($grid["rows"] as $cols) {
397  foreach ($cols as $idx => $col) {
398  if ($idx > 0) {
399  $a_tpl->touchBlock("grid_col_nowrap_bl");
400  }
401 
402  $a_tpl->setCurrentBlock("grid_col_bl");
403  $a_tpl->setVariable("COL_CAPTION", trim((string) $col));
404  $a_tpl->parseCurrentBlock();
405  }
406 
407  $a_tpl->touchBlock("grid_row_bl");
408  }
409  }
410  }
411  return $a_tpl->get();
412  }
$cols
Definition: xhr_table.php:11
+ 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 451 of file class.AbstractUIModifier.php.

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

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

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

50  : array {
51  return [];
52  }

◆ getSurveySettingsReminderTargets()

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

Implements ILIAS\Survey\Mode\UIModifier.

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

57  : array {
58  return [];
59  }

◆ getSurveySettingsResults()

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

Implements ILIAS\Survey\Mode\UIModifier.

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

64  : array {
65  return [];
66  }

◆ setInternalService()

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

Implements ILIAS\Survey\Mode\UIModifier.

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

38  : void
39  {
40  $this->service = $internal_service;
41  }

◆ setResultsCompetenceToolbar()

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

Implements ILIAS\Survey\Mode\UIModifier.

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

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

99  : void {
101  $survey,
102  $toolbar,
103  $user_id
104  );
105  }
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 108 of file class.AbstractUIModifier.php.

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

112  : void {
113  $request = $this->service
114  ->gui()
115  ->evaluation($survey)
116  ->request();
117 
118  $gui = $this->service->gui();
119  $lng = $gui->lng();
120 
121  $config = $this->getInternalService()->domain()->modeFeatureConfig($survey->getMode());
122  if ($config->usesAppraisees()) {
124  $survey,
125  $toolbar,
126  $user_id
127  );
128  }
129 
130  $captions = new \ilSelectInputGUI($lng->txt("svy_eval_captions"), "cp");
131  $captions->setOptions(array(
132  "ap" => $lng->txt("svy_eval_captions_abs_perc"),
133  "a" => $lng->txt("svy_eval_captions_abs"),
134  "p" => $lng->txt("svy_eval_captions_perc")
135  ));
136  $captions->setValue($request->getCP());
137  $toolbar->addInputItem($captions, true);
138 
139  $view = new \ilSelectInputGUI($lng->txt("svy_eval_view"), "vw");
140  $view->setOptions(array(
141  "tc" => $lng->txt("svy_eval_view_tables_charts"),
142  "t" => $lng->txt("svy_eval_view_tables"),
143  "c" => $lng->txt("svy_eval_view_charts")
144  ));
145  $view->setValue($request->getVW());
146  $toolbar->addInputItem($view, true);
147 
148  $button = \ilSubmitButton::getInstance();
149  $button->setCaption("ok");
150  $button->setCommand("evaluationdetails");
151  $button->setOmitPreventDoubleSubmission(true);
152  $toolbar->addButtonInstance($button);
153 
154  $toolbar->addSeparator();
155 
157  $survey,
158  $toolbar,
159  true
160  );
161  }
$lng
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
addApprSelectionToToolbar(\ilObjSurvey $survey, \ilToolbarGUI $toolbar, int $user_id)
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 74 of file class.AbstractUIModifier.php.

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

78  : void {
79  $config = $this->getInternalService()->domain()->modeFeatureConfig($survey->getMode());
80  if ($config->usesAppraisees()) {
82  $survey,
83  $toolbar,
84  $user_id
85  );
86  }
87 
89  $survey,
90  $toolbar,
91  false
92  );
93  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
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 68 of file class.AbstractUIModifier.php.

71  : void {
72  }

Field Documentation

◆ $service

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

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