[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @core @core_grades
   2  Feature: We can enter in grades and view reports from the gradebook
   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.
   6    I need to enable grade weightings and check that they are displayed correctly.
   7  
   8    Background:
   9      Given the following "courses" exist:
  10        | fullname | shortname | format |
  11        | Course 1 | C1 | topics |
  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      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20      And I log in as "admin"
  21      And I set the following administration settings values:
  22        | 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 |
  23      And I log out
  24      And I log in as "teacher1"
  25      And I follow "Course 1"
  26      And I turn editing mode on
  27      And I add a "Assignment" to section "1" and I fill the form with:
  28        | Assignment name | Test assignment name 1 |
  29        | Description | Submit your online text |
  30        | assignsubmission_onlinetext_enabled | 1 |
  31      And I add a "Assignment" to section "1" and I fill the form with:
  32        | Assignment name | Test assignment name 2 |
  33        | Description | Submit your online text |
  34        | assignsubmission_onlinetext_enabled | 1 |
  35      And I log out
  36      And I log in as "student1"
  37      And I follow "Course 1"
  38      And I follow "Test assignment name 1"
  39      When I press "Add submission"
  40      And I set the following fields to these values:
  41        | Online text | This is a submission for assignment 1 |
  42      And I press "Save changes"
  43      Then I should see "Submitted for grading"
  44      And I follow "Course 1"
  45      And I follow "Test assignment name 2"
  46      When I press "Add submission"
  47      And I set the following fields to these values:
  48        | Online text | This is a submission for assignment 2 |
  49      And I press "Save changes"
  50      Then I should see "Submitted for grading"
  51      And I log out
  52      And I log in as "teacher1"
  53      And I follow "Course 1"
  54      And I navigate to "Grades" node in "Course administration"
  55      And I turn editing mode on
  56      And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
  57      And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
  58      And I press "Save changes"
  59  
  60    Scenario: Grade a grade item and ensure the results display correctly in the gradebook
  61      When I select "User report" from the "Grade report" singleselect
  62      And the "Grade report" select box should contain "Grader report"
  63      And the "Grade report" select box should contain "Outcomes report"
  64      And the "Grade report" select box should contain "User report"
  65      And the "Select all or one user" select box should contain "All users (1)"
  66      And I log out
  67      And I log in as "student1"
  68      And I follow "Grades" in the user menu
  69      And I follow "Course 1"
  70      Then the following should exist in the "user-grade" table:
  71        | Grade item | Grade | Range | Percentage |
  72        | Test assignment name 1 | 80.00 | 0–100 | 80.00 % |
  73        | Test assignment name 2 | 90.00 | 0–100 | 90.00 % |
  74        | Course total | 170.00 | 0–200 | 85.00 % |
  75      And the following should not exist in the "user-grade" table:
  76        | Grade item | Grade | Range | Percentage |
  77        | Course total | 90.00 | 0–100 | 90.00 % |
  78      And I follow "Grades" in the user menu
  79      And "Course 1" row "Grade" column of "overview-grade" table should contain "170.00"
  80      And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00"
  81  
  82    Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
  83      When I select "Gradebook setup" from the "Grade report" singleselect
  84      And I set the following settings for grade item "Course 1":
  85        | Aggregation | Weighted mean of grades |
  86      And I set the field "Extra credit value for Test assignment name" to "0.72"
  87      And I press "Save changes"
  88      And I select "User report" from the "Grade report" singleselect
  89      And I navigate to "Course grade settings" node in "Grade administration > Setup"
  90      And I set the following fields to these values:
  91        | Show weightings | Show |
  92      And I press "Save changes"
  93      And I log out
  94      And I log in as "student1"
  95      And I follow "Grades" in the user menu
  96      And I follow "Course 1"
  97      Then the following should exist in the "user-grade" table:
  98        | Grade item | Calculated weight | Grade | Range | Percentage |
  99        | Test assignment name 1 | 41.86 % | 80.00 | 0–100 | 80.00 % |
 100        | Test assignment name 2 | 58.14 % | 90.00 | 0–100 | 90.00 % |
 101        | Course totalWeighted mean of grades. | - | 85.81 | 0–100 | 85.81 % |
 102      And the following should not exist in the "user-grade" table:
 103        | Grade item | Calculated weight | Percentage |
 104        | Test assignment name 1 | 0.72% | 0.72% |
 105        | Test assignment name 2 | 1.00% | 1.00% |
 106        | Course total | 1.00% | 1.00% |


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