Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 45... Línea 45...
45
    }
45
    }
Línea 46... Línea 46...
46
 
46
 
47
    /**
47
    /**
48
     * Completion with no rules: the completion is completed as soons as we view the course.
48
     * Completion with no rules: the completion is completed as soons as we view the course.
49
     */
49
     */
50
    public function test_get_completion_state_no_rules() {
50
    public function test_get_completion_state_no_rules(): void {
51
        $this->resetAfterTest();
51
        $this->resetAfterTest();
Línea 52... Línea 52...
52
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
52
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
53
 
53
 
Línea 61... Línea 61...
61
    }
61
    }
Línea 62... Línea 62...
62
 
62
 
63
    /**
63
    /**
64
     * Completion with no rules and join meeting
64
     * Completion with no rules and join meeting
65
     */
65
     */
66
    public function test_get_completion_state_no_rules_and_join_meeting() {
66
    public function test_get_completion_state_no_rules_and_join_meeting(): void {
67
        $this->resetAfterTest();
67
        $this->resetAfterTest();
Línea 68... Línea 68...
68
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
68
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
69
 
69
 
Línea 80... Línea 80...
80
    }
80
    }
Línea 81... Línea 81...
81
 
81
 
82
    /**
82
    /**
83
     * With state incomplete
83
     * With state incomplete
84
     */
84
     */
85
    public function test_get_completion_state_incomplete() {
85
    public function test_get_completion_state_incomplete(): void {
Línea 86... Línea 86...
86
        $this->resetAfterTest();
86
        $this->resetAfterTest();
Línea 87... Línea 87...
87
 
87
 
Línea 101... Línea 101...
101
    }
101
    }
Línea 102... Línea 102...
102
 
102
 
103
    /**
103
    /**
104
     * With state complete
104
     * With state complete
105
     */
105
     */
106
    public function test_get_completion_state_complete() {
106
    public function test_get_completion_state_complete(): void {
Línea 107... Línea 107...
107
        $this->resetAfterTest();
107
        $this->resetAfterTest();
108
 
108
 
109
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
109
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
Línea 149... Línea 149...
149
    }
149
    }
Línea 150... Línea 150...
150
 
150
 
151
    /**
151
    /**
152
     * No rule description but active
152
     * No rule description but active
153
     */
153
     */
154
    public function test_mod_bigbluebuttonbn_get_completion_active_rule_descriptions() {
154
    public function test_mod_bigbluebuttonbn_get_completion_active_rule_descriptions(): void {
155
        $this->resetAfterTest();
155
        $this->resetAfterTest();
156
        $user = $this->getDataGenerator()->create_user();
156
        $user = $this->getDataGenerator()->create_user();
157
        $this->setUser($user);
157
        $this->setUser($user);
158
        // Two activities, both with automatic completion. One has the 'completionsubmit' rule, one doesn't.
158
        // Two activities, both with automatic completion. One has the 'completionsubmit' rule, one doesn't.
Línea 193... Línea 193...
193
    }
193
    }
Línea 194... Línea 194...
194
 
194
 
195
    /**
195
    /**
196
     * Completion View
196
     * Completion View
197
     */
197
     */
198
    public function test_view() {
198
    public function test_view(): void {
199
        $this->resetAfterTest();
199
        $this->resetAfterTest();
200
        $this->setAdminUser();
200
        $this->setAdminUser();
201
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
201
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
202
            null, ['completion' => 2, 'completionview' => 1]
202
            null, ['completion' => 2, 'completionview' => 1]
Línea 239... Línea 239...
239
     * @param array $customcompletionrules
239
     * @param array $customcompletionrules
240
     * @param array $events
240
     * @param array $events
241
     * @param int $expectedstate
241
     * @param int $expectedstate
242
     * @dataProvider custom_completion_data_provider
242
     * @dataProvider custom_completion_data_provider
243
     */
243
     */
244
    public function test_get_completion_with_events(array $customcompletionrules, array $events, int $expectedstate) {
244
    public function test_get_completion_with_events(array $customcompletionrules, array $events, int $expectedstate): void {
245
        $this->resetAfterTest();
245
        $this->resetAfterTest();
246
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
246
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
247
            $this->get_course(),
247
            $this->get_course(),
248
            [
248
            [
249
                'completion' => '2',
249
                'completion' => '2',