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_quiz @core_completion
2
Feature: View activity completion in the quiz activity
3
  In order to have visibility of quiz completion requirements
4
  As a student
5
  I need to be able to view my quiz completion progress
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 | enablecompletion |
14
      | Course 1 | C1        | 0        | 1                |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And the following "activity" exists:
20
      | activity                     | quiz           |
21
      | course                       | C1             |
22
      | idnumber                     | quiz1          |
23
      | name                         | Test quiz name |
24
      | section                      | 1              |
25
      | attempts                     | 2              |
26
      | gradepass                    | 5.00           |
27
      | completion                   | 2              |
28
      | completionview               | 1              |
29
      | completionusegrade           | 1              |
30
      | completionpassgrade          | 1              |
31
      | completionattemptsexhausted  | 1              |
32
      | completionminattemptsenabled | 1              |
33
      | completionminattempts        | 1              |
1441 ariadna 34
    And the following "question categories" exist:
35
      | contextlevel    | reference | name           |
36
      | Activity module | quiz1     | Test questions |
37
    And the following "questions" exist:
38
      | questioncategory | qtype     | name           | questiontext              |
39
      | Test questions   | truefalse | First question | Answer the first question |
1 efrain 40
    And quiz "Test quiz name" contains the following questions:
41
      | question       | page |
42
      | First question | 1    |
43
 
1441 ariadna 44
  Scenario Outline: A student can complete a quiz activity by achieving a passing grade
1 efrain 45
    When I log in as "student1"
46
    And I am on "Course 1" course homepage
47
    And I follow "Test quiz name"
48
    And the "View" completion condition of "Test quiz name" is displayed as "done"
49
    And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "todo"
50
    And the "Receive a grade" completion condition of "Test quiz name" is displayed as "todo"
51
    And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "todo"
52
    And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo"
1441 ariadna 53
    And I press "Attempt quiz"
54
    And I set the field "False" to "1"
55
    And I press "Finish attempt ..."
56
    And I press "Submit all and finish"
1 efrain 57
    And I am on "Course 1" course homepage
58
    And I follow "Test quiz name"
59
    And the "View" completion condition of "Test quiz name" is displayed as "done"
60
    And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "done"
61
    And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
62
    And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed"
63
    And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo"
1441 ariadna 64
    And I run all adhoc tasks
65
    And I reload the page
66
    And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
67
    And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed"
1 efrain 68
    And I press "Re-attempt quiz"
69
    And I set the field "<answer>" to "1"
70
    And I press "Finish attempt ..."
71
    And I press "Submit all and finish"
72
    And I follow "Finish review"
73
    And the "View" completion condition of "Test quiz name" is displayed as "done"
74
    And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "done"
75
    And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
76
    And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "<passcompletionexpected>"
77
    And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done"
78
    And I log out
79
    And I log in as "teacher1"
80
    And I am on "Course 1" course homepage
81
    And I navigate to "Reports" in current page administration
82
    And I click on "Activity completion" "link"
83
    And "<expectedactivitycompletion>" "icon" should exist in the "Student 1" "table_row"
84
 
85
    Examples:
86
      | answer | passcompletionexpected | expectedactivitycompletion             |
87
      | False  | failed                 | Completed (did not achieve pass grade) |
88
      | True   | done                   | Completed (achieved pass grade)        |