Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 34... Línea 34...
34
 * @copyright  2017 The Open University
34
 * @copyright  2017 The Open University
35
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36
 */
36
 */
37
class walkthrough_test extends \qbehaviour_walkthrough_test_base {
37
class walkthrough_test extends \qbehaviour_walkthrough_test_base {
Línea 38... Línea 38...
38
 
38
 
Línea 39... Línea 39...
39
    public function test_regrade_does_not_lose_flag() {
39
    public function test_regrade_does_not_lose_flag(): void {
40
 
40
 
41
        // Create a true-false question with correct answer true.
41
        // Create a true-false question with correct answer true.
Línea 60... Línea 60...
60
    }
60
    }
Línea 61... Línea 61...
61
 
61
 
62
    /**
62
    /**
63
     * Test action_author function.
63
     * Test action_author function.
64
     */
64
     */
65
    public function test_action_author_with_display_options_testcase() {
65
    public function test_action_author_with_display_options_testcase(): void {
66
        $this->resetAfterTest(true);
66
        $this->resetAfterTest(true);
67
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');
67
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');
68
        $teacher = $this->getDataGenerator()->create_user();
68
        $teacher = $this->getDataGenerator()->create_user();
Línea 138... Línea 138...
138
    /**
138
    /**
139
     * @covers \question_usage_by_activity::regrade_question
139
     * @covers \question_usage_by_activity::regrade_question
140
     * @covers \question_attempt::regrade
140
     * @covers \question_attempt::regrade
141
     * @covers \question_attempt::get_attempt_state_data_to_regrade_with_version
141
     * @covers \question_attempt::get_attempt_state_data_to_regrade_with_version
142
     */
142
     */
143
    public function test_regrading_an_interactive_attempt_while_in_progress() {
143
    public function test_regrading_an_interactive_attempt_while_in_progress(): void {
Línea 144... Línea 144...
144
 
144
 
145
        // Start an attempt at a matching question.
145
        // Start an attempt at a matching question.
146
        $q = test_question_maker::make_question('match');
146
        $q = test_question_maker::make_question('match');
147
        $this->start_attempt_at_question($q, 'interactive', 1);
147
        $this->start_attempt_at_question($q, 'interactive', 1);
Línea 168... Línea 168...
168
    /**
168
    /**
169
     * @covers \question_usage_by_activity::regrade_question
169
     * @covers \question_usage_by_activity::regrade_question
170
     * @covers \question_attempt::regrade
170
     * @covers \question_attempt::regrade
171
     * @covers \question_attempt::get_attempt_state_data_to_regrade_with_version
171
     * @covers \question_attempt::get_attempt_state_data_to_regrade_with_version
172
     */
172
     */
173
    public function test_regrading_does_not_lose_metadata() {
173
    public function test_regrading_does_not_lose_metadata(): void {
Línea 174... Línea 174...
174
 
174
 
175
        // Start an attempt at a matching question.
175
        // Start an attempt at a matching question.
176
        $q = test_question_maker::make_question('match');
176
        $q = test_question_maker::make_question('match');
177
        $this->start_attempt_at_question($q, 'interactive', 1);
177
        $this->start_attempt_at_question($q, 'interactive', 1);