ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilTestCorrectionsGUI Class Reference
+ Collaboration diagram for ilTestCorrectionsGUI:

Public Member Functions

 __construct (private readonly ilDBInterface $database, private readonly ilCtrlInterface $ctrl, private readonly ilLanguage $language, private readonly ilTabsGUI $tabs, private readonly ilHelpGUI $help, private readonly UIFactory $ui_factory, private readonly ilGlobalTemplateInterface $main_tpl, private readonly RefineryFactory $refinery, private readonly TestLogger $logger, private readonly RequestDataCollector $testrequest, private readonly ilObjTest $test_obj, private readonly ilObjUser $scorer,)
 
 executeCommand ()
 
 getRefId ()
 

Protected Member Functions

 showQuestion (ilPropertyFormGUI $form=null)
 
 buildQuestionCorrectionForm (assQuestionGUI $question_gui)
 
 confirmManualScoringReset ()
 
 saveQuestion ()
 
 showSolution ()
 
 showAnswerStatistic (?array $participant_results=null)
 
 addAnswer ()
 
 addHiddenItemsFromArray (ilConfirmationGUI $gui, $array, $curPath=[])
 
 setCorrectionTabsContext (assQuestionGUI $question_gui, string $active_tab_id)
 
 populatePageTitleAndDescription (assQuestionGUI $question_gui)
 
 checkQuestion ()
 
 getQuestionGUI (int $question_id)
 
 getSolutions (assQuestion $question)
 
 getQuestions ()
 
 supportsAdjustment (\assQuestionGUI $question_object)
 Returns if the given question object support scoring adjustment. More...
 

Private Member Functions

 getSolutionsByParticipantResults (assQuestion $question, array $participant_results)
 

Private Attributes

assQuestionGUI $question_gui = null
 
ilTestAccess $test_access
 

Detailed Description

Definition at line 36 of file class.ilTestCorrectionsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestCorrectionsGUI::__construct ( private readonly ilDBInterface  $database,
private readonly ilCtrlInterface  $ctrl,
private readonly ilLanguage  $language,
private readonly ilTabsGUI  $tabs,
private readonly ilHelpGUI  $help,
private readonly UIFactory  $ui_factory,
private readonly ilGlobalTemplateInterface  $main_tpl,
private readonly RefineryFactory  $refinery,
private readonly TestLogger  $logger,
private readonly RequestDataCollector  $testrequest,
private readonly ilObjTest  $test_obj,
private readonly ilObjUser  $scorer 
)

Definition at line 41 of file class.ilTestCorrectionsGUI.php.

References getQuestionGUI().

