ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour Class Reference
+ Inheritance diagram for ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour:
+ Collaboration diagram for ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour:

Public Member Functions

 __construct (int $test_id, protected int $number_of_tries=0, protected bool $block_after_passed_enabled=false, protected ?string $pass_waiting=null, protected bool $processing_time_enabled=false, protected ?string $processing_time=null, protected bool $reset_processing_time=false, protected int $kiosk_mode=0, protected bool $examid_in_test_attempt_enabled=false)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 getNumberOfTries ()
 
 withNumberOfTries (int $number_of_tries)
 
 getBlockAfterPassedEnabled ()
 
 withBlockAfterPassedEnabled (bool $block_after_passed_enabled)
 
 getPassWaiting ()
 
 withPassWaiting (?string $pass_waiting)
 
 getPassWaitingEnabled ()
 
 getProcessingTimeEnabled ()
 
 withProcessingTimeEnabled (bool $processing_time_enabled)
 
 getProcessingTime ()
 
 withProcessingTime (?string $processing_time)
 
 getProcessingTimeAsMinutes ()
 
 getResetProcessingTime ()
 
 withResetProcessingTime (bool $reset_processing_time)
 
 getKioskMode ()
 
 withKioskMode (int $kiosk_mode)
 
 getKioskModeEnabled ()
 
 getShowTitleInKioskMode ()
 
 getShowParticipantNameInKioskMode ()
 
 getExamIdInTestAttemptEnabled ()
 
 withExamIdInTestAttemptEnabled (bool $exam_id_in_test_pass_enabled)
 
- Public Member Functions inherited from ILIAS\Test\Settings\TestSettings
 __construct (int $test_id)
 
 getTestId ()
 
 withTestId (int $test_id)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 

