Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_completion @javascript
2
Feature: Students will be marked as completed and pass/fail
3
  if they have viewed an activity and achieved a grade.
4
 
5
  Background:
6
    Given the following "courses" exist:
7
      | fullname | shortname | category | enablecompletion |
8
      | Course 1 | C1        | 0        | 1                |
9
    And the following "users" exist:
10
      | username | firstname | lastname | email                |
11
      | teacher1 | Teacher   | First    | teacher1@example.com |
12
      | student1 | Student   | First    | student1@example.com |
13
      | student2 | Student   | Second   | student2@example.com |
14
      | student3 | Student   | Third    | student3@example.com |
15
    And the following "course enrolments" exist:
16
      | user | course | role           |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student        |
19
      | student2 | C1 | student        |
20
      | student3 | C1 | student        |
21
    And the following "activity" exists:
22
      | activity                            | assign                  |
23
      | course                              | C1                      |
24
      | idnumber                            | a1                      |
25
      | name                                | Test assignment name    |
26
      | assignsubmission_onlinetext_enabled | 1                       |
27
      | assignsubmission_file_enabled       | 0                       |
28
      | completion                          | 2                       |
29
      | completionview                      | 1                       |
30
      | completionusegrade                  | 1                       |
31
      | gradepass                           | 50                      |
32
      | completionpassgrade                 | 1                       |
33
    And I am on the "Course 1" course page logged in as teacher1
34
    And "Student First" user has not completed "Test assignment name" activity
35
    And I am on the "Test assignment name" "assign activity" page logged in as student2
36
    And I am on the "Test assignment name" "assign activity" page logged in as student1
37
 
38
  Scenario: Confirm completion (incomplete/pass/fail) are set correctly
39
    Given the following "grade grades" exist:
40
      | gradeitem            | user     | grade |
41
      | Test assignment name | student1 | 21.00 |
42
      | Test assignment name | student2 | 50.00 |
43
      | Test assignment name | student3 | 30.00 |
44
    When I am on "Course 1" course homepage
45
    Then the "View" completion condition of "Test assignment name" is displayed as "done"
46
    And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
47
    And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"
48
    And I am on the "Course 1" course page logged in as student2
49
    And the "View" completion condition of "Test assignment name" is displayed as "done"
50
    And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
51
    And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done"
52
    And I am on the "Course 1" course page logged in as student3
53
    And the "View" completion condition of "Test assignment name" is displayed as "todo"
54
    And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
55
    And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"
56
 
57
  @javascript
58
  Scenario: Keep current view completion condition when the teacher does the action 'Unlock completion settings'.
59
    Given the following "grade grades" exist:
60
      | gradeitem            | user     | grade |
61
      | Test assignment name | student1 | 21.00 |
62
      | Test assignment name | student2 | 50.00 |
63
    And I am on the "Test assignment name" "assign activity editing" page logged in as teacher1
64
    And I expand all fieldsets
65
    And I press "Unlock completion settings"
66
    And I expand all fieldsets
67
    And I should see "Completion options unlocked"
68
    And I click on "Save and display" "button"
69
    When I am on the "Course 1" course page logged in as student1
70
    Then the "View" completion condition of "Test assignment name" is displayed as "done"
71
    And I am on the "Course 1" course page logged in as student2
72
    And the "View" completion condition of "Test assignment name" is displayed as "done"