Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum @forumreport @forumreport_summary
2
Feature: Attachments count column data available
3
  In order to gather data on users' forum attachments
4
  As a teacher
5
  I need to view accurate attachment count data in the forum summary report
6
 
7
  Scenario: Add discussions and replies with attached files
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        | student1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1        | 0        |
16
      | Course 2 | C2        | 0        |
17
    And the following "course enrolments" exist:
18
      | user     | course | role           |
19
      | teacher1 | C1     | editingteacher |
20
      | student1 | C1     | student        |
21
      | student2 | C1     | student        |
22
      | teacher1 | C2     | editingteacher |
23
    And the following "activities" exist:
24
      | activity | name   | course | idnumber   |
25
      | forum    | forum1 | C1     | forum1C1   |
26
      | forum    | forum2 | C1     | forum2C1   |
27
      | forum    | forum1 | C2     | forum1C2   |
28
    And the following forum discussions exist in course "Course 1":
29
      | user     | forum  | name        | message  | attachments        | inlineattachments |
30
      | teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt |                   |
31
      | teacher1 | forum2 | discussion2 | message2 | att3.jpg           | in1.jpg           |
32
      | student1 | forum1 | discussion3 | message3 | att4.jpg           | in2.jpg           |
33
      | student2 | forum1 | discussion4 | message4 |                    |                   |
34
    And the following forum replies exist in course "Course 1":
35
      | user     | forum  | discussion  | message  | attachments        | inlineattachments |
36
      | teacher1 | forum1 | discussion1 | reply1   | att5.jpg           | in3.txt           |
37
      | teacher1 | forum1 | discussion1 | reply2   | att5.jpg           | in3.txt           |
38
      | teacher1 | forum2 | discussion2 | reply2   | att6.jpg           |                   |
39
      | student1 | forum1 | discussion3 | reply3   | att7.jpg, att8.jpg | in2.jpg           |
40
      | student2 | forum1 | discussion4 | reply4   |                    |                   |
41
    And the following forum discussions exist in course "Course 2":
42
      | user     | forum  | name        | message  | attachments        | inlineattachments |
43
      | teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt |                   |
44
    When I am on the forum1C1 "forum activity" page logged in as teacher1
45
    And I navigate to "Reports" in current page administration
46
    Then "Teacher 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "6"
47
    And "Student 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "5"
48
    And "Student 2" row "Number of attachments" column of "forumreport_summary_table" table should contain "0"