Private Member Functions

 getInputLimitAttempts (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
 
 getInputForceWaitingBetweenAttempts (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
 
 getSubInputsForceWaitingBetweenAttempts (\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
 
 cleanupPassWaiting (?string $pass_waiting)
 
 getInputTimeLimitForCompletion (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
 
 getInputKioskMode (\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
 

Private Attributes

const DEFAULT_PROCESSING_TIME_MINUTES = 90
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Test\Settings\TestSettings
int $test_id
 

Detailed Description

Definition at line 29 of file SettingsTestBehaviour.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::__construct ( int  $test_id,
protected int  $number_of_tries = 0,
protected bool  $block_after_passed_enabled = false,
protected ?string  $pass_waiting = null,
protected bool  $processing_time_enabled = false,
protected ?string  $processing_time = null,
protected bool  $reset_processing_time = false,
protected int  $kiosk_mode = 0,
protected bool  $examid_in_test_attempt_enabled = false 
)

Definition at line 33 of file SettingsTestBehaviour.php.

References ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\cleanupPassWaiting().

43  {
44  $this->pass_waiting = $this->cleanupPassWaiting($this->pass_waiting);
46  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cleanupPassWaiting()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::cleanupPassWaiting ( ?string  $pass_waiting)
private

Definition at line 203 of file SettingsTestBehaviour.php.

References null.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\__construct(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\withPassWaiting().

203  : ?string
204  {
205  if ($pass_waiting === null || $pass_waiting === '') {
206  return null;
207  }
208 
209  $pass_waiting_array = array_map(
210  fn(string $v) => strval((int) $v),
211  explode(':', $pass_waiting)
212  );
213  if (count($pass_waiting_array) === 3) {
214  return implode(':', $pass_waiting_array);
215  }
216 
217  $month = array_shift($pass_waiting_array);
218  $pass_waiting_array[0] = strval((int) $pass_waiting_array[0] + (int) $month * 31);
219  return implode(':', $pass_waiting_array);
220  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getBlockAfterPassedEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getBlockAfterPassedEnabled ( )

Definition at line 391 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputLimitAttempts(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

391  : bool
392  {
393  return $this->block_after_passed_enabled;
394  }
+ Here is the caller graph for this function:

◆ getExamIdInTestAttemptEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getExamIdInTestAttemptEnabled ( )

Definition at line 498 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toForm(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

498  : bool
499  {
500  return $this->examid_in_test_attempt_enabled;
501  }
+ Here is the caller graph for this function:

◆ getInputForceWaitingBetweenAttempts()

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

Definition at line 136 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getPassWaiting(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getPassWaitingEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getSubInputsForceWaitingBetweenAttempts(), null, ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toForm().

141  : FormInput {
142  $constraint = $refinery->custom()->constraint(
143  static function (?string $vs): bool {
144  return $vs !== '0:0:0';
145  },
146  sprintf($lng->txt('not_greater_than'), $lng->txt('tst_pass_waiting_time'), 0)
147  );
148 
149  $trafo = $refinery->custom()->transformation(
150  static function (?array $vs): ?string {
151  return $vs === null ? null : implode(':', $vs);
152  }
153  );
154 
155  $force_waiting_between_attempts = $f->optionalGroup(
157  $lng->txt('tst_pass_waiting_enabled'),
158  $lng->txt('tst_pass_waiting_info')
159  )->withValue(null)
160  ->withAdditionalTransformation($trafo);
161 
162  if ($this->getPassWaitingEnabled()) {
163  list($days, $hours, $minutes) = explode(':', $this->getPassWaiting());
164  $force_waiting_between_attempts = $force_waiting_between_attempts->withValue(
165  [
166  'days' => $days,
167  'hours' => $hours,
168  'minutes' => $minutes
169  ]
170  );
171  }
172 
173  if (!$environment['participant_data_exists']) {
174  return $force_waiting_between_attempts->withAdditionalTransformation($constraint);
175  }
176 
177  return $force_waiting_between_attempts->withDisabled(true);
178  }
getSubInputsForceWaitingBetweenAttempts(\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInputKioskMode()

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

Definition at line 286 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getKioskMode(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getShowParticipantNameInKioskMode(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getShowTitleInKioskMode(), null, ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toForm().

290  : FormInput {
291  $trafo = $refinery->custom()->transformation(
292  static function (?array $vs): ?int {
293  if ($vs === null) {
294  return 0;
295  }
296 
297  $kiosk_mode = 1;
298 
299  if ($vs['show_title'] === true) {
300  $kiosk_mode += 2;
301  }
302 
303  if ($vs['show_participant_name'] === true) {
304  $kiosk_mode += 4;
305  }
306 
307  return $kiosk_mode;
308  }
309  );
310 
311  $sub_inputs_kiosk_mode['show_title'] = $f->checkbox($lng->txt('kiosk_show_title'));
312 
313  $sub_inputs_kiosk_mode['show_participant_name'] = $f->checkbox($lng->txt('kiosk_show_participant'));
314 
315  $kiosk_mode = $f->optionalGroup(
316  $sub_inputs_kiosk_mode,
317  $lng->txt('kiosk'),
318  $lng->txt('kiosk_description')
319  )->withValue(null)
320  ->withAdditionalTransformation($trafo);
321 
322  if (!$this->getKioskMode()) {
323  return $kiosk_mode;
324  }
325 
326  return $kiosk_mode->withValue([
327  'show_title' => $this->getShowTitleInKioskMode(),
328  'show_participant_name' => $this->getShowParticipantNameInKioskMode()
329  ]);
330  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInputLimitAttempts()

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

Definition at line 82 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getBlockAfterPassedEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getNumberOfTries(), null, ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toForm().

87  : FormInput {
88  $trafo = $refinery->custom()->transformation(
89  static function (?array $vs): array {
90  if ($vs === null) {
91  return [
92  'number_of_available_attempts' => 0,
93  'block_after_passed' => false
94  ];
95  }
96 
97  return $vs;
98  }
99  );
100 
101  $sub_inputs['number_of_available_attempts'] = $f->numeric($lng->txt('tst_nr_of_tries'));
102  $sub_inputs['block_after_passed'] = $f->checkbox(
103  $lng->txt('tst_block_passes_after_passed'),
104  $lng->txt('tst_block_passes_after_passed_info')
105  );
106 
107  if (!$environment['participant_data_exists']) {
108  $sub_inputs['number_of_available_attempts'] =
109  $sub_inputs['number_of_available_attempts']->withRequired(true)
110  ->withAdditionalTransformation($refinery->int()->isGreaterThan(0));
111  }
112 
113  $limit_attempts = $f->optionalGroup(
114  $sub_inputs,
115  $lng->txt('tst_limit_nr_of_tries'),
116  $lng->txt('tst_nr_of_tries_desc')
117  )->withValue(null)
118  ->withAdditionalTransformation($trafo);
119 
120  if ($this->getNumberOfTries() > 0) {
121  $limit_attempts = $limit_attempts->withValue(
122  [
123  'number_of_available_attempts' => $this->getNumberOfTries(),
124  'block_after_passed' => $this->getBlockAfterPassedEnabled()
125  ]
126  );
127  }
128 
129  if (!$environment['participant_data_exists']) {
130  return $limit_attempts;
131  }
132 
133  return $limit_attempts->withDisabled(true);
134  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInputTimeLimitForCompletion()

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

Definition at line 222 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTimeAsMinutes(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTimeEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getResetProcessingTime(), null, ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toForm().

227  : FormInput {
228  $trafo = $refinery->custom()->transformation(
229  static function (?array $vs): array {
230  if ($vs === null) {
231  return [
232  'processing_time_limit' => false,
233  'time_limit_for_completion_value' => null,
234  'reset_time_limit_for_completion_by_attempt' => false
235  ];
236  }
237 
238  $vs['processing_time_limit'] = true;
239  $vs['time_limit_for_completion_value'] = sprintf(
240  '%02d:%02d:00',
241  floor(
242  $vs['time_limit_for_completion_value'] / 60
243  ),
244  $vs['time_limit_for_completion_value'] % 60
245  );
246  return $vs;
247  }
248  );
249 
250  $sub_inputs_time_limit_for_completion['time_limit_for_completion_value'] = $f
251  ->numeric(
252  $lng->txt('tst_processing_time_duration'),
253  $lng->txt('tst_processing_time_desc')
254  )
255  ->withRequired(true)
256  ->withAdditionalTransformation($refinery->int()->isGreaterThan(0))
257  ->withValue(self::DEFAULT_PROCESSING_TIME_MINUTES);
258  $sub_inputs_time_limit_for_completion['reset_time_limit_for_completion_by_attempt'] = $f->checkbox(
259  $lng->txt('tst_reset_processing_time'),
260  $lng->txt('tst_reset_processing_time_desc')
261  );
262 
263  $time_limit_for_completion = $f->optionalGroup(
264  $sub_inputs_time_limit_for_completion,
265  $lng->txt('tst_processing_time'),
266  $lng->txt('tst_processing_time_desc')
267  )->withValue(null)
268  ->withAdditionalTransformation($trafo);
269 
270  if ($this->getProcessingTimeEnabled()) {
271  $time_limit_for_completion = $time_limit_for_completion->withValue(
272  [
273  'time_limit_for_completion_value' => (int) $this->getProcessingTimeAsMinutes(),
274  'reset_time_limit_for_completion_by_attempt' => (bool) $this->getResetProcessingTime()
275  ]
276  );
277  }
278 
279  if (!$environment['participant_data_exists']) {
280  return $time_limit_for_completion;
281  }
282 
283  return $time_limit_for_completion->withDisabled(true);
284  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKioskMode()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getKioskMode ( )

Definition at line 471 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputKioskMode(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

471  : int
472  {
473  return $this->kiosk_mode;
474  }
+ Here is the caller graph for this function:

◆ getKioskModeEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getKioskModeEnabled ( )

Definition at line 483 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog().

483  : bool
484  {
485  return ($this->kiosk_mode & 1) > 0;
486  }
+ Here is the caller graph for this function:

◆ getNumberOfTries()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getNumberOfTries ( )

Definition at line 379 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputLimitAttempts(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

379  : int
380  {
381  return $this->number_of_tries;
382  }
+ Here is the caller graph for this function:

◆ getPassWaiting()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getPassWaiting ( )

◆ getPassWaitingEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getPassWaitingEnabled ( )

Definition at line 415 of file SettingsTestBehaviour.php.

References null.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputForceWaitingBetweenAttempts(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog().

415  : bool
416  {
417  if ($this->pass_waiting === null) {
418  return false;
419  }
420  if (array_sum(explode(':', $this->pass_waiting)) > 0) {
421  return true;
422  }
423  return false;
424  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getProcessingTime()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getProcessingTime ( )

Definition at line 438 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

438  : ?string
439  {
440  return $this->processing_time;
441  }
+ Here is the caller graph for this function:

◆ getProcessingTimeAsMinutes()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getProcessingTimeAsMinutes ( )

Definition at line 450 of file SettingsTestBehaviour.php.

References ILIAS\Repository\int(), and null.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputTimeLimitForCompletion(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog().

450  : int
451  {
452  if ($this->processing_time !== null && preg_match("/(\d{2}):(\d{2}):(\d{2})/is", $this->processing_time, $matches)) {
453  return ((int) $matches[1] * 60) + (int) $matches[2];
454  }
455 
456  return self::DEFAULT_PROCESSING_TIME_MINUTES;
457  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProcessingTimeEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getProcessingTimeEnabled ( )

Definition at line 426 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputTimeLimitForCompletion(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

426  : bool
427  {
428  return $this->processing_time_enabled;
429  }
+ Here is the caller graph for this function:

◆ getResetProcessingTime()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getResetProcessingTime ( )

Definition at line 459 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputTimeLimitForCompletion(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toStorage().

459  : bool
460  {
461  return $this->reset_processing_time;
462  }
+ Here is the caller graph for this function:

◆ getShowParticipantNameInKioskMode()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getShowParticipantNameInKioskMode ( )

Definition at line 493 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputKioskMode(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog().

493  : bool
494  {
495  return ($this->kiosk_mode & 4) > 0;
496  }
+ Here is the caller graph for this function:

◆ getShowTitleInKioskMode()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::getShowTitleInKioskMode ( )

Definition at line 488 of file SettingsTestBehaviour.php.

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputKioskMode(), and ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\toLog().

488  : bool
489  {
490  return ($this->kiosk_mode & 2) > 0;
491  }
+ Here is the caller graph for this function:

◆ getSubInputsForceWaitingBetweenAttempts()

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

Definition at line 180 of file SettingsTestBehaviour.php.

References ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation().

Referenced by ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputForceWaitingBetweenAttempts().

184  : array {
185  $sub_inputs_force_waiting_between_attempts['days'] = $f->numeric($lng->txt('days'))
186  ->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(0))
187  ->withRequired(true)
188  ->withValue(0);
189  $sub_inputs_force_waiting_between_attempts['hours'] = $f->numeric($lng->txt('hours'))
190  ->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(0))
191  ->withAdditionalTransformation($refinery->int()->isLessThanOrEqual(24))
192  ->withRequired(true)
193  ->withValue(0);
194  $sub_inputs_force_waiting_between_attempts['minutes'] = $f->numeric($lng->txt('minutes'))
195  ->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(0))
196  ->withAdditionalTransformation($refinery->int()->isLessThanOrEqual(60))
197  ->withRequired(true)
198  ->withValue(0);
199 
200  return $sub_inputs_force_waiting_between_attempts;
201  }
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toForm()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
?array  $environment = null 
)

Definition at line 48 of file SettingsTestBehaviour.php.

References ILIAS\UI\Implementation\Component\Input\$inputs, ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getExamIdInTestAttemptEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputForceWaitingBetweenAttempts(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputKioskMode(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputLimitAttempts(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getInputTimeLimitForCompletion(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

53  : FormInput {
54  $inputs['limit_attempts'] = $this->getInputLimitAttempts(
55  $lng,
56  $f,
57  $refinery,
58  $environment
59  );
60  $inputs['force_waiting_between_attempts'] = $this->getInputForceWaitingBetweenAttempts(
61  $lng,
62  $f,
63  $refinery,
64  $environment
65  );
66  $inputs['time_limit_for_completion'] = $this->getInputTimeLimitForCompletion(
67  $lng,
68  $f,
69  $refinery,
70  $environment
71  );
72  $inputs['kiosk_mode'] = $this->getInputKioskMode($lng, $f, $refinery);
73 
74  $inputs['show_exam_id'] = $f->checkbox(
75  $lng->txt('examid_in_test_pass'),
76  $lng->txt('examid_in_test_pass_desc')
78 
79  return $f->section($inputs, $lng->txt('tst_settings_header_test_run'));
80  }
getInputLimitAttempts(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $lng
Definition: privfeed.php:31
getInputTimeLimitForCompletion(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
getInputKioskMode(\ilLanguage $lng, FieldFactory $f, Refinery $refinery)
getInputForceWaitingBetweenAttempts(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment)
+ Here is the call graph for this function:

◆ toLog()

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

Definition at line 346 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getBlockAfterPassedEnabled(), ILIAS\Test\Logging\AdditionalInformationGenerator\getEnabledDisabledTagForBool(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getExamIdInTestAttemptEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getKioskModeEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getNumberOfTries(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getPassWaiting(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getPassWaitingEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTimeAsMinutes(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTimeEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getResetProcessingTime(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getShowParticipantNameInKioskMode(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getShowTitleInKioskMode(), ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_BLOCK_AFTER_PASSED, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_KIOSK_ENABLED, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_KIOSK_SHOW_PARTICIPANT_NAME, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_KIOSK_SHOW_TITLE, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_LIMIT_NR_OF_TRIES, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_PASSWAITING_ENABLED, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_PROCESSING_TIME_ENABLED, ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_RESET_PROCESSING_TIME, and ILIAS\Test\Logging\AdditionalInformationGenerator\KEY_TEST_SHOW_EXAM_ID.

346  : array
347  {
349  ? $this->getNumberOfTries() : $additional_info->getEnabledDisabledTagForBool(false);
350  if ($this->getNumberOfTries() > 0) {
352  ->getEnabledDisabledTagForBool($this->getBlockAfterPassedEnabled());
353  }
354 
356  ? $this->getPassWaiting() : $additional_info->getEnabledDisabledTagForBool(false);
357 
359  ? $this->getProcessingTimeAsMinutes() : $additional_info->getEnabledDisabledTagForBool(false);
360  if ($this->getProcessingTimeEnabled()) {
362  ->getEnabledDisabledTagForBool($this->getResetProcessingTime());
363  }
364 
365  $log_array[AdditionalInformationGenerator::KEY_TEST_KIOSK_ENABLED] = $additional_info
366  ->getEnabledDisabledTagForBool($this->getKioskModeEnabled());
367  if ($this->getKioskModeEnabled()) {
368  $log_array[AdditionalInformationGenerator::KEY_TEST_KIOSK_SHOW_TITLE] = $additional_info
369  ->getEnabledDisabledTagForBool($this->getShowTitleInKioskMode());
371  ->getEnabledDisabledTagForBool($this->getShowParticipantNameInKioskMode());
372  }
373 
374  $log_array[AdditionalInformationGenerator::KEY_TEST_SHOW_EXAM_ID] = $additional_info
375  ->getEnabledDisabledTagForBool($this->getExamIdInTestAttemptEnabled());
376  return $log_array;
377  }
+ Here is the call graph for this function:

◆ toStorage()

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

Definition at line 332 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getBlockAfterPassedEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getExamIdInTestAttemptEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getKioskMode(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getNumberOfTries(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getPassWaiting(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTime(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getProcessingTimeEnabled(), ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\getResetProcessingTime(), and ILIAS\Repository\int().

332  : array
333  {
334  return [
335  'nr_of_tries' => ['integer', $this->getNumberOfTries()],
336  'block_after_passed' => ['integer', (int) $this->getBlockAfterPassedEnabled()],
337  'pass_waiting' => ['string', $this->getPassWaiting()],
338  'enable_processing_time' => ['integer', (int) $this->getProcessingTimeEnabled()],
339  'processing_time' => ['string', $this->getProcessingTime()],
340  'reset_processing_time' => ['integer', (int) $this->getResetProcessingTime()],
341  'kiosk' => ['integer', $this->getKioskMode()],
342  'examid_in_test_pass' => ['integer', (int) $this->getExamIdInTestAttemptEnabled()]
343  ];
344  }
+ Here is the call graph for this function:

◆ withBlockAfterPassedEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withBlockAfterPassedEnabled ( bool  $block_after_passed_enabled)

Definition at line 396 of file SettingsTestBehaviour.php.

396  : self
397  {
398  $clone = clone $this;
399  $clone->block_after_passed_enabled = $block_after_passed_enabled;
400  return $clone;
401  }

◆ withExamIdInTestAttemptEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withExamIdInTestAttemptEnabled ( bool  $exam_id_in_test_pass_enabled)

Definition at line 503 of file SettingsTestBehaviour.php.

503  : self
504  {
505  $clone = clone $this;
506  $clone->examid_in_test_attempt_enabled = $exam_id_in_test_pass_enabled;
507  return $clone;
508  }

◆ withKioskMode()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withKioskMode ( int  $kiosk_mode)

Definition at line 476 of file SettingsTestBehaviour.php.

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

476  : self
477  {
478  $clone = clone $this;
479  $clone->kiosk_mode = $kiosk_mode;
480  return $clone;
481  }
+ Here is the caller graph for this function:

◆ withNumberOfTries()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withNumberOfTries ( int  $number_of_tries)

Definition at line 384 of file SettingsTestBehaviour.php.

384  : self
385  {
386  $clone = clone $this;
387  $clone->number_of_tries = $number_of_tries;
388  return $clone;
389  }

◆ withPassWaiting()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withPassWaiting ( ?string  $pass_waiting)

Definition at line 408 of file SettingsTestBehaviour.php.

References ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour\cleanupPassWaiting().

408  : self
409  {
410  $clone = clone $this;
411  $clone->pass_waiting = $this->cleanupPassWaiting($pass_waiting);
412  return $clone;
413  }
+ Here is the call graph for this function:

◆ withProcessingTime()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withProcessingTime ( ?string  $processing_time)

Definition at line 443 of file SettingsTestBehaviour.php.

443  : self
444  {
445  $clone = clone $this;
446  $clone->processing_time = $processing_time;
447  return $clone;
448  }

◆ withProcessingTimeEnabled()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withProcessingTimeEnabled ( bool  $processing_time_enabled)

Definition at line 431 of file SettingsTestBehaviour.php.

431  : self
432  {
433  $clone = clone $this;
434  $clone->processing_time_enabled = $processing_time_enabled;
435  return $clone;
436  }

◆ withResetProcessingTime()

ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::withResetProcessingTime ( bool  $reset_processing_time)

Definition at line 464 of file SettingsTestBehaviour.php.

464  : self
465  {
466  $clone = clone $this;
467  $clone->reset_processing_time = $reset_processing_time;
468  return $clone;
469  }

Field Documentation

◆ DEFAULT_PROCESSING_TIME_MINUTES

const ILIAS\Test\Settings\MainSettings\SettingsTestBehaviour::DEFAULT_PROCESSING_TIME_MINUTES = 90
private

Definition at line 31 of file SettingsTestBehaviour.php.


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