Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 155 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

validate_quiz_keys:: (4 methods):
  execute_parameters()
  execute()
  execute_returns()
  get_quiz_id()


Class: validate_quiz_keys  - X-Ref

Validate browser exam key and config key.

execute_parameters()   X-Ref
External function parameters.

return: external_function_parameters

execute(string $cmid, string $url, ?string $configkey = null, ?string $browserexamkey = null)   X-Ref
Validate a SEB config key or browser exam key.

return: array
param: string $cmid Course module ID.
param: string $url URL of the page on which the SEB JS API generated the keys.
param: string|null $configkey A SEB config key hash. Includes URL in the hash.
param: string|null $browserexamkey A SEB browser exam key hash. Includes the URL in the hash.

execute_returns()   X-Ref
External function returns.

return: external_single_structure

get_quiz_id(string $cmid)   X-Ref
Check if there is a valid quiz corresponding to a course module it.

return: int Returns quiz id if cmid matches valid quiz, or 0 if there is no match.
param: string $cmid Course module ID.