[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/activity_results/tests/behat/ -> lowscoreswithoutgroups.feature (source)

   1  @block @block_activity_results
   2  Feature: The activity results block displays student scores
   3    In order to be display student scores
   4    As a user
   5    I need to see the activity results block
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email | idnumber |
  10        | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
  11        | student1 | Student | 1 | student1@example.com | S1 |
  12        | student2 | Student | 2 | student2@example.com | S2 |
  13        | student3 | Student | 3 | student3@example.com | S3 |
  14        | student4 | Student | 4 | student4@example.com | S4 |
  15        | student5 | Student | 5 | student5@example.com | S5 |
  16      And the following "courses" exist:
  17        | fullname | shortname | category |
  18        | Course 1 | C1 | 0 |
  19      And the following "course enrolments" exist:
  20        | user | course | role |
  21        | teacher1 | C1 | editingteacher |
  22        | student1 | C1 | student |
  23        | student2 | C1 | student |
  24        | student3 | C1 | student |
  25        | student4 | C1 | student |
  26        | student5 | C1 | student |
  27      And I log in as "teacher1"
  28      And I follow "Course 1"
  29      And I turn editing mode on
  30      And I add a "Assignment" to section "1" and I fill the form with:
  31        | Assignment name | Test assignment |
  32        | Description | Offline text |
  33        | assignsubmission_file_enabled | 0 |
  34      And I follow "Course 1"
  35      And I navigate to "Grades" node in "Course administration"
  36      And I turn editing mode on
  37      And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
  38      And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
  39      And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment"
  40      And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment"
  41      And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment"
  42      And I press "Save changes"
  43      And I follow "Course 1"
  44  
  45    Scenario: Configure the block on the course page to show 1 low score
  46      Given I add the "Activity results" block
  47      When I configure the "Activity results" block
  48      And I set the following fields to these values:
  49        | id_config_showbest | 0 |
  50        | id_config_showworst | 1 |
  51        | id_config_gradeformat | Percentages |
  52        | id_config_nameformat | Display full names |
  53        | id_config_decimalpoints | 0 |
  54      And I press "Save changes"
  55      Then I should see "Student 5" in the "Activity results" "block"
  56      And I should see "50%" in the "Activity results" "block"
  57  
  58    Scenario: Try to configure the block on the course page to show 1 low score as a fraction
  59      Given I add the "Activity results" block
  60      When I configure the "Activity results" block
  61      And I set the following fields to these values:
  62        | id_config_showbest | 0 |
  63        | id_config_showworst | 1 |
  64        | id_config_gradeformat | Fractions |
  65        | id_config_nameformat | Display full names |
  66      And I press "Save changes"
  67      Then I should see "Student 5" in the "Activity results" "block"
  68      And I should see "50.00/100.00" in the "Activity results" "block"
  69  
  70    Scenario: Try to configure the block on the course page to show 1 low score as a absolute number
  71      Given I add the "Activity results" block
  72      When I configure the "Activity results" block
  73      And I set the following fields to these values:
  74        | id_config_showbest | 0 |
  75        | id_config_showworst | 1 |
  76        | id_config_gradeformat | Absolute numbers |
  77        | id_config_nameformat | Display full names |
  78      And I press "Save changes"
  79      Then I should see "Student 5" in the "Activity results" "block"
  80      And I should see "50.00" in the "Activity results" "block"
  81  
  82    Scenario: Try to configure the block on the course page to show multiple low scores as percentages
  83      Given I add the "Activity results" block
  84      When I configure the "Activity results" block
  85      And I set the following fields to these values:
  86        | id_config_showbest | 0 |
  87        | id_config_showworst | 3 |
  88        | id_config_gradeformat | Percentages |
  89        | id_config_nameformat | Display full names |
  90        | id_config_decimalpoints | 0 |
  91      And I press "Save changes"
  92      Then I should see "Student 5" in the "Activity results" "block"
  93      And I should see "50%" in the "Activity results" "block"
  94      And I should see "Student 4" in the "Activity results" "block"
  95      And I should see "60%" in the "Activity results" "block"
  96      And I should see "Student 3" in the "Activity results" "block"
  97      And I should see "70%" in the "Activity results" "block"
  98  
  99    Scenario: Try to configure the block on the course page to show multiple low scores as fractions
 100      Given I add the "Activity results" block
 101      When I configure the "Activity results" block
 102      And I set the following fields to these values:
 103        | id_config_showbest | 0 |
 104        | id_config_showworst | 3 |
 105        | id_config_gradeformat | Fractions |
 106        | id_config_nameformat | Display full names |
 107      And I press "Save changes"
 108      Then I should see "Student 5" in the "Activity results" "block"
 109      And I should see "50.00/100.00" in the "Activity results" "block"
 110      And I should see "Student 4" in the "Activity results" "block"
 111      And I should see "60.00/100.00" in the "Activity results" "block"
 112      And I should see "Student 3" in the "Activity results" "block"
 113      And I should see "70.00/100.00" in the "Activity results" "block"
 114  
 115    Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers
 116      Given I add the "Activity results" block
 117      When I configure the "Activity results" block
 118      And I set the following fields to these values:
 119        | id_config_showbest | 0 |
 120        | id_config_showworst | 3 |
 121        | id_config_gradeformat | Absolute numbers |
 122        | id_config_nameformat | Display full names |
 123      And I press "Save changes"
 124      Then I should see "Student 5" in the "Activity results" "block"
 125      And I should see "50.00" in the "Activity results" "block"
 126      And I should see "Student 4" in the "Activity results" "block"
 127      And I should see "60.00" in the "Activity results" "block"
 128      And I should see "Student 3" in the "Activity results" "block"
 129      And I should see "70.00" in the "Activity results" "block"
 130  
 131    Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
 132      Given I add the "Activity results" block
 133      When I configure the "Activity results" block
 134      And I set the following fields to these values:
 135        | id_config_showbest | 0 |
 136        | id_config_showworst | 3 |
 137        | id_config_gradeformat | Percentages |
 138        | id_config_nameformat | Display only ID numbers |
 139      And I press "Save changes"
 140      Then I should see "User S5" in the "Activity results" "block"
 141      And I should see "50.00%" in the "Activity results" "block"
 142      And I should see "User S4" in the "Activity results" "block"
 143      And I should see "60.00%" in the "Activity results" "block"
 144      And I should see "User S3" in the "Activity results" "block"
 145      And I should see "70.00%" in the "Activity results" "block"
 146  
 147    Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
 148      Given I add the "Activity results" block
 149      When I configure the "Activity results" block
 150      And I set the following fields to these values:
 151        | id_config_showbest | 0 |
 152        | id_config_showworst | 3 |
 153        | id_config_gradeformat | Percentages |
 154        | id_config_nameformat | Anonymous results |
 155      And I press "Save changes"
 156      Then I should see "User" in the "Activity results" "block"
 157      And I should see "50.00%" in the "Activity results" "block"
 158      And I should see "60.00%" in the "Activity results" "block"
 159      And I should see "70.00%" in the "Activity results" "block"


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