Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 43... Línea 43...
43
    /**
43
    /**
44
     * Test get_formatted_grade_for_user with points.
44
     * Test get_formatted_grade_for_user with points.
45
     *
45
     *
46
     * @covers ::get_formatted_grade_for_user
46
     * @covers ::get_formatted_grade_for_user
47
     */
47
     */
48
    public function test_get_formatted_grade_for_user_with_points() {
48
    public function test_get_formatted_grade_for_user_with_points(): void {
49
        $grade = $this->initialise_test_and_get_grade_item(5, 4);
49
        $grade = $this->initialise_test_and_get_grade_item(5, 4);
Línea 50... Línea 50...
50
 
50
 
51
        $this->assertEquals(4, $grade->grade);
51
        $this->assertEquals(4, $grade->grade);
52
        $this->assertEquals('4.00 / 5.00', $grade->usergrade);
52
        $this->assertEquals('4.00 / 5.00', $grade->usergrade);
Línea 56... Línea 56...
56
    /**
56
    /**
57
     * Test get_formatted_grade_for_user with letters.
57
     * Test get_formatted_grade_for_user with letters.
58
     *
58
     *
59
     * @covers ::get_formatted_grade_for_user
59
     * @covers ::get_formatted_grade_for_user
60
     */
60
     */
61
    public function test_get_formatted_grade_for_user_with_letters() {
61
    public function test_get_formatted_grade_for_user_with_letters(): void {
62
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_LETTER);
62
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_LETTER);
Línea 63... Línea 63...
63
 
63
 
64
        $this->assertEquals(4, $grade->grade);
64
        $this->assertEquals(4, $grade->grade);
65
        $this->assertEquals('B-', $grade->usergrade);
65
        $this->assertEquals('B-', $grade->usergrade);
Línea 69... Línea 69...
69
    /**
69
    /**
70
     * Test get_formatted_grade_for_user with percentage.
70
     * Test get_formatted_grade_for_user with percentage.
71
     *
71
     *
72
     * @covers ::get_formatted_grade_for_user
72
     * @covers ::get_formatted_grade_for_user
73
     */
73
     */
74
    public function test_get_formatted_grade_for_user_with_percentage() {
74
    public function test_get_formatted_grade_for_user_with_percentage(): void {
75
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_PERCENTAGE);
75
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_PERCENTAGE);
Línea 76... Línea 76...
76
 
76
 
77
        $this->assertEquals(4, $grade->grade);
77
        $this->assertEquals(4, $grade->grade);
78
        $this->assertEquals('80.00 %', $grade->usergrade);
78
        $this->assertEquals('80.00 %', $grade->usergrade);
Línea 82... Línea 82...
82
    /**
82
    /**
83
     * Test get_formatted_grade_for_user with points and letter.
83
     * Test get_formatted_grade_for_user with points and letter.
84
     *
84
     *
85
     * @covers ::get_formatted_grade_for_user
85
     * @covers ::get_formatted_grade_for_user
86
     */
86
     */
87
    public function test_get_formatted_grade_for_user_with_points_letter() {
87
    public function test_get_formatted_grade_for_user_with_points_letter(): void {
88
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_REAL_LETTER);
88
        $grade = $this->initialise_test_and_get_grade_item(5, 4, GRADE_DISPLAY_TYPE_REAL_LETTER);
Línea 89... Línea 89...
89
 
89
 
90
        $this->assertEquals(4, $grade->grade);
90
        $this->assertEquals(4, $grade->grade);
91
        $this->assertEquals('4.00 (B-)', $grade->usergrade);
91
        $this->assertEquals('4.00 (B-)', $grade->usergrade);
Línea 95... Línea 95...
95
    /**
95
    /**
96
     * Test get_formatted_grade_for_user with scales.
96
     * Test get_formatted_grade_for_user with scales.
97
     *
97
     *
98
     * @covers ::get_formatted_grade_for_user
98
     * @covers ::get_formatted_grade_for_user
99
     */
99
     */
100
    public function test_get_formatted_grade_for_user_with_scales() {
100
    public function test_get_formatted_grade_for_user_with_scales(): void {
101
        $grade = $this->initialise_test_and_get_grade_item(-2, 2);
101
        $grade = $this->initialise_test_and_get_grade_item(-2, 2);
Línea 102... Línea 102...
102
 
102
 
103
        $this->assertEquals(2, $grade->grade);
103
        $this->assertEquals(2, $grade->grade);
104
        $this->assertEquals('Competent', $grade->usergrade);
104
        $this->assertEquals('Competent', $grade->usergrade);
Línea 108... Línea 108...
108
    /**
108
    /**
109
     * Test get_formatted_grade_for_user with rubric.
109
     * Test get_formatted_grade_for_user with rubric.
110
     *
110
     *
111
     * @covers ::get_formatted_grade_for_user
111
     * @covers ::get_formatted_grade_for_user
112
     */
112
     */
113
    public function test_get_formatted_grade_for_user_with_rubric() {
113
    public function test_get_formatted_grade_for_user_with_rubric(): void {
114
        $this->resetAfterTest();
114
        $this->resetAfterTest();
Línea 115... Línea 115...
115
 
115
 
116
        $generator = \testing_util::get_data_generator();
116
        $generator = \testing_util::get_data_generator();
Línea 161... Línea 161...
161
    /**
161
    /**
162
     * Test get_formatted_grade_for_user with a marking guide.
162
     * Test get_formatted_grade_for_user with a marking guide.
163
     *
163
     *
164
     * @covers ::get_formatted_grade_for_user
164
     * @covers ::get_formatted_grade_for_user
165
     */
165
     */
166
    public function test_get_formatted_grade_for_user_with_marking_guide() {
166
    public function test_get_formatted_grade_for_user_with_marking_guide(): void {
167
        $this->resetAfterTest();
167
        $this->resetAfterTest();
Línea 168... Línea 168...
168
 
168
 
169
        $generator = \testing_util::get_data_generator();
169
        $generator = \testing_util::get_data_generator();