Steps definitions to help with rubrics.
More...
|
The const | DEFAULT_RUBRIC_LEVELS = 3 |
| number of levels added by default when a rubric is created.
|
|
const | PAGE_READY_JS |
| The JS code to check that the page is ready.
|
|
Steps definitions to help with rubrics.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ click_and_confirm()
behat_gradingform_rubric::click_and_confirm |
( |
| $node | ) |
|
|
protected |
Performs click confirming the action.
- Parameters
-
- Return values
-
◆ get_criterion_xpath()
behat_gradingform_rubric::get_criterion_xpath |
( |
| $criterionname | ) |
|
|
protected |
Returns the xpath representing the selected criterion.
It is the xpath when grading a rubric or viewing a rubric, it is not the same xpath when editing a rubric.
- Parameters
-
string | $criterionname | Literal including the criterion name. |
- Return values
-
◆ get_level_xpath()
behat_gradingform_rubric::get_level_xpath |
( |
| $points | ) |
|
|
protected |
Returns the xpath representing a selected level.
It is not including the path to the criterion.
It is the xpath when grading a rubric or viewing a rubric, it is not the same xpath when editing a rubric.
- Parameters
-
- Return values
-
◆ getSession()
behat_session_interface::getSession |
( |
| $name = null | ) |
|
|
inherited |
Returns the Mink session.
- Parameters
-
string | null | $name | name of the session OR active session will be used |
- Return values
-
Implemented in behat_form_field.
◆ i_define_the_following_rubric()
behat_gradingform_rubric::i_define_the_following_rubric |
( |
TableNode | $rubric | ) |
|
Defines the rubric with the provided data, following rubric's definition grid cells.
This method fills the rubric of the rubric definition form; the provided TableNode should contain one row for each criterion and each cell of the row should contain:
Criterion description
Criterion level 1 name
Criterion level 1 points
Criterion level 2 name
Criterion level 2 points
Criterion level 3 .....
Works with both JS and non-JS.
@When /^I define the following rubric:$/
- Exceptions
-
- Parameters
-
◆ i_grade_by_filling_the_rubric_with()
behat_gradingform_rubric::i_grade_by_filling_the_rubric_with |
( |
TableNode | $rubric | ) |
|
Grades filling the current page rubric.
Set one line per criterion and for each criterion set "| Criterion name | Points | Remark |".
@When /^I grade by filling the rubric with:$/
- Exceptions
-
- Parameters
-
◆ i_replace_rubric_level_with()
behat_gradingform_rubric::i_replace_rubric_level_with |
( |
| $currentvalue, |
|
|
| $value, |
|
|
| $criterionname ) |
Replaces a value from the specified criterion.
You can use it when editing rubrics, to set both name or points.
@When /^I replace "(?P<current_value_string>(?:[^"]|::")*)" rubric level with "(?P<value_string>(?:[^"]|")*)" in "(?P<criterion_string>(?:[^"]|::")*)" criterion$/
- Exceptions
-
- Parameters
-
string | $currentvalue | |
string | $value | |
string | $criterionname | |
◆ set_rubric_field_value()
behat_gradingform_rubric::set_rubric_field_value |
( |
| $name, |
|
|
| $value, |
|
|
| $visible = false ) |
|
protected |
Makes a hidden rubric field visible (if necessary) and sets a value on it.
- Parameters
-
string | $name | The name of the field |
string | $value | The value to set |
bool | $visible | |
- Return values
-
◆ the_level_with_points_is_not_selected_for_the_rubric_criterion()
behat_gradingform_rubric::the_level_with_points_is_not_selected_for_the_rubric_criterion |
( |
| $points, |
|
|
| $criterionname ) |
Checks that the level is not currently selected.
Works both when grading rubrics and viewing graded rubrics.
@Then /^the level with "(?P<points_number>::d+)" points is not selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|")*)"$/
- Exceptions
-
- Parameters
-
string | $criterionname | |
int | $points | |
- Return values
-
◆ the_level_with_points_is_selected_for_the_rubric_criterion()
behat_gradingform_rubric::the_level_with_points_is_selected_for_the_rubric_criterion |
( |
| $points, |
|
|
| $criterionname ) |
Checks that the level is currently selected.
Works both when grading rubrics and viewing graded rubrics.
@Then /^the level with "(?P<points_number>::d+)" points is selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|")*)"$/
- Exceptions
-
- Parameters
-
string | $criterionname | |
int | $points | |
- Return values
-
◆ the_level_with_points_was_previously_selected_for_the_rubric_criterion()
behat_gradingform_rubric::the_level_with_points_was_previously_selected_for_the_rubric_criterion |
( |
| $points, |
|
|
| $criterionname ) |
Checks that the level was previously selected and the user changed to another level.
@Then /^the level with "(?P<points_number>::d+)" points was previously selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|")*)"$/
- Exceptions
-
- Parameters
-
string | $criterionname | |
int | $points | |
- Return values
-
◆ PAGE_READY_JS
const behat_session_interface::PAGE_READY_JS |
|
inherited |
Initial value:= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"
The JS code to check that the page is ready.
The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all.
The documentation for this class was generated from the following file:
- grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php