[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/report/grader/tests/behat/ -> switch_views.feature (source)

   1  @gradereport @gradereport_grader
   2  Feature: We can change what we are viewing on the grader report
   3    In order to check the expected results are displayed
   4    As a teacher
   5    I need to assign grades and check that they display correctly in the gradebook when switching between views.
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | format |
  10        | Course 1 | C1 | topics |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | teacher1@example.com |
  14        | student1 | Student | 1 | student1@example.com |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19      And I log in as "teacher1"
  20      And I follow "Course 1"
  21      And I turn editing mode on
  22      And I add a "Assignment" to section "1" and I fill the form with:
  23        | Assignment name | Test assignment name 1 |
  24        | Description | Submit your online text |
  25        | assignsubmission_onlinetext_enabled | 1 |
  26      And I add a "Assignment" to section "1" and I fill the form with:
  27        | Assignment name | Test assignment name 2 |
  28        | Description | Submit your online text |
  29        | assignsubmission_onlinetext_enabled | 1 |
  30      And I log out
  31      And I log in as "student1"
  32      And I follow "Course 1"
  33      And I follow "Test assignment name 1"
  34      When I press "Add submission"
  35      And I set the following fields to these values:
  36        | Online text | This is a submission for assignment 1 |
  37      And I press "Save changes"
  38      Then I should see "Submitted for grading"
  39      And I follow "Course 1"
  40      And I follow "Test assignment name 2"
  41      When I press "Add submission"
  42      And I set the following fields to these values:
  43        | Online text | This is a submission for assignment 2 |
  44      And I press "Save changes"
  45      Then I should see "Submitted for grading"
  46      And I log out
  47      And I log in as "teacher1"
  48      And I follow "Course 1"
  49      And I navigate to "Grades" node in "Course administration"
  50      And I turn editing mode on
  51      And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
  52      And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
  53      And I press "Save changes"
  54      And I turn editing mode off
  55  
  56    @javascript
  57    Scenario: View and minimise the grader report containing hidden activities
  58      And I follow "Course 1"
  59      And I turn editing mode on
  60      And I open "Test assignment name 2" actions menu
  61      And I click on "Hide" "link" in the "Test assignment name 2" activity
  62      And I follow "Course 1"
  63      And I navigate to "Grades" node in "Course administration"
  64      And I select "Grader report" from the "Grade report" singleselect
  65      And I should see "Test assignment name 1"
  66      And I should see "Test assignment name 2"
  67      And I should see "Course total"
  68      And the following should exist in the "user-grades" table:
  69        | -1-                | -4-       | -5-       | -6-       |
  70        | Student 1          | 80        | 90        | 170       |
  71      And I click on "Change to aggregates only" "link"
  72      And I should not see "Test assignment name 1"
  73      And I should not see "Test assignment name 2"
  74      And I should see "Course total"
  75      And the following should exist in the "user-grades" table:
  76        | -1-                | -4-       |
  77        | Student 1          | 170       |
  78      And I click on "Change to grades only" "link"
  79      And I should see "Test assignment name 1"
  80      And I should see "Test assignment name 2"
  81      And I should not see "Course total"
  82      And the following should exist in the "user-grades" table:
  83        | -1-                | -4-       | -5-       |
  84        | Student 1          | 80        | 90        |
  85  
  86    @javascript
  87    Scenario: View and minimise the grader report containing hidden activities without the 'moodle/grade:viewhidden' capability
  88      And I follow "Course 1"
  89      And I turn editing mode on
  90      And I open "Test assignment name 2" actions menu
  91      And I click on "Hide" "link" in the "Test assignment name 2" activity
  92      And I log out
  93      And I log in as "admin"
  94      And I set the following system permissions of "Teacher" role:
  95        | capability | permission |
  96        | moodle/grade:viewhidden | Prevent |
  97      And I log out
  98      And I log in as "teacher1"
  99      And I follow "Course 1"
 100      And I navigate to "Grades" node in "Course administration"
 101      And I select "Grader report" from the "Grade report" singleselect
 102      And I should see "Test assignment name 1"
 103      And I should see "Test assignment name 2"
 104      And I should see "Course total"
 105      And the following should exist in the "user-grades" table:
 106        | -1-                | -4-       | -5-       | -6-       |
 107        | Student 1          | 80        | -         | 80        |
 108      And I click on "Change to aggregates only" "link"
 109      And I should not see "Test assignment name 1"
 110      And I should not see "Test assignment name 2"
 111      And I should see "Course total"
 112      And the following should exist in the "user-grades" table:
 113        | -1-                | -4-       |
 114        | Student 1          | 80        |
 115      And I click on "Change to grades only" "link"
 116      And I should see "Test assignment name 1"
 117      And I should see "Test assignment name 2"
 118      And I should not see "Course total"
 119      And the following should exist in the "user-grades" table:
 120        | -1-                | -4-       | -5-       |
 121        | Student 1          | 80        | -         |


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