ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 CONFIRM_HINT_REQUEST = 'confirmHintRequest';
61  public const SHOW_REQUESTED_HINTS_LIST = 'showRequestedHintList';
62 
63  public const QUESTION_SUMMARY = 'outQuestionSummary';
64  public const TOGGLE_SIDE_LIST = 'toggleSideList';
65 
66  public const SHOW_QUESTION_SELECTION = 'showQuestionSelection';
67  public const UNFREEZE_ANSWERS = 'unfreezeCheckedQuestionsAnswers';
68 
69  public const AUTO_SAVE = 'autosave';
70  public const AUTO_SAVE_ON_TIME_LIMIT = 'autosaveOnTimeLimit';
71  public const REDIRECT_ON_TIME_LIMIT = 'redirectAfterAutosave';
72  public const REDIRECT_AFTER_QUESTION_LIST = 'redirectAfterQuestionList';
73 
74  public const SUSPEND_TEST = 'suspendTest';
75  public const FINISH_TEST = 'finishTest';
76  public const AFTER_TEST_PASS_FINISHED = 'afterTestPassFinished';
77  public const SHOW_FINAL_STATMENT = 'showFinalStatement';
78 
79  public const BACK_TO_INFO_SCREEN = 'backToInfoScreen';
80  public const BACK_FROM_FINISHING = 'backFromFinishing';
81 
85  private static $nonExecutionCommands = [
86  self::DETECT_CHANGES,
87  self::AUTO_SAVE,
88  self::AUTO_SAVE_ON_TIME_LIMIT,
89  self::REDIRECT_ON_TIME_LIMIT,
90  self::AFTER_TEST_PASS_FINISHED,
91  self::SHOW_FINAL_STATMENT,
92  self::REDIRECT_AFTER_QUESTION_LIST
93  ];
94 
99  public static function isTestExecutionCommand($cmd): bool
100  {
101  return !in_array($cmd, self::$nonExecutionCommands);
102  }
103 }