Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: behat_grade  - X-Ref

i_give_the_grade($grade, $userfullname, $itemname)   X-Ref
Enters a grade via the gradebook for a specific grade item and user when viewing the 'Grader report' with editing mode turned on.

param: int $grade
param: string $userfullname the user's fullname as returned by fullname()
param: string $itemname

i_give_the_feedback($feedback, $userfullname, $itemname)   X-Ref
Enters a quick feedback via the gradebook for a specific grade item and user when viewing
the 'Grader report' with editing mode turned on.

param: string $feedback
param: string $userfullname the user's fullname as returned by fullname()
param: string $itemname

i_set_the_following_settings_for_grade_item($gradeitem, TableNode $data)   X-Ref
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.

param: string $gradeitem
param: TableNode $data

i_hide_the_grade_item($gradeitem)   X-Ref
Hids a grade item or category.

Teacher must be on the grade setup page.

param: string $gradeitem

i_duplicate_the_grade_item($gradeitem)   X-Ref
Duplicates a grade item or category.

Teacher must be on the grade setup page.

param: string $gradeitem

i_set_calculation_for_grade_item_with_idnumbers($calculation, $gradeitem, TableNode $data)   X-Ref
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.

param: string $calculation The calculation.
param: string $gradeitem The grade item name.
param: TableNode $TableNode The grade item name - idnumbers relation.

i_set_calculation_for_grade_category_with_idnumbers($calculation, $gradeitem, TableNode $data)   X-Ref
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.

param: string $calculation The calculation.
param: string $gradeitem The grade item name.
param: TableNode $data The grade item name - idnumbers relation.

i_reset_weights_for_grade_category($gradeitem)   X-Ref
Resets the weights for the grade category

Teacher must be on the grade setup page.

param: $gradeitem

gradebook_calculations_for_the_course_are_frozen_at_version($coursename, $version)   X-Ref
Step allowing to test before-the-fix behaviour of the gradebook

param: string $coursename
param: string $version

select_in_gradebook_tabs($gradepath)   X-Ref
Select the tab in the gradebook. We must be on one of the gradebook pages already.

param: string $gradepath examples: "View > User report", "Letters > View", "Scales"

i_navigate_to_in_the_course_gradebook($gradepath)   X-Ref
Navigates to the course gradebook and selects a specified item from the grade navigation tabs.

Examples:
- I navigate to "Setup > Gradebook setup" in the course gradebook
- I navigate to "Scales" in the course gradebook
- I navigate to "Letters > View" in the course gradebook
- I navigate to "View > User report" in the course gradebook // for teachers
- I navigate to "User report" in the course gradebook // for students

param: string $gradepath