Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Open Badges Assertions specification 1.0 More...
Public Member Functions | |
__construct ($hash, $obversion=OPEN_BADGES_V2) | |
Constructs with issued badge unique hash. More... | |
get_alignments () | |
Get alignment of the badge. More... | |
get_assertion_hash () | |
Get the local id for this badge assertion. More... | |
get_badge_assertion ($issued=true, $usesalt=true) | |
Get badge assertion. More... | |
get_badge_class ($issued=true) | |
Get badge class information. More... | |
get_badge_id () | |
Get the local id for this badge. More... | |
get_criteria_badge_class () | |
Get criteria of badge class. More... | |
get_endorsement () | |
Get endorsement of the badge. More... | |
get_issuer () | |
Get badge issuer information. More... | |
get_related_badges (badge $badge) | |
Get related badges of the badge. More... | |
Protected Member Functions | |
embed_data_badge_version2 (&$json, $type=OPEN_BADGES_V2_TYPE_ASSERTION) | |
Embed data of Open Badges Specification Version 2.0 to json. More... | |
Open Badges Assertions specification 1.0
Badge asserion is defined by three parts:
core_badges_assertion::__construct | ( | $hash, | |
$obversion = OPEN_BADGES_V2 |
|||
) |
Constructs with issued badge unique hash.
string | $hash | Badge unique hash from badge_issued table. |
int | $obversion | to control version JSON-LD. |
|
protected |
Embed data of Open Badges Specification Version 2.0 to json.
array | $json | for assertion, badges, issuer. |
string | $type | Content type. |
core_badges_assertion::get_alignments | ( | ) |
Get alignment of the badge.
array | information. |
core_badges_assertion::get_assertion_hash | ( | ) |
Get the local id for this badge assertion.
string |
core_badges_assertion::get_badge_assertion | ( | $issued = true , |
|
$usesalt = true |
|||
) |
Get badge assertion.
boolean | $issued | Include the nested badge issued information. |
boolean | $usesalt | Hash the identity and include the salt information for the hash. |
array | Badge assertion. |
core_badges_assertion::get_badge_class | ( | $issued = true | ) |
Get badge class information.
boolean | $issued | Include the nested badge issuer information. |
array | Badge Class information. |
core_badges_assertion::get_badge_id | ( | ) |
Get the local id for this badge.
int |
core_badges_assertion::get_criteria_badge_class | ( | ) |
Get criteria of badge class.
array|string | Criteria information. |
core_badges_assertion::get_endorsement | ( | ) |
Get endorsement of the badge.
false|stdClass | Endorsement information. |
core_badges_assertion::get_issuer | ( | ) |
Get badge issuer information.
array | Issuer information. |
core_badges_assertion::get_related_badges | ( | badge | $badge | ) |
Get related badges of the badge.
badge | $badge | Badge object. |
array|bool | List related badges. |