Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 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.

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.