[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @core @core_grades
   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        | [email protected] | t1       |
  25        | student1 | Student   | 1        | [email protected] | s1       |
  26        | student2 | Student   | 2        | [email protected] | 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/grade all submissions"
  47      And I click on "Grade Student 1" "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 follow "Course 1"
  51      And I follow "Grades"
  52      And I navigate to "Course grade settings" node in "Grade administration > Setup"
  53      And I set the field "Show weightings" to "Show"
  54      And I set the field "Show contribution to course total" to "Show"
  55      And I press "Save changes"
  56      And I follow "Grader report"
  57      And I turn editing mode on
  58  
  59    @javascript
  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 set the field "Select all or one user" to "Student 1"
  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 set the field "Select all or one user" to "Student 2"
  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 set the field "jump" to "Categories and items"
  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    @javascript
  90    Scenario Outline: Test displaying single item scales in gradebook in all other aggregation methods
  91      When I follow "Edit   Course 1"
  92      And I set the field "Aggregation" to "<aggregation>"
  93      And I press "Save changes"
  94      And I follow "Edit   Sub category 1"
  95      And I expand all fieldsets
  96      And I set the field "Aggregation" to "<aggregation>"
  97      And I set the field "Category name" to "Sub category (<aggregation>)"
  98      # And I set the field "Maximum grade" to "5"
  99      # And I set the field "Minimum grade" to "1"
 100      And I press "Save changes"
 101      And I turn editing mode off
 102      Then the following should exist in the "user-grades" table:
 103        | -1-                | -4-       | -5-            | -6-            |
 104        | Student 1          | Ace!      | <cattotal1>    | <coursetotal1> |
 105        | Student 2          | -         | -              | -              |
 106      And the following should exist in the "user-grades" table:
 107        | -1-                | -2-       | -3-            | -4-            |
 108        | Range              | Ace!–Ace! | 0.00–100.0     | 0.00–100.00    |
 109        | Overall average    | Ace!      | <catavg>       | <overallavg>   |
 110      And I follow "User report"
 111      And I set the field "Select all or one user" to "Student 1"
 112      And I click on "Select all or one user" "select"
 113      And the following should exist in the "user-grade" table:
 114        | Grade item                        | Grade          | Range       | Contribution to course total |
 115        | Test assignment one               | Ace!           | Ace!–Ace!   | <contrib1>                   |
 116        | Sub category (<aggregation>) total<aggregation>.      | <cattotal1>    | 0–100       | -                            |
 117        | Course total<aggregation>.        | <coursetotal1> | 0–100       | -                            |
 118      And I set the field "jump" to "Categories and items"
 119      And the following should exist in the "grade_edit_tree_table" table:
 120        | Name                         | Max grade |
 121        | Test assignment one          | Ace! (1)  |
 122        | Sub category (<aggregation>) total<aggregation>. | 100.00    |
 123        | Course total<aggregation>.   | 100.00    |
 124  
 125      Examples:
 126        | aggregation                         | contrib1 | cattotal1 | coursetotal1 | catavg | overallavg |
 127        | Mean of grades                      | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 128        | Weighted mean of grades             | 0.00 %   | 100.00    | -            | 100.00 | -          |
 129        | Simple weighted mean of grades      | 0.00 %   | -         | -            | -      | -          |
 130        | Mean of grades (with extra credits) | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 131        | Median of grades                    | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 132        | Lowest grade                        | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 133        | Highest grade                       | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |
 134        | Mode of grades                      | 100.00 % | 100.00    | 100.00       | 100.00 | 100.00     |


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1