Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 32... Línea 32...
32
 * @package    qbehaviour_immediatecbm
32
 * @package    qbehaviour_immediatecbm
33
 * @copyright  2009 The Open University
33
 * @copyright  2009 The Open University
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 */
35
 */
36
class walkthrough_test extends \qbehaviour_walkthrough_test_base {
36
class walkthrough_test extends \qbehaviour_walkthrough_test_base {
37
    public function test_immediatecbm_feedback_multichoice_right() {
37
    public function test_immediatecbm_feedback_multichoice_right(): void {
Línea 38... Línea 38...
38
 
38
 
39
        // Create a true-false question with correct answer true.
39
        // Create a true-false question with correct answer true.
40
        $mc = \test_question_maker::make_a_multichoice_single_question();
40
        $mc = \test_question_maker::make_a_multichoice_single_question();
Línea 126... Línea 126...
126
 
126
 
127
        $autogradedstep = $this->get_step($this->get_step_count() - 2);
127
        $autogradedstep = $this->get_step($this->get_step_count() - 2);
128
        $this->assertEqualsWithDelta($autogradedstep->get_fraction(), -2, 0.0000001);
128
        $this->assertEqualsWithDelta($autogradedstep->get_fraction(), -2, 0.0000001);
Línea 129... Línea 129...
129
    }
129
    }
Línea 130... Línea 130...
130
 
130
 
131
    public function test_immediatecbm_feedback_multichoice_try_to_submit_blank() {
131
    public function test_immediatecbm_feedback_multichoice_try_to_submit_blank(): void {
132
 
132
 
Línea 179... Línea 179...
179
        $this->check_current_output(
179
        $this->check_current_output(
180
                $this->get_contains_partcorrect_expectation(),
180
                $this->get_contains_partcorrect_expectation(),
181
                new \question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/'));
181
                new \question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/'));
182
    }
182
    }
Línea 183... Línea 183...
183
 
183
 
Línea 184... Línea 184...
184
    public function test_immediatecbm_feedback_shortanswer_try_to_submit_no_certainty() {
184
    public function test_immediatecbm_feedback_shortanswer_try_to_submit_no_certainty(): void {
185
 
185
 
186
        // Create a short answer question with correct answer true.
186
        // Create a short answer question with correct answer true.
Línea 213... Línea 213...
213
        $this->check_current_mark(3);
213
        $this->check_current_mark(3);
214
        $this->check_current_output(
214
        $this->check_current_output(
215
                $this->get_does_not_contain_validation_error_expectation());
215
                $this->get_does_not_contain_validation_error_expectation());
216
    }
216
    }
Línea 217... Línea 217...
217
 
217
 
Línea 218... Línea 218...
218
    public function test_immediatecbm_feedback_multichoice_wrong_on_finish() {
218
    public function test_immediatecbm_feedback_multichoice_wrong_on_finish(): void {
219
 
219
 
220
        // Create a true-false question with correct answer true.
220
        // Create a true-false question with correct answer true.
Línea 259... Línea 259...
259
                $this->get_contains_mc_radio_expectation(($wrongindex + 1) % 3, false, false),
259
                $this->get_contains_mc_radio_expectation(($wrongindex + 1) % 3, false, false),
260
                $this->get_contains_mc_radio_expectation(($wrongindex + 1) % 3, false, false),
260
                $this->get_contains_mc_radio_expectation(($wrongindex + 1) % 3, false, false),
261
                $this->get_contains_incorrect_expectation());
261
                $this->get_contains_incorrect_expectation());
262
    }
262
    }
Línea 263... Línea 263...
263
 
263
 
Línea 264... Línea 264...
264
    public function test_immediatecbm_cbm_truefalse_no_certainty_feedback_when_not_answered() {
264
    public function test_immediatecbm_cbm_truefalse_no_certainty_feedback_when_not_answered(): void {
265
 
265
 
266
        // Create a true-false question with correct answer true.
266
        // Create a true-false question with correct answer true.