ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour Class Reference
+ Inheritance diagram for ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour:
+ Collaboration diagram for ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour:

Public Member Functions

 __construct (protected int $question_title_output_mode, protected bool $autosave_enabled, protected int $autosave_interval, protected bool $shuffle_questions, protected bool $instant_feedback_points_enabled, protected bool $instant_feedback_generic_enabled, protected bool $instant_feedback_specific_enabled, protected bool $instant_feedback_solution_enabled, protected bool $force_instant_feedback_on_next_question, protected bool $lock_answer_on_instant_feedback, protected bool $lock_answer_on_next_question)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 getQuestionTitleOutputMode ()
 
 withQuestionTitleOutputMode (int $question_title_output_mode)
 
 getAutosaveEnabled ()
 
 withAutosaveEnabled (bool $autosave_enabled)
 
 getAutosaveInterval ()
 
 withAutosaveInterval (int $autosave_interval)
 
 getShuffleQuestions ()
 
 withShuffleQuestions (bool $shuffle_questions)
 
 getInstantFeedbackPointsEnabled ()
 
 withInstantFeedbackPointsEnabled (bool $instant_feedback_points_enabled)
 
 getInstantFeedbackGenericEnabled ()
 
 withInstantFeedbackGenericEnabled (bool $instant_feedback_generic_enabled)
 
 getInstantFeedbackSpecificEnabled ()
 
 withInstantFeedbackSpecificEnabled (bool $instant_feedback_specific_enabled)
 
 getInstantFeedbackSolutionEnabled ()
 
 withInstantFeedbackSolutionEnabled (bool $instant_feedback_solution_enabled)
 
 getForceInstantFeedbackOnNextQuestion ()
 
 withForceInstantFeedbackOnNextQuestion (bool $force_instant_feedback_on_next_question)
 
 getLockAnswerOnInstantFeedbackEnabled ()
 
 withLockAnswerOnInstantFeedbackEnabled (bool $lock_answer_on_instant_feedback)
 
 getLockAnswerOnNextQuestionEnabled ()
 
 withLockAnswerOnNextQuestionEnabled (bool $lock_answer_on_next_question)
 
 toExport ()
 Transform the object into a simple, associative array. More...
 
- Public Member Functions inherited from ILIAS\Test\Settings\TestSettings
 __construct ()
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 toExport ()
 Transform the object into a simple, associative array. More...
 

Static Public Member Functions

static fromExport (array $data)
 Creates an instance of the object from an array. More...
 
static fromExport (array $data)
 Creates an instance of the object from an array. More...
 

Data Fields

const ANSWER_FIXATION_NONE = 'none'
 
const ANSWER_FIXATION_ON_IFB_OR_FUQST = 'ifb_or_fuqst'
 

