Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lesson
2
Feature: Numeric and short answer questions have a section to catch all other student answers.
3
  In order for lesson pages to catch any student answer
4
  As a teacher
5
  I need to fill in the sections to catch all other student answers
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | student1 | Student | 1 | student1@example.com |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1 | 0 |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    Given the following "activity" exists:
20
      | activity      | lesson                  |
21
      | course        | C1                      |
22
      | idnumber      | 0001                    |
23
      | name          | Test lesson name        |
24
      | maxattempts   | 3                       |
25
    And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
26
    And I expand all fieldsets
27
    And I set the following fields to these values:
28
      | Provide option to try a question again | Yes |
29
    And I press "Save and display"
30
 
31
  Scenario: I can create a numerical question with an option to catch all student responses.
32
    Given I follow "Add a question page"
33
    And I set the field "Select a question type" to "Numerical"
34
    And I press "Add a question page"
35
    And I set the following fields to these values:
36
      | Page title | Numerical question |
37
      | Page contents | What is 1 + 2? |
38
      | id_answer_editor_0 | 3 |
39
      | id_jumpto_0 | End of lesson |
40
      | id_enableotheranswers | 1 |
41
      | id_jumpto_6 | Next page |
42
    And I press "Save page"
43
    And I select "Add a content page" from the "qtype" singleselect
44
    And I set the following fields to these values:
45
      | Page title | Just move on page |
46
      | Page contents | You are here to move on |
47
      | id_answer_editor_0 | End this lesson |
48
      | id_jumpto_0 | End of lesson |
49
    And I press "Save page"
50
    And I am on the "Test lesson name" "lesson activity" page logged in as student1
51
    And I set the field "Your answer" to "5"
52
    And I press "Submit"
53
    And I should see "That's the wrong answer"
54
    And I press "Yes, I'd like to try again"
55
    And I should see "What is 1 + 2?"
56
    And I set the field "Your answer" to "7"
57
    And I press "Submit"
58
    And I should see "That's the wrong answer"
59
    When I press "No, I just want to go on to the next question"
60
    Then I should see "You are here to move on"
61
 
62
  Scenario: I can create a shortanswer question with an option to catch all student responses.
63
    Given I follow "Add a question page"
64
    And I set the field "Select a question type" to "Short answer"
65
    And I press "Add a question page"
66
    And I set the following fields to these values:
67
      | Page title | Short answer question |
68
      | Page contents | Please type in cat |
69
      | id_answer_editor_0 | 3 |
70
      | id_jumpto_0 | End of lesson |
71
      | id_enableotheranswers | 1 |
72
      | id_jumpto_6 | Next page |
73
    And I press "Save page"
74
    And I select "Add a content page" from the "qtype" singleselect
75
    And I set the following fields to these values:
76
      | Page title | Just move on page |
77
      | Page contents | You are here to move on |
78
      | id_answer_editor_0 | End this lesson |
79
      | id_jumpto_0 | End of lesson |
80
    And I press "Save page"
81
    And I am on the "Test lesson name" "lesson activity" page logged in as student1
82
    And I set the field "Your answer" to "dog"
83
    And I press "Submit"
84
    And I should see "That's the wrong answer"
85
    And I press "Yes, I'd like to try again"
86
    And I should see "Please type in cat"
87
    And I set the field "Your answer" to "bird"
88
    And I press "Submit"
89
    And I should see "That's the wrong answer"
90
    When I press "No, I just want to go on to the next question"
91
    Then I should see "You are here to move on"