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_assign @assignfeedback @assignfeedback_editpdf @_file_upload
2
Feature: In a group assignment, teacher can annotate PDF files for all users
3
  In order to provide visual report on a graded PDF for all users
4
  As a teacher
5
  I need to use the PDF editor for a group assignment
6
 
7
  Background:
8
    Given ghostscript is installed
9
    And the following "courses" exist:
10
      | fullname | shortname | category | groupmode |
11
      | Course 1 | C1 | 0 | 1 |
12
    And the following "users" exist:
13
      | username | firstname | lastname | email |
14
      | teacher1 | Teacher | 1 | teacher1@example.com |
15
      | student1 | Student | 1 | student1@example.com |
16
      | student2 | Student | 2 | student2@example.com |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | student1 | C1 | student |
21
      | student2 | C1 | student |
22
    And the following "groups" exist:
23
      | name     | course | idnumber |
24
      | G1       | C1     | G1       |
25
    And the following "group members" exist:
26
      | user     | group |
27
      | student1 | G1    |
28
      | student2 | G1    |
29
    And the following "activity" exists:
30
      | activity                            | assign                |
31
      | course                              | C1                    |
32
      | name                                | Test assignment name  |
33
      | assignsubmission_file_enabled       | 1                     |
34
      | assignsubmission_file_maxfiles      | 1                     |
35
      | assignsubmission_file_maxsizebytes  | 102400                |
36
      | assignfeedback_editpdf_enabled      | 1                     |
37
      | submissiondrafts                    | 0                     |
38
      | teamsubmission                      | 1                     |
39
    And the following "mod_assign > submission" exists:
40
      | assign  | Test assignment name                                       |
41
      | user    | student1                                                   |
42
      | file    | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf  |
43
 
44
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 45
    And I go to "Submitted for grading" "Test assignment name" activity advanced grading page
1 efrain 46
    And I wait for the complete PDF to load
47
    And I click on ".navigate-next-button" "css_element"
48
    And I wait until the page is ready
49
    And I click on ".stampbutton" "css_element"
50
    And I draw on the pdf
51
    And I wait until the page is ready
52
 
53
  @javascript
54
  Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
55
    Given I set the field "applytoall" to "0"
56
    And I press "Save changes"
57
    And I should see "The changes to the grade and feedback were saved"
58
    And I click on "Edit settings" "link"
59
    And I log out
60
    And I am on the "Test assignment name" Activity page logged in as student1
61
    When I follow "View annotated PDF..."
62
    Then I should see "Annotate PDF"
63
    And I wait until the page is ready
64
    And I click on "Close" "button" in the "Annotate PDF" "dialogue"
65
    And I log out
66
    And I am on the "Test assignment name" Activity page logged in as student2
67
    And I should not see "View annotated PDF..."
68
 
69
  @javascript
70
  Scenario: Submit a PDF file as a student and annotate the PDF as a teacher and all students in the group get a copy of the annotated PDF.
71
    Given I press "Save changes"
72
    And I should see "The changes to the grade and feedback were saved"
73
    And I am on the "Test assignment name" Activity page
74
    And I log out
75
    And I am on the "Test assignment name" Activity page logged in as student1
76
    When I follow "View annotated PDF..."
77
    And I change window size to "large"
78
    Then I should see "Annotate PDF"
79
    And I change window size to "medium"
80
    And I wait until the page is ready
81
    And I click on "Close" "button" in the "Annotate PDF" "dialogue"
82
    And I log out
83
 
84
    And I am on the "Test assignment name" Activity page logged in as student2
85
    And I should see "View annotated PDF..."