Private Member Functions

 getInputAutosave (\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
 
 getInputInstantFeedback (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
 
 getSubInputInstantFeedback (\ilLanguage $lng, FieldFactory $f, array $environment)
 
 getInputLockAnswers (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
 
 getTransformationLockAnswers (Refinery $refinery)
 
 getShuffleAndLockAnswersConstraint (\ilLanguage $lng, Refinery $refinery)
 
 isAnyInstantFeedbackOptionEnabled ()
 
 getAnswerFixationSettingsAsFormValue ()
 

Private Attributes

const DEFAULT_AUTOSAVE_INTERVAL = 30000
 

Detailed Description

Definition at line 34 of file SettingsQuestionBehaviour.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::__construct ( protected int  $question_title_output_mode,
protected bool  $autosave_enabled,
protected int  $autosave_interval,
protected bool  $shuffle_questions,
protected bool  $instant_feedback_points_enabled,
protected bool  $instant_feedback_generic_enabled,
protected bool  $instant_feedback_specific_enabled,
protected bool  $instant_feedback_solution_enabled,
protected bool  $force_instant_feedback_on_next_question,
protected bool  $lock_answer_on_instant_feedback,
protected bool  $lock_answer_on_next_question 
)

Definition at line 41 of file SettingsQuestionBehaviour.php.

53 {
55 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ fromExport()

static ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::fromExport ( array  $data)
static

Creates an instance of the object from an array.

This static factory method is responsible for constructing a new object instance from the provided array data. It should validate the input and may throw an exception if the data is incomplete or malformed.

Parameters
ExportableArray$dataThe data to restore the object from
Returns
static A new instance of the class

Implements ILIAS\Test\ExportImport\Exportable.

Definition at line 568 of file SettingsQuestionBehaviour.php.

568 : static
569 {
570 return new self(
571 (int) $data['title_output_mode'],
572 (bool) $data['autosave_enabled'],
573 (int) $data['autosave_interval'],
574 (bool) $data['shuffle_questions'],
575 (bool) $data['instant_feedback_points_enabled'],
576 (bool) $data['instant_feedback_generic_enabled'],
577 (bool) $data['instant_feedback_specific_enabled'],
578 (bool) $data['instant_feedback_solution_enabled'],
579 (bool) $data['force_instant_feedback'],
580 (bool) $data['lock_answer_instant_feedback'],
581 (bool) $data['lock_answer_next_question']
582 );
583 }

References $data, and ILIAS\Repository\int().

Referenced by ILIAS\Test\Settings\MainSettings\MainSettings\fromExport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAnswerFixationSettingsAsFormValue()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getAnswerFixationSettingsAsFormValue ( )
private

◆ getAutosaveEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getAutosaveEnabled ( )

Definition at line 408 of file SettingsQuestionBehaviour.php.

408 : bool
409 {
410 return $this->autosave_enabled;
411 }

◆ getAutosaveInterval()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getAutosaveInterval ( )

Definition at line 420 of file SettingsQuestionBehaviour.php.

420 : int
421 {
422 return $this->autosave_interval;
423 }

◆ getForceInstantFeedbackOnNextQuestion()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getForceInstantFeedbackOnNextQuestion ( )

Definition at line 500 of file SettingsQuestionBehaviour.php.

500 : bool
501 {
502 return $this->force_instant_feedback_on_next_question;
503 }

◆ getInputAutosave()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInputAutosave ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery 
)
private

Definition at line 97 of file SettingsQuestionBehaviour.php.

101 : OptionalGroup {
102 $trafo = $refinery->custom()->transformation(
103 static function (?array $vs): array {
104 if ($vs === null) {
105 return [
106 'autosave_enabled' => false,
107 'autosave_interval' => self::DEFAULT_AUTOSAVE_INTERVAL
108 ];
109 }
110
111 return [
112 'autosave_enabled' => true,
113 'autosave_interval' => $vs['autosave_interval'] * 1000
114 ];
115 }
116 );
117 $sub_inputs_autosave['autosave_interval'] = $f->numeric($lng->txt('autosave_ival'), $lng->txt('seconds'))
118 ->withRequired(true)
119 ->withAdditionalTransformation($refinery->int()->isGreaterThan(0))
120 ->withValue(
121 $this->getAutosaveInterval() !== 0
122 ? $this->getAutosaveInterval() / 1000
123 : 30
124 );
125
126 $autosave_input = $f->optionalGroup(
127 $sub_inputs_autosave,
128 $lng->txt('autosave'),
129 $lng->txt('autosave_info')
130 )->withValue(null)
131 ->withAdditionalTransformation($trafo);
132
133 if (!$this->getAutosaveEnabled()) {
134 return $autosave_input;
135 }
136
137 return $autosave_input->withValue(['autosave_interval' => $this->getAutosaveInterval() / 1000]);
138 }
global $lng
Definition: privfeed.php:31

◆ getInputInstantFeedback()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInputInstantFeedback ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
array  $environment 
)
private

Definition at line 140 of file SettingsQuestionBehaviour.php.

145 : OptionalGroup {
146 $constraint = $refinery->custom()->constraint(
147 fn(?array $vs) => $vs === null
148 || $vs['enabled_feedback_types']['instant_feedback_specific'] === null
149 && $vs['enabled_feedback_types']['instant_feedback_generic'] === null
150 && $vs['enabled_feedback_types']['instant_feedback_points'] === null
151 && $vs['enabled_feedback_types']['instant_feedback_solution'] === null
152 && $vs['feedback_trigger'] === null
153 || (
154 $vs['enabled_feedback_types']['instant_feedback_specific'] === true
155 || $vs['enabled_feedback_types']['instant_feedback_generic'] === true
156 || $vs['enabled_feedback_types']['instant_feedback_points'] === true
157 || $vs['enabled_feedback_types']['instant_feedback_solution'] === true
158 )
159 && $vs['feedback_trigger'] !== '',
160 $lng->txt('select_at_least_one_feedback_type_and_trigger')
161 );
162 $trafo = $refinery->custom()->transformation(
163 static function (?array $vs): array {
164 if ($vs === null) {
165 return [
166 'enabled_feedback_types' => [
167 'instant_feedback_specific' => false,
168 'instant_feedback_generic' => false,
169 'instant_feedback_points' => false,
170 'instant_feedback_solution' => false
171 ],
172 'feedback_on_next_question' => false
173 ];
174 }
175
176 $vs['feedback_on_next_question'] = $vs['feedback_trigger'] === '1';
177 return $vs;
178 }
179 );
180
181 $instant_feedback = $f->optionalGroup(
182 $this->getSubInputInstantFeedback($lng, $f, $environment),
183 $lng->txt('tst_instant_feedback'),
184 $lng->txt('tst_instant_feedback_desc')
185 )->withValue(null)
186 ->withAdditionalTransformation($constraint)
187 ->withAdditionalTransformation($trafo);
188
190 $instant_feedback = $instant_feedback->withValue(
191 [
192 'enabled_feedback_types' => [
193 'instant_feedback_specific' => (bool) $this->getInstantFeedbackSpecificEnabled(),
194 'instant_feedback_generic' => (bool) $this->getInstantFeedbackGenericEnabled(),
195 'instant_feedback_points' => (bool) $this->getInstantFeedbackPointsEnabled(),
196 'instant_feedback_solution' => (bool) $this->getInstantFeedbackSolutionEnabled()
197 ],
198 'feedback_trigger' => ($this->getForceInstantFeedbackOnNextQuestion() ? '1' : '0')
199 ]
200 );
201 }
202
203 if (!$environment['participant_data_exists']) {
204 return $instant_feedback;
205 }
206
207 return $instant_feedback->withDisabled(true);
208 }
getSubInputInstantFeedback(\ilLanguage $lng, FieldFactory $f, array $environment)

◆ getInputLockAnswers()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInputLockAnswers ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
array  $environment 
)
private

