[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/grading/form/rubric/tests/behat/ -> publish_rubric_templates.feature (source)

   1  @gradingform @gradingform_rubric
   2  Feature: Publish rubrics as templates
   3    In order to save time to teachers
   4    As a manager
   5    I need to publish rubrics and make them available to all teachers
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11        | manager1 | Manager | 1 | manager1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | format |
  14        | Course 1 | C1 | topics |
  15      And the following "activities" exist:
  16        | activity | course | idnumber | name                   | intro | advancedgradingmethod_submissions |
  17        | assign   | C1     | A1       | Test assignment 1 name | TA1   | rubric                            |
  18        | assign   | C1     | A2       | Test assignment 2 name | TA2   | rubric                            |
  19      And the following "course enrolments" exist:
  20        | user | course | role |
  21        | teacher1 | C1 | editingteacher |
  22      And the following "system role assigns" exist:
  23        | user | role | contextlevel | reference |
  24        | manager1 | manager | System | |
  25      And I log in as "manager1"
  26      And I am on site homepage
  27      And I follow "Course 1"
  28      And I go to "Test assignment 1 name" advanced grading definition page
  29      And I set the following fields to these values:
  30        | Name | Assignment 1 rubric |
  31        | Description | Assignment 1 description |
  32      And I define the following rubric:
  33        | Criterion 1 | Level 11 | 11 | Level 12 | 12 |
  34        | Criterion 2 | Level 21 | 21 | Level 22 | 22 |
  35      And I press "Save rubric and make it ready"
  36      When I publish "Test assignment 1 name" grading form definition as a public template
  37      And I log out
  38      And I log in as "teacher1"
  39      And I follow "Course 1"
  40      And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form
  41      Then I should see "Advanced grading: Test assignment 2 name (Submissions)"
  42      And I should see "Criterion 1"
  43      And I should see "Assignment 1 description"
  44      And I go to "Test assignment 2 name" advanced grading definition page
  45      And I should see "Current rubric status"
  46  
  47    @javascript
  48    Scenario: Create a rubric template and reuse it as a teacher, with Javascript enabled
  49      Then the field "Description" matches value "Assignment 1 description"
  50      And I should see "Criterion 1"
  51      And I press "Cancel"
  52  
  53    Scenario: Create a rubric template and reuse it as a teacher, with Javascript disabled
  54      Then the field "Description" matches value "Assignment 1 description"
  55      # Trying to avoid pointing by id or name as the code internals may change.
  56      And "//table[@class='criteria']//textarea[text()='Criterion 1']" "xpath_element" should exist
  57      And I press "Cancel"


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