Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402] [Versions 402 and 403]

(no description)

File Size: 261 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/behat/behat_base.php

Defines 1 class


Class: behat_grades  - X-Ref

Behat grade related steps definitions.

get_partial_named_selectors()   X-Ref
Return the list of partial named selectors.

return: array

resolve_page_instance_url(string $type, string $identifier)   X-Ref
Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'.

Recognised page names are:
| pagetype              | name meaning | description                                       |
| [report] view         | Course name  | The view page for the specified course and report |
| gradebook setup       | Course name  | The gradebook setup page for the specified course |
| course grade settings | Course name  | The grade settings page                           |
| outcomes              | Course name  | The grade outcomes page                           |
| scales                | Course name  | The grade scales page                             |

param: string $type identifies which type of page this is - for example "Grader > View"
param: string $identifier identifies the particular page - for example "Course name"
return: moodle_url the corresponding URL.

i_select_in_the($value, $element, $selectortype)   X-Ref
Select a given element within a specific container instance.

param: string $value The Needle
param: string  $element The Haystack to select within
param: string $selectortype What type of haystack we are looking in

get_grade_item_id(string $itemname)   X-Ref
Gets the grade item id from its name.

param: string $itemname Item name
return: int

get_course_grade_category_id(string $coursename)   X-Ref
Gets course grade category id from coursename.

param: string $coursename
return: int

get_grade_category_id(string $categoryname)   X-Ref
Gets grade category id from its name.

param: string $categoryname
return: int

i_click_on_grade_item_menu(string $itemname, string $itemtype, string $page)   X-Ref
Clicks on given grade item menu.

param: string $itemname Item name
param: string $itemtype Item type - grade item, category or course
param: string $page Page - setup or grader