Definition at line 260 of file SettingsQuestionBehaviour.php.

265 : SwitchableGroup {
266 $constraint = $refinery->custom()->constraint(
267 static fn(?array $vs): bool => $vs === null || $vs[0] === 'none' || array_filter($vs[1]) !== [],
268 $lng->txt('select_at_least_one_lock_answer_type')
269 );
270
271 $group1 = $f->group([], $lng->txt('tst_answer_fixation_none'));
272
273 $group2 = $f->group(
274 [
275 'lock_answer_on_instant_feedback' => $f->checkbox(
276 $lng->txt('tst_answer_fixation_on_instant_feedback'),
277 $lng->txt('tst_answer_fixation_on_instant_feedback_desc')
278 ),
279 'lock_answer_on_next_question' => $f->checkbox(
280 $lng->txt('tst_answer_fixation_on_followup_question'),
281 $lng->txt('tst_answer_fixation_on_followup_question_desc')
282 )
283 ],
284 $lng->txt('tst_answer_fixation'),
285 $lng->txt('tst_answer_fixation_on_instantfb_or_followupqst_desc')
286 );
287
288 return $f->switchableGroup(
289 [self::ANSWER_FIXATION_NONE => $group1, self::ANSWER_FIXATION_ON_IFB_OR_FUQST => $group2],
290 $lng->txt('tst_answer_fixation_handling')
291 )->withRequired(!$environment['participant_data_exists'])
292 ->withAdditionalTransformation($constraint)
293 ->withAdditionalTransformation($this->getTransformationLockAnswers($refinery))
294 ->withValue($this->getAnswerFixationSettingsAsFormValue())
295 ->withDisabled($environment['participant_data_exists']);
296 }

◆ getInstantFeedbackGenericEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInstantFeedbackGenericEnabled ( )

Definition at line 456 of file SettingsQuestionBehaviour.php.

