Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | List of all members
quizaccess_seb\access_manager Class Reference

Manage the access to the quiz. More...

Public Member Functions

 __construct (quiz $quiz)
 The access_manager constructor. More...
 
 can_bypass_seb ()
 Check if user has any capability to bypass the Safe Exam Browser requirement. More...
 
 get_quiz ()
 Getter for the quiz object. More...
 
 get_received_browser_exam_key ()
 Returns the Browser Exam Key hash. More...
 
 get_received_config_key ()
 Returns Safe Exam Browser Config Key hash. More...
 
 get_seb_use_type ()
 Get type of SEB usage for the quiz. More...
 
 get_valid_config_key ()
 Return expected SEB config key. More...
 
 is_using_seb ()
 Check if using Safe Exam Browser. More...
 
 seb_required ()
 Check if Safe Exam Browser is required to access quiz. More...
 
 should_validate_basic_header ()
 Should validate basic header? More...
 
 should_validate_browser_exam_key ()
 Should validate browser exam key? More...
 
 should_validate_config_key ()
 Should validate SEB config key? More...
 
 validate_basic_header ()
 This is the basic check for the Safe Exam Browser previously used in the quizaccess_safebrowser plugin that managed basic Moodle interactions with SEB. More...
 
 validate_browser_exam_keys ()
 Check if the browser exam key hash in header matches one of the listed browser exam keys from quiz settings. More...
 
 validate_config_key ()
 Check if the config key hash in header matches quiz settings. More...
 

Detailed Description

Manage the access to the quiz.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

quizaccess_seb\access_manager::__construct ( quiz  $quiz)

The access_manager constructor.

Parameters
quiz$quizThe details of the quiz.

Member Function Documentation

◆ can_bypass_seb()

quizaccess_seb\access_manager::can_bypass_seb ( )

Check if user has any capability to bypass the Safe Exam Browser requirement.

Return values
boolTrue if user can bypass check.

◆ get_quiz()

quizaccess_seb\access_manager::get_quiz ( )

Getter for the quiz object.

Return values
quiz

◆ get_received_browser_exam_key()

quizaccess_seb\access_manager::get_received_browser_exam_key ( )

Returns the Browser Exam Key hash.

Return values
string|null

◆ get_received_config_key()

quizaccess_seb\access_manager::get_received_config_key ( )

Returns Safe Exam Browser Config Key hash.

Return values
string|null

◆ get_seb_use_type()

quizaccess_seb\access_manager::get_seb_use_type ( )

Get type of SEB usage for the quiz.

Return values
int

◆ get_valid_config_key()

quizaccess_seb\access_manager::get_valid_config_key ( )

Return expected SEB config key.

Return values
string|null

◆ is_using_seb()

quizaccess_seb\access_manager::is_using_seb ( )

Check if using Safe Exam Browser.

Return values
bool

◆ seb_required()

quizaccess_seb\access_manager::seb_required ( )

Check if Safe Exam Browser is required to access quiz.

If quizsettings do not exist, then there is no requirement for using SEB.

Return values
boolIf required.

◆ should_validate_basic_header()

quizaccess_seb\access_manager::should_validate_basic_header ( )

Should validate basic header?

Return values
bool

◆ should_validate_browser_exam_key()

quizaccess_seb\access_manager::should_validate_browser_exam_key ( )

Should validate browser exam key?

Return values
bool

◆ should_validate_config_key()

quizaccess_seb\access_manager::should_validate_config_key ( )

Should validate SEB config key?

Return values
bool

◆ validate_basic_header()

quizaccess_seb\access_manager::validate_basic_header ( )

This is the basic check for the Safe Exam Browser previously used in the quizaccess_safebrowser plugin that managed basic Moodle interactions with SEB.

Return values
bool

◆ validate_browser_exam_keys()

quizaccess_seb\access_manager::validate_browser_exam_keys ( )

Check if the browser exam key hash in header matches one of the listed browser exam keys from quiz settings.

Return values
boolTrue if header key matches one of the saved keys.

◆ validate_config_key()

quizaccess_seb\access_manager::validate_config_key ( )

Check if the config key hash in header matches quiz settings.

Return values
boolTrue if header key matches saved key.

The documentation for this class was generated from the following file: