Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 48... Línea 48...
48
        $penaltyinfo = get_string('gradingdetailspenaltytotal', 'qbehaviour_adaptive', 'XXXXX');
48
        $penaltyinfo = get_string('gradingdetailspenaltytotal', 'qbehaviour_adaptive', 'XXXXX');
49
        $penaltypattern = '/'.str_replace('XXXXX', '\\w*', preg_quote($penaltyinfo, '/')).'/';
49
        $penaltypattern = '/'.str_replace('XXXXX', '\\w*', preg_quote($penaltyinfo, '/')).'/';
50
        return new \question_no_pattern_expectation($penaltypattern);
50
        return new \question_no_pattern_expectation($penaltypattern);
51
    }
51
    }
Línea 52... Línea 52...
52
 
52
 
Línea 53... Línea 53...
53
    public function test_multichoice() {
53
    public function test_multichoice(): void {
54
 
54
 
55
        // Create a multiple choice, single response question.
55
        // Create a multiple choice, single response question.
56
        $mc = \test_question_maker::make_a_multichoice_single_question();
56
        $mc = \test_question_maker::make_a_multichoice_single_question();
Línea 158... Línea 158...
158
 
158
 
159
        $autogradedstep = $this->get_step($this->get_step_count() - 3);
159
        $autogradedstep = $this->get_step($this->get_step_count() - 3);
160
        $this->assertEqualsWithDelta($autogradedstep->get_fraction(), 1, 0.0000001);
160
        $this->assertEqualsWithDelta($autogradedstep->get_fraction(), 1, 0.0000001);
Línea 161... Línea 161...
161
    }
161
    }
Línea 162... Línea 162...
162
 
162
 
163
    public function test_multichoice2() {
163
    public function test_multichoice2(): void {
164
 
164
 
165
        // Create a multiple choice, multiple response question.
165
        // Create a multiple choice, multiple response question.
Línea 209... Línea 209...
209
                $this->get_contains_mark_summary(2),
209
                $this->get_contains_mark_summary(2),
210
                $this->get_does_not_contain_submit_button_expectation(),
210
                $this->get_does_not_contain_submit_button_expectation(),
211
                $this->get_contains_correct_expectation());
211
                $this->get_contains_correct_expectation());
212
    }
212
    }
Línea 213... Línea 213...
213
 
213
 
Línea 214... Línea 214...
214
    public function test_numerical_invalid() {
214
    public function test_numerical_invalid(): void {
215
 
215
 
216
        // Create a numerical question
216
        // Create a numerical question
217
        $numq = \test_question_maker::make_question('numerical', 'pi');
217
        $numq = \test_question_maker::make_question('numerical', 'pi');