456 : bool
457 {
458 return $this->instant_feedback_generic_enabled;
459 }

◆ getInstantFeedbackPointsEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInstantFeedbackPointsEnabled ( )

Definition at line 444 of file SettingsQuestionBehaviour.php.

444 : bool
445 {
446 return $this->instant_feedback_points_enabled;
447 }

◆ getInstantFeedbackSolutionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInstantFeedbackSolutionEnabled ( )

Definition at line 480 of file SettingsQuestionBehaviour.php.

480 : bool
481 {
482 return $this->instant_feedback_solution_enabled;
483 }

◆ getInstantFeedbackSpecificEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getInstantFeedbackSpecificEnabled ( )

Definition at line 468 of file SettingsQuestionBehaviour.php.

468 : bool
469 {
470 return $this->instant_feedback_specific_enabled;
471 }

◆ getLockAnswerOnInstantFeedbackEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getLockAnswerOnInstantFeedbackEnabled ( )

Definition at line 512 of file SettingsQuestionBehaviour.php.

512 : bool
513 {
514 return $this->lock_answer_on_instant_feedback;
515 }

◆ getLockAnswerOnNextQuestionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getLockAnswerOnNextQuestionEnabled ( )

Definition at line 524 of file SettingsQuestionBehaviour.php.

524 : bool
525 {
526 return $this->lock_answer_on_next_question;
527 }

◆ getQuestionTitleOutputMode()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getQuestionTitleOutputMode ( )

Definition at line 396 of file SettingsQuestionBehaviour.php.

396 : int
397 {
398 return $this->question_title_output_mode;
399 }

◆ getShuffleAndLockAnswersConstraint()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getShuffleAndLockAnswersConstraint ( \ilLanguage  $lng,
Refinery  $refinery 
)
private

Definition at line 307 of file SettingsQuestionBehaviour.php.

310 : Constraint {
311 return $refinery->custom()->constraint(
312 function ($vs): bool {
313 if ($vs['shuffle_questions'] === true
314 && ($vs['lock_answers']['lock_answer_on_next_question'] ?? $this->getLockAnswerOnNextQuestionEnabled())) {
315 return false;
316 }
317 return true;
318 },
319 $lng->txt('tst_settings_conflict_shuffle_and_lock'),
320 );
321 }

◆ getShuffleQuestions()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getShuffleQuestions ( )

Definition at line 432 of file SettingsQuestionBehaviour.php.

432 : bool
433 {
434 return $this->shuffle_questions;
435 }

◆ getSubInputInstantFeedback()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getSubInputInstantFeedback ( \ilLanguage  $lng,
FieldFactory  $f,
array  $environment 
)
private

Definition at line 210 of file SettingsQuestionBehaviour.php.

214 : array {
215 $feedback_options = [
216 'instant_feedback_points' => $f->checkbox(
217 $lng->txt('tst_instant_feedback_results'),
218 $lng->txt('tst_instant_feedback_results_desc')
219 ),
220 'instant_feedback_generic' => $f->checkbox(
221 $lng->txt('tst_instant_feedback_answer_generic'),
222 $lng->txt('tst_instant_feedback_answer_generic_desc')
223 ),
224 'instant_feedback_specific' => $f->checkbox(
225 $lng->txt('tst_instant_feedback_answer_specific'),
226 $lng->txt('tst_instant_feedback_answer_specific_desc')
227 ),
228 'instant_feedback_solution' => $f->checkbox(
229 $lng->txt('tst_instant_feedback_solution'),
230 $lng->txt('tst_instant_feedback_solution_desc')
231 )
232 ];
233
234 $sub_inputs_feedback['enabled_feedback_types'] = $f->group(
235 $feedback_options,
236 $lng->txt('tst_instant_feedback_contents')
237 );
238
239 $sub_inputs_feedback['feedback_trigger'] = $f->radio(
240 $lng->txt('tst_instant_feedback_trigger')
241 )->withOption(
242 '0',
243 $lng->txt('tst_instant_feedback_trigger_manual'),
244 $lng->txt('tst_instant_feedback_trigger_manual_desc')
245 )->withOption(
246 '1',
247 $lng->txt('tst_instant_feedback_trigger_forced'),
248 $lng->txt('tst_instant_feedback_trigger_forced_desc')
249 );
250
251 if (!$environment['participant_data_exists']) {
252 $sub_inputs_feedback['feedback_trigger'] = $sub_inputs_feedback['feedback_trigger']
253 ->withRequired(true);
254 }
255 return $sub_inputs_feedback;
256
257
258 }

