Search moodle.org's
Developer Documentation

See Release Notes

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

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

(no description)

File Size: 150 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.

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.
return: array

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.

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