Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lesson
2
Feature: In a lesson activity, students can review the answers they gave to questions
3
  To review questions of a lesson
4
  As a student
5
  I need to complete a lesson answering all of the questions.
6
 
1441 ariadna 7
  @javascript @accessibility
1 efrain 8
  Scenario: Student answers questions and then reviews them.
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
      | student1 | Student | 1 | student1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And the following "activity" exists:
21
      | activity    | lesson           |
22
      | name        | Test lesson name |
23
      | course      | C1               |
24
      | idnumber    | lesson1          |
25
      # Display ongoing score = Yes
26
      | ongoing     | 1                |
27
      # Slideshow = Yes
28
      | slideshow   | 1                |
29
      # Maximum number of answers = 10
30
      | maxanswers  | 10               |
31
      # Allow student review = Yes
32
      | modattempts | 1                |
33
      # Maximum number of attempts per question
34
      | maxattempts | 3                |
35
      # Custom scoring = No
36
      | custom      | 0                |
37
      # Re-takes allowed = Yes
38
      | retake      | 1                |
39
    And the following "mod_lesson > pages" exist:
40
      | lesson           | qtype     | title                 | content                   |
41
      | Test lesson name | numeric   | Hardest question ever | 1 + 1?                    |
42
      | Test lesson name | truefalse | Next question         | Paper is made from trees. |
43
    And the following "mod_lesson > answers" exist:
44
      | page                  | answer | response           | jumpto    | score |
45
      | Hardest question ever | 2      | Correct answer 1   | Next page | 1     |
46
      | Hardest question ever | 1      | Incorrect answer 1 | This page | 0     |
47
      | Next question         | True   | Correct answer 2   | Next page | 1     |
48
      | Next question         | False  | Incorrect answer 2 | This page | 0     |
49
    And I am on the "Test lesson name" "lesson activity" page logged in as student1
50
    And I should see "You have answered 0 correctly out of 0 attempts."
51
    And I should see "1 + 1?"
52
    And I wait "1" seconds
53
    And I set the following fields to these values:
54
      | Your answer | 1 |
55
    And I press "Submit"
56
    And I should see "You have answered 0 correctly out of 1 attempts."
57
    And I press "Continue"
58
    And I should see "1 + 1?"
59
    And I wait "1" seconds
60
    And I set the following fields to these values:
61
      | Your answer | 2 |
62
    And I press "Submit"
63
    And I should see "You have answered 1 correctly out of 2 attempts."
64
    And I press "Continue"
65
    And I should see "Paper is made from trees."
66
    And I wait "1" seconds
67
    And I set the following fields to these values:
68
      | True | 1 |
69
    And I press "Submit"
70
    And I should see "You have answered 2 correctly out of 3 attempts."
71
    And I should see "Paper is made from trees."
72
    And I press "Continue"
73
    And I should see "Congratulations - end of lesson reached"
74
    And I should see "Number of questions answered: 2"
75
    And I should see "Number of correct answers: 2"
76
    And I should see "Your score is 2 (out of 3)."
77
    When I follow "Review lesson"
78
    Then I should see "You have answered 2 correctly out of 3 attempts."
79
    And I should see "1 + 1?"
80
    And I press "Next page"
81
    And I should see "You have answered 2 correctly out of 3 attempts."
82
    And I should see "1 + 1?"
83
    And I should see "Correct answer 1"
84
    And I press "Continue"
85
    And I should see "You have answered 2 correctly out of 3 attempts."
86
    And I should see "Paper is made from trees."
87
    And I press "Next page"
88
    And I should see "You have answered 2 correctly out of 3 attempts."
89
    And I should see "Paper is made from trees."
90
    And I should see "Correct answer 2"
91
    And I press "Continue"
92
    And I should see "Congratulations - end of lesson reached"
1441 ariadna 93
    # Check assessibility at the lesson start page.
94
    # Attempts heading should be at correct heading level.
95
    And I am on the "Test lesson name" "lesson activity" page
96
    And the "[role=main]" "css_element" should meet accessibility standards with "best-practice" extra tests