◆ getTransformationLockAnswers()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::getTransformationLockAnswers ( Refinery  $refinery)
private

Definition at line 298 of file SettingsQuestionBehaviour.php.

298 : Transformation
299 {
300 return $refinery->custom()->transformation(
301 static fn(?array $v): array => ($v[0] ?? null) === self::ANSWER_FIXATION_ON_IFB_OR_FUQST
302 ? $v[1]
303 : ['lock_answer_on_instant_feedback' => false, 'lock_answer_on_next_question' => false]
304 );
305 }

References ILIAS\UI\examples\Layout\Page\Mail\$refinery.

◆ isAnyInstantFeedbackOptionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::isAnyInstantFeedbackOptionEnabled ( )
private

Definition at line 492 of file SettingsQuestionBehaviour.php.

492 : bool
493 {
494 return $this->getInstantFeedbackPointsEnabled()
498 }

◆ toExport()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::toExport ( )

Transform the object into a simple, associative array.

The resulting array represents the object's state and should contain only scalar values, arrays, or other Exportable objects.

Returns
ExportableArray The exportable array representation of the object

Implements ILIAS\Test\ExportImport\Exportable.

Definition at line 551 of file SettingsQuestionBehaviour.php.

551 : array
552 {
553 return [
554 'title_output_mode' => $this->getQuestionTitleOutputMode(),
555 'autosave_enabled' => $this->getAutosaveEnabled(),
556 'autosave_interval' => $this->getAutosaveInterval(),
557 'shuffle_questions' => $this->getShuffleQuestions(),
558 'instant_feedback_points_enabled' => $this->getInstantFeedbackPointsEnabled(),
559 'instant_feedback_generic_enabled' => $this->getInstantFeedbackGenericEnabled(),
560 'instant_feedback_specific_enabled' => $this->getInstantFeedbackSpecificEnabled(),
561 'instant_feedback_solution_enabled' => $this->getInstantFeedbackSolutionEnabled(),
562 'force_instant_feedback' => $this->getForceInstantFeedbackOnNextQuestion(),
563 'lock_answer_instant_feedback' => $this->getLockAnswerOnInstantFeedbackEnabled(),
564 'lock_answer_next_question' => $this->getLockAnswerOnNextQuestionEnabled()
565 ];
566 }

◆ toForm()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
?array  $environment = null 
)
Returns
array<ILIAS\UI\Component\Input\Field\Input>

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 61 of file SettingsQuestionBehaviour.php.

