-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathilias.patch
More file actions
110 lines (104 loc) · 4.11 KB
/
Copy pathilias.patch
File metadata and controls
110 lines (104 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
diff --git a/Modules/Test/classes/class.ilTestOutputGUI.php b/Modules/Test/classes/class.ilTestOutputGUI.php
index eca4874548..cdc7c1da5f 100644
--- a/Modules/Test/classes/class.ilTestOutputGUI.php
+++ b/Modules/Test/classes/class.ilTestOutputGUI.php
@@ -231,6 +231,21 @@ abstract class ilTestOutputGUI extends ilTestPlayerAbstractGUI
$this->ctrl->setParameter($this, 'sequence', $sequenceElement);
$this->ctrl->setParameter($this, 'pmode', '');
+ // Raise startTestPass Event
+ global $DIC;
+
+ $ilAppEventHandler = $DIC['ilAppEventHandler'];
+ $ilAppEventHandler->raise(
+ 'Modules/Test',
+ 'startTestPass',
+ array(
+ 'active_id' => $this->testSession->getActiveId(),
+ 'pass' => $this->testSession->getPass(),
+ 'user_id' => $this->testSession->getUserId(),
+ 'ref_id' => $this->object->getRefId()
+ )
+ );
+
if ($this->object->getListOfQuestionsStart()) {
$this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY);
}
@@ -829,6 +844,21 @@ abstract class ilTestOutputGUI extends ilTestPlayerAbstractGUI
$this->testSequence->saveToDb();
}
+ // Raise resumeTestPass Event
+ global $DIC;
+
+ $ilAppEventHandler = $DIC['ilAppEventHandler'];
+ $ilAppEventHandler->raise(
+ 'Modules/Test',
+ 'resumeTestPass',
+ array(
+ 'active_id' => $this->testSession->getActiveId(),
+ 'pass' => $this->testSession->getPass(),
+ 'user_id' => $this->testSession->getUserId(),
+ 'ref_id' => $this->object->getRefId()
+ )
+ );
+
if ($this->object->getListOfQuestionsStart()) {
$this->ctrl->redirect($this, ilTestPlayerCommands::QUESTION_SUMMARY);
}
diff --git a/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php b/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php
index e19e1b1596..e2ce839853 100644
--- a/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php
+++ b/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php
@@ -200,6 +200,21 @@ abstract class ilTestPlayerAbstractGUI extends ilTestServiceGUI
public function suspendTestCmd()
{
+ // Raise suspendTestPass Event
+ global $DIC;
+
+ $ilAppEventHandler = $DIC['ilAppEventHandler'];
+ $ilAppEventHandler->raise(
+ 'Modules/Test',
+ 'suspendTestPass',
+ array(
+ 'active_id' => $this->testSession->getActiveId(),
+ 'pass' => $this->testSession->getPass(),
+ 'user_id' => $this->testSession->getUserId(),
+ 'ref_id' => $this->object->getRefId()
+ )
+) ;
+
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
@@ -832,6 +847,21 @@ abstract class ilTestPlayerAbstractGUI extends ilTestServiceGUI
$finishTasks = new ilTestPassFinishTasks($this->testSession->getActiveId(), $this->object->getId());
$finishTasks->performFinishTasks($this->processLocker);
+
+ // Raise finishTestPass Event
+ global $DIC;
+
+ $ilAppEventHandler = $DIC['ilAppEventHandler'];
+ $ilAppEventHandler->raise(
+ 'Modules/Test',
+ 'finishTestPass',
+ array(
+ 'active_id' => $this->testSession->getActiveId(),
+ 'pass' => $this->testSession->getPass(),
+ 'user_id' => $this->testSession->getUserId(),
+ 'ref_id' => $this->object->getRefId()
+ )
+ );
}
protected function afterTestPassFinishedCmd()
diff --git a/Modules/Test/module.xml b/Modules/Test/module.xml
index 1089f0232c..a2c4e66a93 100644
--- a/Modules/Test/module.xml
+++ b/Modules/Test/module.xml
@@ -33,6 +33,9 @@
<crons>
<cron id="finish_unfinished_passes" class="ilCronFinishUnfinishedTestPasses" />
</crons>
+ <events>
+ <event type='raise' id='Modules/Test' />
+ </events>
<pluginslots>
<pluginslot id="texp" name="Export" />
<pluginslot id="tsig" name="Signature" />