Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
getSession ($name=null) | |
Returns the Mink session. More... | |
gradebook_calculations_for_the_course_are_frozen_at_version ($coursename, $version) | |
Step allowing to test before-the-fix behaviour of the gradebook. More... | |
i_duplicate_the_grade_item ($gradeitem) | |
Duplicates a grade item or category. More... | |
i_give_the_feedback ($feedback, $userfullname, $itemname) | |
Enters a quick feedback via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on. More... | |
i_give_the_grade ($grade, $userfullname, $itemname) | |
Enters a grade via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on. More... | |
i_hide_the_grade_item ($gradeitem) | |
Hids a grade item or category. More... | |
i_navigate_to_in_the_course_gradebook ($gradepath) | |
Navigates to the course gradebook and selects a specified item from the grade navigation tabs. More... | |
i_reset_weights_for_grade_category ($gradeitem) | |
Resets the weights for the grade category. More... | |
i_set_calculation_for_grade_category_with_idnumbers ($calculation, $gradeitem, TableNode $data) | |
Sets a calculated manual grade category total. More... | |
i_set_calculation_for_grade_item_with_idnumbers ($calculation, $gradeitem, TableNode $data) | |
Sets a calculated manual grade item. More... | |
i_set_the_following_settings_for_grade_item ($gradeitem, TableNode $data) | |
Changes the settings of a grade item or category or the course. More... | |
Public Attributes | |
const | EXTENDED_TIMEOUT = 10 |
And extended timeout for specific cases. More... | |
const | PAGE_READY_JS |
The JS code to check that the page is ready. More... | |
const | REDUCED_TIMEOUT = 2 |
Small timeout. More... | |
const | TIMEOUT = 6 |
The timeout for each Behat step (load page, wait for an element to load...). More... | |
Protected Member Functions | |
select_in_gradebook_tabs ($gradepath) | |
Select the tab in the gradebook. More... | |
|
inherited |
Returns the Mink session.
string | null | $name | name of the session OR active session will be used |
Behat::Mink::Session |
Implemented in behat_form_field.
behat_grade::gradebook_calculations_for_the_course_are_frozen_at_version | ( | $coursename, | |
$version | |||
) |
Step allowing to test before-the-fix behaviour of the gradebook.
@Given /^gradebook calculations for the course "(?P<coursename_string>(?:[^"]|::")*)" are frozen at version "(?P<version_string>(?:[^"]|")*)"$/
string | $coursename | |
string | $version |
behat_grade::i_duplicate_the_grade_item | ( | $gradeitem | ) |
Duplicates a grade item or category.
Teacher must be on the grade setup page.
@Given /^I duplicate the grade item "(?P<grade_item_string>(?:[^"]|::")*)"$/
string | $gradeitem |
behat_grade::i_give_the_feedback | ( | $feedback, | |
$userfullname, | |||
$itemname | |||
) |
Enters a quick feedback via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on.
@Given /^I give the feedback "(?P<grade_number>(?:[^"]|::")*)" to the user "(?P<username_string>(?:[^"]|")*)" for the grade item "(?P<grade_activity_string>(?:[^"]|::")*)"$/
string | $feedback | |
string | $userfullname | the user's fullname as returned by fullname() |
string | $itemname |
behat_grade::i_give_the_grade | ( | $grade, | |
$userfullname, | |||
$itemname | |||
) |
Enters a grade via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on.
@Given /^I give the grade "(?P<grade_number>(?:[^"]|::")*)" to the user "(?P<username_string>(?:[^"]|")*)" for the grade item "(?P<grade_activity_string>(?:[^"]|::")*)"$/
int | $grade | |
string | $userfullname | the user's fullname as returned by fullname() |
string | $itemname |
behat_grade::i_hide_the_grade_item | ( | $gradeitem | ) |
Hids a grade item or category.
Teacher must be on the grade setup page.
@Given /^I hide the grade item "(?P<grade_item_string>(?:[^"]|::")*)"$/
string | $gradeitem |
behat_grade::i_navigate_to_in_the_course_gradebook | ( | $gradepath | ) |
Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
Examples:
@Given /^I navigate to "(?P<gradepath_string>(?:[^"]|::")*)" in the course gradebook$/
string | $gradepath |
Reimplemented in behat_theme_classic_behat_grade.
behat_grade::i_reset_weights_for_grade_category | ( | $gradeitem | ) |
Resets the weights for the grade category.
Teacher must be on the grade setup page.
@Given /^I reset weights for grade category "(?P<grade_item_string>(?:[^"]|::")*)"$/
$gradeitem |
behat_grade::i_set_calculation_for_grade_category_with_idnumbers | ( | $calculation, | |
$gradeitem, | |||
TableNode | $data | ||
) |
Sets a calculated manual grade category total.
Needs a table with item name - idnumber relation. The step requires you to be in the 'Gradebook setup' page.
@Given /^I set "(?P<calculation_string>(?:[^"]|::")*)" calculation for grade category "(?P<grade_item_string>(?:[^"]|")*)" with idnumbers:$/
string | $calculation | The calculation. |
string | $gradeitem | The grade item name. |
TableNode | $data | The grade item name - idnumbers relation. |
behat_grade::i_set_calculation_for_grade_item_with_idnumbers | ( | $calculation, | |
$gradeitem, | |||
TableNode | $data | ||
) |
Sets a calculated manual grade item.
Needs a table with item name - idnumber relation. The step requires you to be in the 'Gradebook setup' page.
@Given /^I set "(?P<calculation_string>(?:[^"]|::")*)" calculation for grade item "(?P<grade_item_string>(?:[^"]|")*)" with idnumbers:$/
string | $calculation | The calculation. |
string | $gradeitem | The grade item name. |
TableNode | $TableNode | The grade item name - idnumbers relation. |
behat_grade::i_set_the_following_settings_for_grade_item | ( | $gradeitem, | |
TableNode | $data | ||
) |
Changes the settings of a grade item or category or the course.
Teacher must be either on the grade setup page or on the Grader report page with editing mode turned on.
@Given /^I set the following settings for grade item "(?P<grade_item_string>(?:[^"]|::")*)":$/
string | $gradeitem | |
TableNode | $data |
|
protected |
Select the tab in the gradebook.
We must be on one of the gradebook pages already.
string | $gradepath | examples: "View > User report", "Letters > View", "Scales" |
|
inherited |
And extended timeout for specific cases.
|
inherited |
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.
|
inherited |
Small timeout.
A reduced timeout for cases where self::TIMEOUT is too much and a simple $this->getSession()->getPage()->find() could not be enough.
|
inherited |
The timeout for each Behat step (load page, wait for an element to load...).