ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilTestPlayerCommands.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
29 {
30  public const START_TEST = 'startTest';
31  public const INIT_TEST = 'initTest';
32  public const START_PLAYER = 'startPlayer';
33  public const RESUME_PLAYER = 'resumePlayer';
34 
35  public const DISPLAY_ACCESS_CODE = 'displayAccessCode';
36  public const ACCESS_CODE_CONFIRMED = 'accessCodeConfirmed';
37 
38  public const SHOW_QUESTION = 'showQuestion';
39 
40  public const PREVIOUS_QUESTION = 'previousQuestion';
41  public const NEXT_QUESTION = 'nextQuestion';
42 
43  public const EDIT_SOLUTION = 'editSolution';
44  public const MARK_QUESTION = 'markQuestion';
45  public const MARK_QUESTION_SAVE = 'markQuestionAndSaveIntermediate';
46  public const UNMARK_QUESTION = 'unmarkQuestion';
47  public const UNMARK_QUESTION_SAVE = 'unmarkQuestionAndSaveIntermediate';
48 
49  public const SUBMIT_INTERMEDIATE_SOLUTION = 'submitIntermediateSolution';
50  public const SUBMIT_SOLUTION = 'submitSolution';
51  public const SUBMIT_SOLUTION_AND_NEXT = 'submitSolutionAndNext';
52  // fau: testNav - define new commands
53  public const REVERT_CHANGES = 'revertChanges';
54  public const DETECT_CHANGES = 'detectChanges';
55  // fau.
56  public const DISCARD_SOLUTION = 'discardSolution';
57  public const SKIP_QUESTION = 'skipQuestion';
58  public const SHOW_INSTANT_RESPONSE = 'showInstantResponse';
59 
60  public const QUESTION_SUMMARY = 'outQuestionSummary';
61  public const TOGGLE_SIDE_LIST = 'toggleSideList';
62 
63  public const SHOW_QUESTION_SELECTION = 'showQuestionSelection';
64  public const UNFREEZE_ANSWERS = 'unfreezeCheckedQuestionsAnswers';
65 
66  public const AUTO_SAVE = 'autosave';
67  public const AUTO_SAVE_ON_TIME_LIMIT = 'autosaveOnTimeLimit';
68  public const REDIRECT_ON_TIME_LIMIT = 'redirectAfterAutosave';
69  public const REDIRECT_AFTER_QUESTION_LIST = 'redirectAfterQuestionList';
70 
71  public const SUSPEND_TEST = 'suspendTest';
72  public const FINISH_TEST = 'finishTest';
73  public const AFTER_TEST_PASS_FINISHED = 'afterTestPassFinished';
74  public const SHOW_FINAL_STATMENT = 'showFinalStatement';
75 
76  public const BACK_TO_INFO_SCREEN = 'backToInfoScreen';
77  public const BACK_FROM_FINISHING = 'backFromFinishing';
78 
82  private static $nonExecutionCommands = [
83  self::DETECT_CHANGES,
84  self::AUTO_SAVE,
85  self::AUTO_SAVE_ON_TIME_LIMIT,
86  self::REDIRECT_ON_TIME_LIMIT,
87  self::AFTER_TEST_PASS_FINISHED,
88  self::SHOW_FINAL_STATMENT,
89  self::REDIRECT_AFTER_QUESTION_LIST
90  ];
91 
96  public static function isTestExecutionCommand($cmd): bool
97  {
98  return !in_array($cmd, self::$nonExecutionCommands);
99  }
100 }