[ Index ]

PHP Cross Reference of moodle-2.8

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 | [email protected] |
  11        | manager1 | Manager | 1 | [email protected] |
  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 follow "Course 1"
  27      And I go to "Test assignment 1 name" advanced grading definition page
  28      And I set the following fields to these values:
  29        | Name | Assignment 1 rubric |
  30        | Description | Assignment 1 description |
  31      And I define the following rubric:
  32        | Criterion 1 | Level 11 | 11 | Level 12 | 12 |
  33        | Criterion 2 | Level 21 | 21 | Level 22 | 22 |
  34      And I press "Save rubric and make it ready"
  35      When I publish "Test assignment 1 name" grading form definition as a public template
  36      And I log out
  37      And I log in as "teacher1"
  38      And I follow "Course 1"
  39      And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form
  40      Then I should see "Advanced grading: Test assignment 2 name (Submissions)"
  41      And I should see "Criterion 1"
  42      And I should see "Assignment 1 description"
  43      And I go to "Test assignment 2 name" advanced grading definition page
  44      And I should see "Current rubric status"
  45  
  46    @javascript
  47    Scenario: Create a rubric template and reuse it as a teacher, with Javascript enabled
  48      Then the field "Description" matches value "Assignment 1 description"
  49      And I should see "Criterion 1"
  50      And I press "Cancel"
  51  
  52    Scenario: Create a rubric template and reuse it as a teacher, with Javascript disabled
  53      Then the field "Description" matches value "Assignment 1 description"
  54      # Trying to avoid pointing by id or name as the code internals may change.
  55      And "//table[@class='criteria']//textarea[text()='Criterion 1']" "xpath_element" should exist
  56      And I press "Cancel"


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