54  {
55  $question_id = $this->testrequest->getQuestionId();
56  if ($question_id !== 0) {
57  $this->question_gui = $this->getQuestionGUI($question_id);
58  }
59  $this->test_access = new ilTestAccess($test_obj->getRefId());
60  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addAnswer()

ilTestCorrectionsGUI::addAnswer ( )
protected

Definition at line 264 of file class.ilTestCorrectionsGUI.php.

References $data, ILIAS\Repository\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\logger(), ILIAS\Test\Logging\QUESTION_MODIFIED_IN_CORRECTIONS, ILIAS\Repository\refinery(), and showAnswerStatistic().

265  {
266  $form = (new ilAddAnswerFormBuilder(
267  $this->ui_factory,
268  $this->refinery,
269  $this->language,
270  $this->ctrl
271  ))->buildAddAnswerModal('')
272  ->withRequest($this->testrequest->getRequest());
273 
274  $data = $form->getData();
275 
276  $question_index = $data['question_index'];
277  $answer_value = $data['answer_value'];
278  $points = $data['points'];
279 
280  if (!$points) {
281  $this->main_tpl->setOnScreenMessage('failure', $this->language->txt('err_no_numeric_value'));
282  $this->showAnswerStatistic();
283  return;
284  }
285 
286  $question = $this->question_gui->getObject();
287  if ($question->isAddableAnswerOptionValue($question_index, $answer_value)) {
288  $question->addAnswerOptionValue($question_index, $answer_value, $points);
289  $question->saveToDb();
290  }
291 
292  $scoring = new TestScoring(
293  $this->test_obj,
294  $this->scorer,
295  $this->database,
296  $this->language
297  );
298  $scoring->setPreserveManualScores(true);
299  $scoring->setQuestionId($question_index);
300  $participant_results = $scoring->recalculateSolutions();
301 
302  if ($this->logger->isLoggingEnabled()) {
303  $this->logger->logQuestionAdministrationInteraction(
304  $question->toQuestionAdministrationInteraction(
305  $this->logger->getAdditionalInformationGenerator(),
306  $this->test_obj->getRefId(),
308  )
309  );
310  }
311 
312  $this->main_tpl->setOnScreenMessage('success', $this->language->txt('saved_successfully'));
313  $this->showAnswerStatistic($participant_results);
314  }
showAnswerStatistic(?array $participant_results=null)
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ addHiddenItemsFromArray()

ilTestCorrectionsGUI::addHiddenItemsFromArray ( ilConfirmationGUI  $gui,
  $array,
  $curPath = [] 
)
protected

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

References ilConfirmationGUI\addHiddenItem().

Referenced by confirmManualScoringReset().

317  {
318  foreach ($array as $name => $value) {
319  if ($name == 'cmd' && !count($curPath)) {
320  continue;
321  }
322 
323  if (count($curPath)) {
324  $name = "[{$name}]";
325  }
326 
327  if (is_array($value)) {
328  $nextPath = array_merge($curPath, [$name]);
329  $this->addHiddenItemsFromArray($gui, $value, $nextPath);
330  } else {
331  $postVar = implode('', $curPath) . $name;
332  $gui->addHiddenItem($postVar, $value);
333  }
334  }
335  }
addHiddenItem(string $a_post_var, string $a_value)
addHiddenItemsFromArray(ilConfirmationGUI $gui, $array, $curPath=[])
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildQuestionCorrectionForm()

ilTestCorrectionsGUI::buildQuestionCorrectionForm ( assQuestionGUI  $question_gui)
protected

Definition at line 90 of file class.ilTestCorrectionsGUI.php.

References ILIAS\Repository\ctrl(), assQuestionGUI\getObject(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and assQuestionGUI\populateCorrectionsFormProperties().

Referenced by saveQuestion(), and showQuestion().

91  {
92  $form = new ilPropertyFormGUI();
93  $form->setFormAction($this->ctrl->getFormAction($this));
94  $form->setId('tst_question_correction');
95 
96  $form->setTitle($this->language->txt('tst_corrections_qst_form'));
97 
98  $question_gui->populateCorrectionsFormProperties($form);
99 
100  $scoring = new TestScoring(
101  $this->test_obj,
102  $this->scorer,
103  $this->database,
104  $this->language
105  );
106  $scoring->setQuestionId($question_gui->getObject()->getId());
107 
108  if ($scoring->getNumManualScorings()) {
109  $form->addCommandButton('confirmManualScoringReset', $this->language->txt('save'));
110  } else {
111  $form->addCommandButton('saveQuestion', $this->language->txt('save'));
112  }
113 
114  return $form;
115  }
populateCorrectionsFormProperties(ilPropertyFormGUI $form)
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkQuestion()

ilTestCorrectionsGUI::checkQuestion ( )
protected

Definition at line 380 of file class.ilTestCorrectionsGUI.php.

References supportsAdjustment().

Referenced by executeCommand().

380  : bool
381  {
382  if (!$this->test_obj->isTestQuestion($this->question_gui->getObject()->getId())) {
383  return false;
384  }
385 
386  if (!$this->supportsAdjustment($this->question_gui)) {
387  return false;
388  }
389 
390  return true;
391  }
supportsAdjustment(\assQuestionGUI $question_object)
Returns if the given question object support scoring adjustment.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmManualScoringReset()

ilTestCorrectionsGUI::confirmManualScoringReset ( )
protected

Definition at line 117 of file class.ilTestCorrectionsGUI.php.

References addHiddenItemsFromArray(), ILIAS\Repository\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and setCorrectionTabsContext().

118  {
119  $this->setCorrectionTabsContext($this->question_gui, 'question');
120 
121  $scoring = new TestScoring(
122  $this->test_obj,
123  $this->scorer,
124  $this->database,
125  $this->language
126  );
127  $scoring->setQuestionId($this->question_gui->getObject()->getId());
128 
129  $confirmation = sprintf(
130  $this->language->txt('tst_corrections_manscore_reset_warning'),
131  $scoring->getNumManualScorings(),
132  $this->question_gui->getObject()->getTitleForHTMLOutput(),
133  $this->question_gui->getObject()->getId()
134  );
135 
136  $gui = new ilConfirmationGUI();
137  $gui->setHeaderText($confirmation);
138  $gui->setFormAction($this->ctrl->getFormAction($this));
139  $gui->setCancel($this->language->txt('cancel'), 'showQuestion');
140  $gui->setConfirm($this->language->txt('confirm'), 'saveQuestion');
141 
142  $this->addHiddenItemsFromArray($gui, $this->testrequest->getParsedBody());
143 
144  $this->main_tpl->setContent($gui->getHTML());
145  }
setCorrectionTabsContext(assQuestionGUI $question_gui, string $active_tab_id)
addHiddenItemsFromArray(ilConfirmationGUI $gui, $array, $curPath=[])
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:

◆ executeCommand()

ilTestCorrectionsGUI::executeCommand ( )

Definition at line 62 of file class.ilTestCorrectionsGUI.php.

References checkQuestion(), ILIAS\Repository\ctrl(), and ILIAS\Repository\int().

63  {
64  if (!$this->test_access->checkCorrectionsAccess()
65  || $this->question_gui !== null
66  && !$this->checkQuestion()) {
67  ilObjTestGUI::accessViolationRedirect();
68  }
69 
70  if ($this->testrequest->isset('removeQid') && (int) $this->testrequest->raw('removeQid')) {
71  $this->confirmQuestionRemoval();
72  return;
73  }
74 
75  $this->ctrl->saveParameterByClass(self::class, 'q_id');
76  $command = $this->ctrl->getCmd('showQuestionList');
77  $this->{$command}();
78  }
+ Here is the call graph for this function:

◆ getQuestionGUI()

ilTestCorrectionsGUI::getQuestionGUI ( int  $question_id)
protected

Definition at line 398 of file class.ilTestCorrectionsGUI.php.

References $question_gui, assQuestionGUI\getObject(), and assQuestionGUI\setObject().

Referenced by __construct(), and getQuestions().

398  : ?assQuestionGUI
399  {
400  $question_gui = assQuestion::instantiateQuestionGUI($question_id);
401  if ($question_gui === null) {
402  return null;
403  }
404  $question = $question_gui->getObject();
405  $question->setPoints($question_gui->getObject()->getMaximumPoints());
406  $question_gui->setObject($question);
407  return $question_gui;
408  }
setObject(assQuestion $question)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestions()

ilTestCorrectionsGUI::getQuestions ( )
protected

Definition at line 447 of file class.ilTestCorrectionsGUI.php.

References $c, getQuestionGUI(), and supportsAdjustment().

447  : array
448  {
449 
450  if (!$this->test_obj->getGlobalSettings()->isAdjustingQuestionsWithResultsAllowed()) {
451  return [];
452  }
453 
454  return array_reduce(
455  $this->test_obj->getTestQuestions(),
456  function (array $c, array $v): array {
457  $question_gui = $this->getQuestionGUI($v['question_id']);
458 
459  if (!$this->supportsAdjustment($question_gui)) {
460  return $c;
461  }
462 
463  $c[] = $v;
464  return $c;
465  },
466  []
467  );
468  }
$c
Definition: deliver.php:9
supportsAdjustment(\assQuestionGUI $question_object)
Returns if the given question object support scoring adjustment.
+ Here is the call graph for this function:

◆ getRefId()

ilTestCorrectionsGUI::getRefId ( )

Definition at line 393 of file class.ilTestCorrectionsGUI.php.

393  : int
394  {
395  return $this->test_obj->getRefId();
396  }

◆ getSolutions()

ilTestCorrectionsGUI::getSolutions ( assQuestion  $question)
protected

Definition at line 410 of file class.ilTestCorrectionsGUI.php.

References assQuestion\getSolutionValues().

Referenced by showAnswerStatistic().

410  : array
411  {
412  $solution_rows = [];
413 
414  foreach (array_keys($this->test_obj->getParticipants()) as $active_id) {
415  $passes_selector = new ilTestPassesSelector($this->database, $this->test_obj);
416  $passes_selector->setActiveId($active_id);
417  $passes_selector->loadLastFinishedPass();
418 
419  foreach ($passes_selector->getClosedPasses() as $pass) {
420  foreach ($question->getSolutionValues($active_id, $pass) as $row) {
421  $solution_rows[] = $row;
422  }
423  }
424  }
425 
426  return $solution_rows;
427  }
getSolutionValues(int $active_id, ?int $pass=null, bool $authorized=true)
Loads solutions of a given user from the database an returns it.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSolutionsByParticipantResults()

ilTestCorrectionsGUI::getSolutionsByParticipantResults ( assQuestion  $question,
array  $participant_results 
)
private
Parameters
list<ilTestEvaluationUserData>$participant_results

Definition at line 432 of file class.ilTestCorrectionsGUI.php.

References assQuestion\getSolutionValues().

Referenced by showAnswerStatistic().

432  : array
433  {
434  $solutions = [];
435 
436  foreach ($participant_results as $active_id => $result) {
437  foreach ($result->getPasses() as $pass) {
438  foreach ($question->getSolutionValues($active_id, $pass->getPass()) as $row) {
439  $solutions[] = $row;
440  }
441  }
442  }
443 
444  return $solutions;
445  }
getSolutionValues(int $active_id, ?int $pass=null, bool $authorized=true)
Loads solutions of a given user from the database an returns it.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populatePageTitleAndDescription()

ilTestCorrectionsGUI::populatePageTitleAndDescription ( assQuestionGUI  $question_gui)
protected

Definition at line 374 of file class.ilTestCorrectionsGUI.php.

References assQuestionGUI\getObject(), and assQuestionGUI\outQuestionType().

Referenced by showAnswerStatistic(), showQuestion(), and showSolution().

374  : void
375  {
376  $this->main_tpl->setTitle($question_gui->getObject()->getTitleForHTMLOutput());
377  $this->main_tpl->setDescription($question_gui->outQuestionType());
378  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveQuestion()

ilTestCorrectionsGUI::saveQuestion ( )
protected

Definition at line 147 of file class.ilTestCorrectionsGUI.php.

References $question_gui, buildQuestionCorrectionForm(), ILIAS\Repository\ctrl(), assQuestionGUI\getObject(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\logger(), assQuestionGUI\prepareReprintableCorrectionsForm(), ILIAS\Test\Logging\QUESTION_MODIFIED_IN_CORRECTIONS, assQuestionGUI\saveCorrectionsFormProperties(), assQuestionGUI\setObject(), and showQuestion().

148  {
151  $form->setValuesByPost();
152 
153  if (!$form->checkInput()) {
155 
156  $this->showQuestion($form);
157  return;
158  }
159 
161  $question = $question_gui->getObject();
162  $question->setPoints($question_gui->getObject()->getMaximumPoints());
163  $question_gui->setObject($question);
164  $question_gui->getObject()->saveToDb();
165 
166  $scoring = new TestScoring(
167  $this->test_obj,
168  $this->scorer,
169  $this->database,
170  $this->language
171  );
172  $scoring->setPreserveManualScores(false);
173  $scoring->setQuestionId($question_gui->getObject()->getId());
174  $scoring->recalculateSolutions();
175 
176  if ($this->logger->isLoggingEnabled()) {
177  $this->logger->logQuestionAdministrationInteraction(
178  $question_gui->getObject()->toQuestionAdministrationInteraction(
179  $this->logger->getAdditionalInformationGenerator(),
180  $this->test_obj->getRefId(),
182  )
183  );
184  }
185 
186  $this->main_tpl->setOnScreenMessage('success', $this->language->txt('saved_successfully'), true);
187  $this->ctrl->redirectByClass([ilObjTestGUI::class, self::class], 'showQuestion');
188  }
saveCorrectionsFormProperties(ilPropertyFormGUI $form)
setObject(assQuestion $question)
prepareReprintableCorrectionsForm(ilPropertyFormGUI $form)
buildQuestionCorrectionForm(assQuestionGUI $question_gui)
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
showQuestion(ilPropertyFormGUI $form=null)
+ Here is the call graph for this function:

◆ setCorrectionTabsContext()

ilTestCorrectionsGUI::setCorrectionTabsContext ( assQuestionGUI  $question_gui,
string  $active_tab_id 
)
protected

Definition at line 337 of file class.ilTestCorrectionsGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\help(), assQuestionGUI\isAnswerFrequencyStatisticSupported(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and ILIAS\Repository\tabs().

Referenced by confirmManualScoringReset(), showAnswerStatistic(), showQuestion(), and showSolution().

337  : void
338  {
339  $this->tabs->clearTargets();
340  $this->tabs->clearSubTabs();
341 
342  $this->help->setScreenIdComponent('tst');
343  $this->help->setScreenId('scoringadjust');
344  $this->help->setSubScreenId($active_tab_id);
345 
346  $this->tabs->addTab(
347  'question',
348  $this->language->txt('tst_corrections_tab_question'),
349  $this->ctrl->getLinkTargetByClass([ilObjTestGUI::class, self::class], 'showQuestion')
350  );
351 
352  $this->tabs->addTab(
353  'solution',
354  $this->language->txt('tst_corrections_tab_solution'),
355  $this->ctrl->getLinkTargetByClass([ilObjTestGUI::class, self::class], 'showSolution')
356  );
357 
358  if ($question_gui->isAnswerFrequencyStatisticSupported()) {
359  $this->tabs->addTab(
360  'answers',
361  $this->language->txt('tst_corrections_tab_statistics'),
362  $this->ctrl->getLinkTargetByClass([ilObjTestGUI::class, self::class], 'showAnswerStatistic')
363  );
364  }
365 
366  $this->tabs->setBackTarget(
367  $this->language->txt('back'),
368  $this->ctrl->getLinkTargetByClass(ilObjTestGUI::class, 'showQuestions')
369  );
370 
371  $this->tabs->activateTab($active_tab_id);
372  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAnswerStatistic()

ilTestCorrectionsGUI::showAnswerStatistic ( ?array  $participant_results = null)
protected
Parameters
null|list<ilTestEvaluationUserData>$participant_results

Definition at line 239 of file class.ilTestCorrectionsGUI.php.

References getSolutions(), getSolutionsByParticipantResults(), populatePageTitleAndDescription(), and setCorrectionTabsContext().

Referenced by addAnswer().

239  : void
240  {
241  $solutions = $participant_results
242  ? $this->getSolutionsByParticipantResults($this->question_gui->getObject(), $participant_results)
243  : $this->getSolutions($this->question_gui->getObject());
244 
245  $this->setCorrectionTabsContext($this->question_gui, 'answers');
246 
247  $tablesHtml = '';
248 
249  foreach ($this->question_gui->getSubQuestionsIndex() as $subQuestionIndex) {
250  $table = $this->question_gui->getAnswerFrequencyTableGUI(
251  $this,
252  'showAnswerStatistic',
253  $solutions,
254  $subQuestionIndex
255  );
256 
257  $tablesHtml .= $table->getHTML() . $table->getAdditionalHtml();
258  }
259 
260  $this->populatePageTitleAndDescription($this->question_gui);
261  $this->main_tpl->setContent($tablesHtml);
262  }
getSolutions(assQuestion $question)
setCorrectionTabsContext(assQuestionGUI $question_gui, string $active_tab_id)
getSolutionsByParticipantResults(assQuestion $question, array $participant_results)
populatePageTitleAndDescription(assQuestionGUI $question_gui)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showQuestion()

ilTestCorrectionsGUI::showQuestion ( ilPropertyFormGUI  $form = null)
protected

Definition at line 80 of file class.ilTestCorrectionsGUI.php.

References buildQuestionCorrectionForm(), populatePageTitleAndDescription(), and setCorrectionTabsContext().

Referenced by saveQuestion().

81  {
82  $this->setCorrectionTabsContext($this->question_gui, 'question');
83 
84  $form ??= $this->buildQuestionCorrectionForm($this->question_gui);
85 
86  $this->populatePageTitleAndDescription($this->question_gui);
87  $this->main_tpl->setContent($form->getHTML());
88  }
setCorrectionTabsContext(assQuestionGUI $question_gui, string $active_tab_id)
buildQuestionCorrectionForm(assQuestionGUI $question_gui)
populatePageTitleAndDescription(assQuestionGUI $question_gui)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSolution()

ilTestCorrectionsGUI::showSolution ( )
protected

Definition at line 190 of file class.ilTestCorrectionsGUI.php.

References $question_gui, ilObjStyleSheet\getContentStylePath(), assQuestionGUI\getObject(), assQuestionGUI\getSolutionOutput(), ilObjStyleSheet\getSyntaxStylePath(), populatePageTitleAndDescription(), setCorrectionTabsContext(), and ilPageObjectGUI\setRenderPageContainer().

191  {
193  $page_gui = new ilAssQuestionPageGUI($question_gui->getObject()->getId());
194  $page_gui->setRenderPageContainer(false);
195  $page_gui->setEditPreview(true);
196  $page_gui->setEnabledTabs(false);
197 
198  $solution_html = $question_gui->getSolutionOutput(
199  0,
200  null,
201  false,
202  false,
203  true,
204  false,
205  true,
206  false,
207  true
208  );
209 
210  $page_gui->setQuestionHTML([$question_gui->getObject()->getId() => $solution_html]);
211  $page_gui->setPresentationTitle($question_gui->getObject()->getTitleForHTMLOutput());
212 
213  $tpl = new ilTemplate('tpl.tst_corrections_solution_presentation.html', true, true, 'components/ILIAS/Test');
214  $tpl->setVariable('SOLUTION_PRESENTATION', $page_gui->preview());
215 
216  $this->setCorrectionTabsContext($question_gui, 'solution');
218 
219  $this->main_tpl->setContent($tpl->get());
220 
221  $this->main_tpl->setCurrentBlock("ContentStyle");
222  $this->main_tpl->setVariable(
223  "LOCATION_CONTENT_STYLESHEET",
225  );
226  $this->main_tpl->parseCurrentBlock();
227 
228  $this->main_tpl->setCurrentBlock("SyntaxStyle");
229  $this->main_tpl->setVariable(
230  "LOCATION_SYNTAX_STYLESHEET",
232  );
233  $this->main_tpl->parseCurrentBlock();
234  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRenderPageContainer(bool $a_val)
setCorrectionTabsContext(assQuestionGUI $question_gui, string $active_tab_id)
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
getSolutionOutput(int $active_id, ?int $pass=null, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_inline_feedback=true)
populatePageTitleAndDescription(assQuestionGUI $question_gui)
+ Here is the call graph for this function:

◆ supportsAdjustment()

ilTestCorrectionsGUI::supportsAdjustment ( \assQuestionGUI  $question_object)
protected

Returns if the given question object support scoring adjustment.

Parameters
$question_objectassQuestionGUI
Returns
bool True, if relevant interfaces are implemented to support scoring adjustment.

Definition at line 477 of file class.ilTestCorrectionsGUI.php.

References assQuestionGUI\getObject().

Referenced by checkQuestion(), and getQuestions().

477  : bool
478  {
479  return ($question_object instanceof ilGuiQuestionScoringAdjustable
480  || $question_object instanceof ilGuiAnswerScoringAdjustable)
481  && ($question_object->getObject() instanceof ilObjQuestionScoringAdjustable
482  || $question_object->getObject() instanceof ilObjAnswerScoringAdjustable);
483  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $question_gui

assQuestionGUI ilTestCorrectionsGUI::$question_gui = null
private

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

Referenced by getQuestionGUI(), saveQuestion(), and showSolution().

◆ $test_access

ilTestAccess ilTestCorrectionsGUI::$test_access
private

Definition at line 39 of file class.ilTestCorrectionsGUI.php.


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