Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Mock registration. More...
Public Member Functions | |
get_api_key () | |
Get api key. | |
get_regurl () | |
Get the registration URL. | |
get_secret_key () | |
Get secret key. | |
get_siteid () | |
Return the registered site id. | |
get_termsurl () | |
Get the terms and conditions URL. | |
invalidate_summary_time () | |
Invalidate summary time. | |
invalidate_validation_time () | |
Invalidate validation time. | |
is_not_entered () | |
Is not entered. | |
mark_summary_data_sent () | |
Perform all actions needed to note that the summary data was sent. | |
revalidate () | |
Even if the regisration is currently valid, validate it again. | |
set_keys_for_registration (string $apikey, string $secretkey) | |
Perform all necessary steps when new keys are added. | |
set_siteid (int $id) | |
Set the registered site id. | |
toolkit_is_active () | |
System can be used when it has been validated, or when its still awaiting validation. | |
validate () | |
If the registration is not already valid, validate it. | |
validation_error () | |
Return true if there was a validation error. | |
validation_pending () | |
The "not validated" state also needs the grace period to still be in effect. | |
Protected Member Functions | |
apikey_is_valid (string $apikey) | |
Validates that the entered API key is in the expected format. | |
get_check_time () | |
Get the time of the last registration check. | |
get_grace_period () | |
Get the registration grace period. | |
get_registration_connection () | |
Get registration connection. | |
get_status () | |
Return the current registration status. | |
get_summary_time () | |
Return the time of the last summary update. | |
get_validation_time () | |
Return the time of the registration validation. | |
grace_period_valid () | |
Check if the unvalidated time is still within the grace period. | |
keys_are_valid (?string $apikey=null, ?string $secretkey=null) | |
Return true if all keys have valid format. | |
secretkey_is_valid (string $secretkey) | |
Validates that the entered Secret key is in the expected format. | |
set_api_key (string $keyvalue) | |
Set the configured api key value. | |
set_check_time (int $time=0) | |
Set the time of the last registration check. | |
set_error () | |
Set the status to "error". | |
set_expired () | |
Set the status to "expired". | |
set_invalid () | |
Set the registration as invalid. | |
set_not_entered () | |
Set the status as keys "not entered". | |
set_not_validated () | |
"Not validated" means we have keys, but have not confirmed them yet. | |
set_secret_key (string $keyvalue) | |
Set the configured secret key value. | |
set_status (int $status) | |
Set the current registration status. | |
set_summary_time (int $time=0) | |
Set the time of the summary update. | |
set_valid () | |
Set the registration as valid. | |
set_validation_time (int $time=0) | |
Set the registration validation time. | |
status_is_error () | |
Return true if the current status is "error". | |
status_is_expired () | |
Return true if the current status is "expired". | |
status_is_invalid () | |
Return true if the current status is "invalid". | |
status_is_not_entered () | |
Return true if the current status is "not entered". | |
status_is_pending () | |
Return true if the current status is "pending". | |
status_is_validated () | |
Return true if the logic says that the registration is valid. | |
summarydata_grace_period_expired () | |
Check if the last time the summary data was sent is within the grace period. | |
valid_key_format (string $key) | |
Validates that the passed in key looks like an MD5 hash. | |
Mock registration.
|
protectedinherited |
Validates that the entered API key is in the expected format.
string | $apikey |
bool |
|
inherited |
|
protectedinherited |
|
protectedinherited |
Get the registration grace period.
int |
|
protected |
Get registration connection.
brickfieldconnect |
Reimplemented from tool_brickfield\registration.
|
inherited |
Get the registration URL.
string |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
Get the terms and conditions URL.
string |
|
protectedinherited |
|
protectedinherited |
Check if the unvalidated time is still within the grace period.
bool |
tool_brickfield\mock_registration::invalidate_summary_time | ( | ) |
tool_brickfield\mock_registration::invalidate_validation_time | ( | ) |
tool_brickfield\mock_registration::is_not_entered | ( | ) |
Is not entered.
bool |
|
protectedinherited |
Return true if all keys have valid format.
string | null | $apikey | |
string | null | $secretkey |
bool |
|
inherited |
Even if the regisration is currently valid, validate it again.
bool |
dml_exception |
|
protectedinherited |
Validates that the entered Secret key is in the expected format.
string | $secretkey |
bool |
|
protectedinherited |
Set the configured api key value.
string | $keyvalue |
bool |
|
protectedinherited |
Set the time of the last registration check.
int | $time |
bool |
|
protectedinherited |
Set the status to "error".
bool |
|
protectedinherited |
Set the status to "expired".
bool |
|
protectedinherited |
Set the registration as invalid.
bool |
|
inherited |
Perform all necessary steps when new keys are added.
Also check that they actually look like keys.
string | $apikey | |
string | $secretkey |
bool |
|
protectedinherited |
Set the status as keys "not entered".
bool |
|
protectedinherited |
"Not validated" means we have keys, but have not confirmed them yet.
Set the validation time to start the grace period.
bool |
|
protectedinherited |
Set the configured secret key value.
string | $keyvalue |
bool |
|
inherited |
Set the registered site id.
int | $id |
bool |
|
protectedinherited |
Set the current registration status.
int | $status |
bool |
|
protectedinherited |
Set the time of the summary update.
int | $time |
bool |
|
protectedinherited |
Set the registration as valid.
bool |
|
protectedinherited |
Set the registration validation time.
int | $time |
bool |
|
protectedinherited |
Return true if the current status is "error".
bool |
|
protectedinherited |
Return true if the current status is "expired".
bool |
|
protectedinherited |
Return true if the current status is "invalid".
bool |
|
protectedinherited |
Return true if the current status is "not entered".
bool |
|
protectedinherited |
Return true if the current status is "pending".
bool |
|
protectedinherited |
Return true if the logic says that the registration is valid.
bool |
|
protectedinherited |
Check if the last time the summary data was sent is within the grace period.
bool |
|
inherited |
System can be used when it has been validated, or when its still awaiting validation.
bool |
|
protectedinherited |
Validates that the passed in key looks like an MD5 hash.
string | $key |
bool |
|
inherited |
If the registration is not already valid, validate it.
This may connect to the registration site.
bool |
dml_exception |
|
inherited |
Return true if there was a validation error.
bool |
|
inherited |
The "not validated" state also needs the grace period to still be in effect.
bool |