ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTestPlayerCommands.php
Go to the documentation of this file.
1 <?php
2 
27 {
28  public const START_TEST = 'startTest';
29  public const INIT_TEST = 'initTest';
30  public const START_PLAYER = 'startPlayer';
31  public const RESUME_PLAYER = 'resumePlayer';
32 
33  public const DISPLAY_ACCESS_CODE = 'displayAccessCode';
34  public const ACCESS_CODE_CONFIRMED = 'accessCodeConfirmed';
35 
36  public const SHOW_QUESTION = 'showQuestion';
37 
38  public const PREVIOUS_QUESTION = 'previousQuestion';
39  public const NEXT_QUESTION = 'nextQuestion';
40 
41  public const EDIT_SOLUTION = 'editSolution';
42  public const MARK_QUESTION = 'markQuestion';
43  public const MARK_QUESTION_SAVE = 'markQuestionAndSaveIntermediate';
44  public const UNMARK_QUESTION = 'unmarkQuestion';
45  public const UNMARK_QUESTION_SAVE = 'unmarkQuestionAndSaveIntermediate';
46 
47  public const SUBMIT_INTERMEDIATE_SOLUTION = 'submitIntermediateSolution';
48  public const SUBMIT_SOLUTION = 'submitSolution';
49  public const SUBMIT_SOLUTION_AND_NEXT = 'submitSolutionAndNext';
50  // fau: testNav - define new commands
51  public const REVERT_CHANGES = 'revertChanges';
52  public const DETECT_CHANGES = 'detectChanges';
53  // fau.
54  public const DISCARD_SOLUTION = 'discardSolution';
55  public const SKIP_QUESTION = 'skipQuestion';
56  public const SHOW_INSTANT_RESPONSE = 'showInstantResponse';
57 
58  public const CONFIRM_HINT_REQUEST = 'confirmHintRequest';
59  public const SHOW_REQUESTED_HINTS_LIST = 'showRequestedHintList';
60 
61  public const QUESTION_SUMMARY = 'outQuestionSummary';
62  public const QUESTION_SUMMARY_INC_OBLIGATIONS = 'outQuestionSummaryWithObligationsInfo';
63  public const QUESTION_SUMMARY_OBLIGATIONS_ONLY = 'outObligationsOnlySummary';
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 
73  public const SUSPEND_TEST = 'suspendTest';
74  public const FINISH_TEST = 'finishTest';
75  public const AFTER_TEST_PASS_FINISHED = 'afterTestPassFinished';
76  public const SHOW_FINAL_STATMENT = 'showFinalStatement';
77 
78  public const BACK_TO_INFO_SCREEN = 'backToInfoScreen';
79  public const BACK_FROM_FINISHING = 'backFromFinishing';
80 
84  private static $nonExecutionCommands = array(
85 // fau: testNav - declare DETECT_CHANGES as non execution command
86  self::DETECT_CHANGES,
87 // fau.
88  self::AUTO_SAVE, self::AUTO_SAVE_ON_TIME_LIMIT, self::REDIRECT_ON_TIME_LIMIT,
89  self::AFTER_TEST_PASS_FINISHED, self::SHOW_FINAL_STATMENT
90  );
91 
96  public static function isTestExecutionCommand($cmd): bool
97  {
98  return !in_array($cmd, self::$nonExecutionCommands);
99  }
100 }