Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_notes @javascript
2
Feature: Add notes to course participants
3
  In order to share information with other staff
4
  As a teacher
5
  I need to add notes from the course particpants list
6
 
7
  Scenario: An teacher can add multiple notes
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
      | student2 | Student | 2 | student2@example.com |
13
      | student3 | Student | 3 | student3@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | format |
16
      | Course 1 | C1 | topics |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | student1 | C1 | student |
21
      | student2 | C1 | student |
22
      | student3 | C1 | student |
23
    # TODO MDL-57120 "Notes" and site "Participants" links are not accessible without navigation block.
24
    Given I log in as "admin"
25
    And I am on site homepage
26
    And I turn editing mode on
27
    And the following config values are set as admin:
28
      | unaddableblocks | | theme_boost|
29
    And I add the "Navigation" block if not present
30
    And I configure the "Navigation" block
31
    And I set the following fields to these values:
32
      | Page contexts | Display throughout the entire site |
33
    And I press "Save changes"
34
    And I log out
35
    And I log in as "teacher1"
36
    And I am on "Course 1" course homepage
37
    And I follow "Participants"
38
    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "1"
39
    And I choose "Add a new note" from the participants page bulk action menu
40
    And I set the field "bulk-note" to "Student 1 needs to pick up his game"
41
    And I press "Add a new note to 1 person"
42
    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "0"
43
    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 2')]//input[@type='checkbox']" to "1"
44
    And I choose "Add a new note" from the participants page bulk action menu
45
    And I set the field "bulk-note" to ""
46
    And I press "Add a new note to 1 person"
47
    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 2')]//input[@type='checkbox']" to "0"
48
    And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 3')]//input[@type='checkbox']" to "1"
49
    And I choose "Add a new note" from the participants page bulk action menu
50
    And I set the field "bulk-note" to "  "
51
    And I press "Add a new note to 1 person"
52
    And I follow "Student 1"
53
    And I follow "Notes"
54
    # Student 1 has note from Teacher
55
    Then I should see "Teacher" in the "region-main" "region"
56
    And I should see "Student 1 needs to pick up his game"
57
    And I follow "Participants"
58
    And I follow "Student 2"
59
    And I follow "Notes"
60
    And I am on "Course 1" course homepage
61
    And I follow "Participants"
62
    And I follow "Notes"
63
    Then I should see "Student 1"
64
    And I should see "Student 1 needs to pick up his game"
65
    # Verify Student 2 does not have a note added.
66
    And I should not see "Student 2"
67
    And I should not see "Student 3"