[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/tests/behat/ -> grade_single_item_scales.feature (source)

   1  @core @core_grades @javascript
   2  Feature: View gradebook when single item scales are used
   3    In order to use single item scales to grade activities
   4    As an teacher
   5    I need to be able to view gradebook with single item scales
   6  
   7    Background:
   8      Given I log in as "admin"
   9      And I set the following administration settings values:
  10        | grade_report_showranges    | 1 |
  11        | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
  12      And I navigate to "Scales" node in "Site administration > Grades"
  13      And I press "Add a new scale"
  14      And I set the following fields to these values:
  15        | Name  | Singleitem |
  16        | Scale | Ace!       |
  17      And I press "Save changes"
  18      And I log out
  19      And the following "courses" exist:
  20        | fullname | shortname |
  21        | Course 1 | C1        |
  22      And the following "users" exist:
  23        | username | firstname | lastname | email            | idnumber |
  24        | teacher1 | Teacher   | 1        | teacher1@example.com | t1       |
  25        | student1 | Student   | 1        | student1@example.com | s1       |
  26        | student2 | Student   | 2        | student2@example.com | s2       |
  27      And the following "course enrolments" exist:
  28        | user     | course | role           |
  29        | teacher1 | C1     | editingteacher |
  30        | student1 | C1     | student        |
  31        | student2 | C1     | student        |
  32      And the following "grade categories" exist:
  33        | fullname       | course |
  34        | Sub category 1 | C1     |
  35      And the following "activities" exist:
  36        | activity | course | idnumber | name                | intro             | gradecategory  |
  37        | assign   | C1     | a1       | Test assignment one | Submit something! | Sub category 1 |
  38      And I log in as "teacher1"
  39      And I follow "Course 1"
  40      And I follow "Test assignment one"
  41      And I follow "Edit settings"
  42      And I expand all fieldsets
  43      And I set the field "grade[modgrade_type]" to "Scale"
  44      And I set the field "grade[modgrade_scale]" to "Singleitem"
  45      And I press "Save and display"
  46      And I follow "View all submissions"
  47      And I click on "Grade" "link" in the "Student 1" "table_row"
  48      And I set the field "Grade" to "A"
  49      And I press "Save changes"
  50      And I press "Ok"
  51      And I follow "Course 1"
  52      And I navigate to "Grades" node in "Course administration"
  53      And I navigate to "Course grade settings" node in "Grade administration > Setup"
  54      And I set the field "Show weightings" to "Show"
  55      And I set the field "Show contribution to course total" to "Show"
  56      And I press "Save changes"
  57      And I follow "Grader report"
  58      And I turn editing mode on
  59  
  60    Scenario: Test displaying single item scales in gradebook in aggregation method Natural
  61      When I turn editing mode off
  62      Then the following should exist in the "user-grades" table:
  63        | -1-                | -4-       | -5-            | -6-          |
  64        | Student 1          | Ace!      | 1.00           | 1.00         |
  65      And the following should exist in the "user-grades" table:
  66        | -1-                | -2-       | -3-            | -4-          |
  67        | Range              | Ace!–Ace! | 0.00–1.00      | 0.00–1.00    |
  68        | Overall average    | Ace!      | 1.00           | 1.00         |
  69      And I follow "User report"
  70      And I select "Student 1" from the "Select all or one user" singleselect
  71      And the following should exist in the "user-grade" table:
  72        | Grade item          | Grade | Range     | Contribution to course total |
  73        | Test assignment one | Ace!  | Ace!–Ace! | 100.00 %                     |
  74        | Sub category 1 total| 1.00  | 0–1       | -                            |
  75        | Course total        | 1.00  | 0–1       | -                            |
  76      And I select "Student 2" from the "Select all or one user" singleselect
  77      And the following should exist in the "user-grade" table:
  78        | Grade item          | Grade | Range     | Contribution to course total |
  79        | Test assignment one | -     | Ace!–Ace! | -                            |
  80        | Sub category 1 total| -     | 0–1       | -                            |
  81        | Course total        | -     | 0–1       | -                            |
  82      And I select "Gradebook setup" from the "jump" singleselect
  83      And the following should exist in the "grade_edit_tree_table" table:
  84        | Name                | Max grade |
  85        | Test assignment one | 1.00      |
  86        | Sub category 1 total| 1.00      |
  87        | Course total        | 1.00      |
  88  
  89    Scenario Outline: Test displaying single item scales in gradebook in all other aggregation methods
  90      When I follow "Edit   Course 1"
  91      And I set the field "Aggregation" to "<aggregation>"
  92      And I press "Save changes"
  93      And I follow "Edit   Sub category 1"
  94      And I set the following fields to these values:
  95        | Aggregation     | <aggregation> |
  96        | Category name   | Sub category (<aggregation>) |
  97      And I press "Save changes"
  98      And I turn editing mode off
  99      Then the following should exist in the "user-grades" table:
 100        | -1-                | -4-       | -5-            | -6-            |
 101        | Student 1          | Ace!      | <cattotal1>    | <coursetotal1> |
 102        | Student 2          | -         | -              | -              |
 103      And the following should exist in the "user-grades" table:
 104        | -1-                | -2-       | -3-            | -4-            |
 105        | Range              | Ace!–Ace! | 0.00–100.0     | 0.00–100.00    |
 106        | Overall average    | Ace!      | <catavg>       | <overallavg>   |
 107      And I follow "User report"
 108      And I select "Student 1" from the "Select all or one user" singleselect
 109      And the following should exist in the "user-grade" table:
 110        | Grade item                                       | Grade          | Range       | Contribution to course total |
 111        | Test assignment one                              | Ace!           | Ace!–Ace!   | <contrib1>                   |
 112        | Sub category (<aggregation>) total<aggregation>. | <cattotal1>    | 0–100       | -                            |
 113        | Course total<aggregation>.                       | <coursetotal1> | 0–100       | -                            |
 114      And I select "Gradebook setup" from the "jump" singleselect
 115      And the following should exist in the "grade_edit_tree_table" table:
 116        | Name                                             | Max grade |
 117        | Test assignment one                              | Ace! (1)  |
 118        | Sub category (<aggregation>) total<aggregation>. | 100.00    |
 119        | Course total<aggregation>.                       | 100.00    |
 120  
 121      Examples:
 122        | aggregation                         | contrib1 | cattotal1 | coursetotal1 | catavg | overallavg |
 123        | Mean of grades                      | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 124        | Weighted mean of grades             | 0.00 %   | 100.00    | 100.00       | 100.00 | 100.00     |
 125        | Simple weighted mean of grades      | 0.00 %   | -         | -            | -      | -          |
 126        | Mean of grades (with extra credits) | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 127        | Median of grades                    | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 128        | Lowest grade                        | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 129        | Highest grade                       | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 130        | Mode of grades                      | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |


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