|
Moodle APIs 4.1
Moodle 4.1.9+ (Build: 20240402)
|
Contains classes, functions and constants used in badges. More...
Functions | |
| badge_assemble_notification (stdClass $badge) | |
| Creates single message for all notification and sends it out. | |
| badge_award_criteria_competency_has_records_for_competencies ($competencyids) | |
| Check if any badge has records for competencies. | |
| badge_message_from_template ($message, $params) | |
| Replaces variables in a message template and returns text ready to be emailed to a user. | |
| badges_add_course_navigation (navigation_node $coursenode, stdClass $course) | |
| Extends the course administration navigation with the Badges page. | |
| badges_award_handle_manual_criteria_review (stdClass $data) | |
| Triggered when badge is manually awarded. | |
| badges_bake ($hash, $badgeid, $userid=0, $pathhash=false) | |
| Bake issued badge. | |
| badges_calculate_message_schedule ($schedule) | |
| Caclulates date for the next message digest to badge creators. | |
| badges_change_sortorder_backpacks (int $backpackid, int $direction) | |
| Moves the backpack in the list one position up or down. | |
| badges_check_backpack_accessibility () | |
| Checks if badges can be pushed to external backpack. | |
| badges_create_site_backpack ($data) | |
| Create the site backpack with this data. | |
| badges_delete_site_backpack ($id) | |
| Delete the backpack with this id. | |
| badges_disconnect_user_backpack ($userid) | |
| Disconnect from the user backpack by deleting the user preferences. | |
| badges_download ($userid) | |
| Download all user badges in zip archive. | |
| badges_external_create_mapping ($sitebackpackid, $type, $internalid, $externalid) | |
| Save the info about which objects we connected with a backpack before. | |
| badges_external_delete_mapping ($sitebackpackid, $type, $internalid) | |
| Delete a specific external mapping information for a backpack. | |
| badges_external_delete_mappings ($sitebackpackid) | |
| Delete all external mapping information for a backpack. | |
| badges_external_get_mapping ($sitebackpackid, $type, $internalid, $param='externalid') | |
| Used to remember which objects we connected with a backpack before. | |
| badges_generate_badgr_open_url ($backpack, $type, $externalid) | |
| Generate a public badgr URL that conforms to OBv2. | |
| badges_get_badge_api_versions () | |
| List the supported badges api versions. | |
| badges_get_badges ($type, $courseid=0, $sort='', $dir='', $page=0, $perpage=BADGE_PERPAGE, $user=0) | |
| Get all badges. | |
| badges_get_default_issuer () | |
| Get the default issuer for a badge from this site. | |
| badges_get_oauth2_service_options () | |
| Get OAuth2 services for the external backpack. | |
| badges_get_site_backpack ($id, int $userid=0) | |
| Get a site backpacks by id for a particular user or site (if userid is 0) | |
| badges_get_site_backpacks () | |
| List the backpacks at site level. | |
| badges_get_site_primary_backpack () | |
| Get the primary backpack for the site. | |
| badges_get_user_backpack (?int $userid=0) | |
| Get the user backpack for the currently logged in user OR the provided user. | |
| badges_get_user_badges ($userid, $courseid=0, $page=0, $perpage=0, $search='', $onlypublic=false) | |
| Get badges for a specific user. | |
| badges_handle_course_deletion ($courseid) | |
| Handles what happens to the course badges when a course is deleted. | |
| badges_list_criteria ($enabled=true) | |
| Return all the enabled criteria types for this site. | |
| badges_local_backpack_js ($checksite=false) | |
| No js files are required for backpack support. | |
| badges_notify_badge_award (badge $badge, $userid, $issued, $filepathhash) | |
| Sends notifications to users about awarded badges. | |
| badges_open_badges_backpack_api (?int $backpackid=null) | |
| Is any backpack enabled that supports open badges V1? | |
| badges_process_badge_image (badge $badge, $iconfile) | |
| Process badge image from form data. | |
| badges_save_backpack_credentials (stdClass $data) | |
| Create a backpack with the provided details. | |
| badges_save_external_backpack (stdClass $data) | |
| Perform the actual create/update of external bakpacks. | |
| badges_send_verification_email ($email, $backpackid, $backpackpassword) | |
| Create and send a verification email to the email address supplied. | |
| badges_setup_backpack_js () | |
| Loads JS files required for backpack support. | |
| badges_update_site_backpack ($id, $data) | |
| Update the backpack with this id. | |
| badges_user_has_backpack ($userid) | |
| Checks if user has external backpack connected. | |
| badges_verify_backpack (int $backpackid) | |
| Attempt to authenticate with a backpack credentials and return an error if the authentication fails. | |
| badges_verify_site_backpack () | |
| Attempt to authenticate with the site backpack credentials and return an error if the authentication fails. | |
| get_backpack_settings ($userid, $refresh=false) | |
| Returns external backpack settings and badges from this backpack. | |
| print_badge_image (badge $badge, stdClass $context, $size='small') | |
| Print badge image. | |
Contains classes, functions and constants used in badges.
@subpackage badges