66 : FormInput {
67 $inputs['title_output'] = $f->radio(
68 $lng->txt('tst_title_output'),
69 $lng->txt('tst_title_output_info')
70 )->withOption('0', $lng->txt('tst_title_output_full'))
71 ->withOption('1', $lng->txt('tst_title_output_hide_points'))
72 ->withOption('3', $lng->txt('tst_title_output_only_points'))
73 ->withOption('2', $lng->txt('tst_title_output_no_title'))
74 ->withValue($this->getQuestionTitleOutputMode())
75 ->withAdditionalTransformation($refinery->kindlyTo()->int());
76
77 $inputs['autosave'] = $this->getInputAutosave($lng, $f, $refinery);
78
79 $inputs['shuffle_questions'] = $f->checkbox(
80 $lng->txt('tst_shuffle_questions'),
81 $lng->txt('tst_shuffle_questions_description')
82 )->withValue($this->getShuffleQuestions());
83
84 if ($environment['participant_data_exists']) {
85 $inputs['shuffle_questions'] = $inputs['shuffle_questions']->withDisabled(true);
86 }
87
88 $inputs['instant_feedback'] = $this->getInputInstantFeedback($lng, $f, $refinery, $environment);
89 $inputs['lock_answers'] = $this->getInputLockAnswers($lng, $f, $refinery, $environment);
90
91 $section = $f->section($inputs, $lng->txt('tst_presentation_properties'))
92 ->withAdditionalTransformation($this->getShuffleAndLockAnswersConstraint($lng, $refinery));
93
94 return $section;
95 }
getInputAutosave(\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
getInputInstantFeedback(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
getShuffleAndLockAnswersConstraint(\ilLanguage $lng, Refinery $refinery)
getInputLockAnswers(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)

◆ toLog()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::toLog ( AdditionalInformationGenerator  $additional_info)

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 340 of file SettingsQuestionBehaviour.php.

340 : array
341 {
342
343 switch ($this->getQuestionTitleOutputMode()) {
344 case 0:
346 ->getTagForLangVar('tst_title_output_full');
347 break;
348 case 1:
350 ->getTagForLangVar('tst_title_output_hide_points');
351 break;
352 case 2:
354 ->getTagForLangVar('tst_title_output_no_title');
355 break;
356 case 3:
358 ->getTagForLangVar('tst_title_output_only_points');
359 break;
360 }
362 ? $this->getAutosaveInterval() / 1000 . ' ' . $additional_info->getTagForLangVar('seconds') : $additional_info->getEnabledDisabledTagForBool(false);
365
378 ? $additional_info->getTagForLangVar('tst_instant_feedback_trigger_forced')
379 : $additional_info->getTagForLangVar('tst_instant_feedback_trigger_manual');
380 }
381
382 $lock_answers = $additional_info->getTagForLangVar('tst_answer_fixation_none');
385 $lock_answers = $additional_info->getTagForLangVar('tst_answer_fixation_on_instantfb_or_followupqst');
386 } elseif ($this->getLockAnswerOnInstantFeedbackEnabled()) {
387 $lock_answers = $additional_info->getTagForLangVar('tst_answer_fixation_on_instant_feedback');
388 } elseif ($this->getLockAnswerOnNextQuestionEnabled()) {
389 $lock_answers = $additional_info->getTagForLangVar('tst_answer_fixation_on_followup_question');
390 }
392
393 return $log_array;
394 }

References ILIAS\Test\Logging\AdditionalInformationGenerator\getEnabledDisabledTagForBool(), and ILIAS\Test\Logging\AdditionalInformationGenerator\getTagForLangVar().

+ Here is the call graph for this function:

◆ toStorage()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::toStorage ( )

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 323 of file SettingsQuestionBehaviour.php.

