[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/feedback/editpdf/tests/behat/ -> group_annotations.feature (source)

   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 I log in as "teacher1"
  30      And I follow "Course 1"
  31      And I turn editing mode on
  32      And I add a "Assignment" to section "1" and I fill the form with:
  33        | Assignment name                   | Test assignment name |
  34        | Description                       | Submit your PDF file |
  35        | assignsubmission_file_enabled     | 1 |
  36        | Maximum number of uploaded files  | 1 |
  37        | Students submit in groups         | Yes |
  38      And I log out
  39      And I log in as "student1"
  40      And I follow "Course 1"
  41      And I follow "Test assignment name"
  42      And I press "Add submission"
  43      And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager
  44      And I press "Save changes"
  45      And I should see "Submitted for grading"
  46      And I should see "submission.pdf"
  47      And I should see "Not graded"
  48      And I log out
  49      And I log in as "teacher1"
  50      And I follow "Course 1"
  51      And I follow "Test assignment name"
  52      And I follow "View all submissions"
  53      And I click on "Grade" "link" in the "Submitted for grading" "table_row"
  54      And I wait until the page is ready
  55      And I click on ".navigate-next-button" "css_element"
  56      And I wait until the page is ready
  57      And I click on ".stampbutton" "css_element"
  58      And I draw on the pdf
  59      And I wait until the page is ready
  60  
  61    @javascript
  62    Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
  63      Given I set the field "applytoall" to "0"
  64      And I press "Save changes"
  65      And I should see "The changes to the grade and feedback were saved"
  66      And I press "Ok"
  67      And I click on "Edit settings" "link"
  68      And I log out
  69      And I log in as "student1"
  70      And I follow "Course 1"
  71      And I follow "Test assignment name"
  72      When I follow "View annotated PDF..."
  73      Then I should see "Annotate PDF"
  74      And I wait until the page is ready
  75      And I click on "Close" "button"
  76      And I log out
  77      And I log in as "student2"
  78      And I follow "Course 1"
  79      And I follow "Test assignment name"
  80      And I should not see "View annotated PDF..."
  81  
  82    @javascript
  83    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.
  84      Given I press "Save changes"
  85      And I click on "Ok" "button"
  86      And I follow "Course 1"
  87      And I log out
  88      And I log in as "student1"
  89      And I follow "Course 1"
  90      And I follow "Test assignment name"
  91      When I follow "View annotated PDF..."
  92      And I change window size to "large"
  93      Then I should see "Annotate PDF"
  94      And I change window size to "medium"
  95      And I wait until the page is ready
  96      And I click on "Close" "button"
  97      And I log out
  98      And I log in as "student2"
  99      And I follow "Course 1"
 100      And I follow "Test assignment name"
 101      And I should see "View annotated PDF..."


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1