323 : array
324 {
325 return [
326 'title_output' => ['integer', $this->getQuestionTitleOutputMode()],
327 'autosave' => ['integer', (int) $this->getAutosaveEnabled()],
328 'autosave_ival' => ['integer', $this->getAutosaveInterval()],
329 'shuffle_questions' => ['integer', (int) $this->getShuffleQuestions()],
330 'answer_feedback_points' => ['integer', (int) $this->getInstantFeedbackPointsEnabled()],
331 'answer_feedback' => ['integer', (int) $this->getInstantFeedbackGenericEnabled()],
332 'specific_feedback' => ['integer', (int) $this->getInstantFeedbackSpecificEnabled()],
333 'instant_verification' => ['integer', (int) $this->getInstantFeedbackSolutionEnabled()],
334 'force_inst_fb' => ['integer', (int) $this->getForceInstantFeedbackOnNextQuestion()],
335 'inst_fb_answer_fixation' => ['integer', (int) $this->getLockAnswerOnInstantFeedbackEnabled()],
336 'follow_qst_answer_fixation' => ['integer', (int) $this->getLockAnswerOnNextQuestionEnabled()]
337 ];
338 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ withAutosaveEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withAutosaveEnabled ( bool  $autosave_enabled)

Definition at line 413 of file SettingsQuestionBehaviour.php.

413 : self
414 {
415 $clone = clone $this;
416 $clone->autosave_enabled = $autosave_enabled;
417 return $clone;
418 }

◆ withAutosaveInterval()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withAutosaveInterval ( int  $autosave_interval)

Definition at line 425 of file SettingsQuestionBehaviour.php.

425 : self
426 {
427 $clone = clone $this;
428 $clone->autosave_interval = $autosave_interval;
429 return $clone;
430 }

◆ withForceInstantFeedbackOnNextQuestion()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withForceInstantFeedbackOnNextQuestion ( bool  $force_instant_feedback_on_next_question)

Definition at line 505 of file SettingsQuestionBehaviour.php.

505 : self
506 {
507 $clone = clone $this;
508 $clone->force_instant_feedback_on_next_question = $force_instant_feedback_on_next_question;
509 return $clone;
510 }

◆ withInstantFeedbackGenericEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withInstantFeedbackGenericEnabled ( bool  $instant_feedback_generic_enabled)

Definition at line 461 of file SettingsQuestionBehaviour.php.

461 : self
462 {
463 $clone = clone $this;
464 $clone->instant_feedback_generic_enabled = $instant_feedback_generic_enabled;
465 return $clone;
466 }

◆ withInstantFeedbackPointsEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withInstantFeedbackPointsEnabled ( bool  $instant_feedback_points_enabled)

Definition at line 449 of file SettingsQuestionBehaviour.php.

449 : self
450 {
451 $clone = clone $this;
452 $clone->instant_feedback_points_enabled = $instant_feedback_points_enabled;
453 return $clone;
454 }

◆ withInstantFeedbackSolutionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withInstantFeedbackSolutionEnabled ( bool  $instant_feedback_solution_enabled)

Definition at line 485 of file SettingsQuestionBehaviour.php.

485 : self
486 {
487 $clone = clone $this;
488 $clone->instant_feedback_solution_enabled = $instant_feedback_solution_enabled;
489 return $clone;
490 }

◆ withInstantFeedbackSpecificEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withInstantFeedbackSpecificEnabled ( bool  $instant_feedback_specific_enabled)

Definition at line 473 of file SettingsQuestionBehaviour.php.

473 : self
474 {
475 $clone = clone $this;
476 $clone->instant_feedback_specific_enabled = $instant_feedback_specific_enabled;
477 return $clone;
478 }

◆ withLockAnswerOnInstantFeedbackEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withLockAnswerOnInstantFeedbackEnabled ( bool  $lock_answer_on_instant_feedback)

Definition at line 517 of file SettingsQuestionBehaviour.php.

517 : self
518 {
519 $clone = clone $this;
520 $clone->lock_answer_on_instant_feedback = $lock_answer_on_instant_feedback;
521 return $clone;
522 }

◆ withLockAnswerOnNextQuestionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withLockAnswerOnNextQuestionEnabled ( bool  $lock_answer_on_next_question)

Definition at line 529 of file SettingsQuestionBehaviour.php.

529 : self
530 {
531 $clone = clone $this;
532 $clone->lock_answer_on_next_question = $lock_answer_on_next_question;
533 return $clone;
534 }

◆ withQuestionTitleOutputMode()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withQuestionTitleOutputMode ( int  $question_title_output_mode)

Definition at line 401 of file SettingsQuestionBehaviour.php.

401 : self
402 {
403 $clone = clone $this;
404 $clone->question_title_output_mode = $question_title_output_mode;
405 return $clone;
406 }

Referenced by ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getQuestionBehaviourSettingsForStorage().

+ Here is the caller graph for this function:

◆ withShuffleQuestions()

ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::withShuffleQuestions ( bool  $shuffle_questions)

Definition at line 437 of file SettingsQuestionBehaviour.php.

437 : self
438 {
439 $clone = clone $this;
440 $clone->shuffle_questions = $shuffle_questions;
441 return $clone;
442 }

Field Documentation

◆ ANSWER_FIXATION_NONE

const ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::ANSWER_FIXATION_NONE = 'none'

Definition at line 38 of file SettingsQuestionBehaviour.php.

◆ ANSWER_FIXATION_ON_IFB_OR_FUQST

const ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::ANSWER_FIXATION_ON_IFB_OR_FUQST = 'ifb_or_fuqst'

Definition at line 39 of file SettingsQuestionBehaviour.php.

◆ DEFAULT_AUTOSAVE_INTERVAL

const ILIAS\Test\Settings\MainSettings\SettingsQuestionBehaviour::DEFAULT_AUTOSAVE_INTERVAL = 30000
private

Definition at line 36 of file SettingsQuestionBehaviour.php.


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