Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_badges

Namespaces

namespace  core_badges
  
 
namespace  core_badges\external
  
 
namespace  core_badges\form
  
 
namespace  core_badges\oauth2
  
 
namespace  core_badges\output
  
 
namespace  core_badges\privacy
  
 
namespace  core_badges\reportbuilder\datasource
  
 
namespace  core_badges\reportbuilder\local\entities
  
 
namespace  core_badges\reportbuilder\local\systemreports
  
 

Classes

class  behat_core_badges_generator
 
class  core_badges\backpack_api
 Class for communicating with backpacks. More...
 
class  core_badges\backpack_api2p1
 To process badges with backpack and control api request and this class using for Open Badge API v2.1 methods. More...
 
class  core_badges\backpack_api2p1_mapping
 Represent a single method for the remote api and this class using for Open Badge API v2.1 methods. More...
 
class  core_badges\backpack_api_mapping
 Represent a single method for the remote api. More...
 
class  core_badges\external\alignment_exporter
 Class for displaying a badge alignment. More...
 
class  core_badges\external\assertion_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\backpack_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\badgeclass_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\collection_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\endorsement_exporter
 Class for displaying a badge endorsement. More...
 
class  core_badges\external\get_user_badge_by_hash
 
class  core_badges\external\issuer_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\recipient_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\external\related_info_exporter
 Class for displaying information of a related badge. More...
 
class  core_badges\external\user_badge_exporter
 Class for displaying a badge issued to a user. More...
 
class  core_badges\external\verification_exporter
 Class for displaying a badge competency. More...
 
class  core_badges\form\external_backpack
 Backpack form class. More...
 
class  core_badges\oauth2\auth
 Proccess Oauth2 connects to backpack site. More...
 
class  core_badges\oauth2\badge_backpack_oauth2
 Class badge_backpack_oauth2 for backpack is connected. More...
 
class  core_badges\oauth2\client
 Configurable OAuth2 client to request authorization and store token. More...
 
class  core_badges\output\badgeclass
 
class  core_badges\output\base_action_bar
 
class  core_badges\output\external_backpacks_page
 Manage enabled backpacks renderable. More...
 
class  core_badges\output\external_backpacks_table
 Backpacks table class. More...
 
class  core_badges\output\manage_badge_action_bar
 
class  core_badges\output\recipients_action_bar
 
class  core_badges\output\standard_action_bar
 
class  core_badges\privacy\provider
 Data provider class. More...
 
class  core_badges\reportbuilder\datasource\badges
 
class  core_badges\reportbuilder\datasource\users
 
class  core_badges\reportbuilder\local\entities\badge
 
class  core_badges\reportbuilder\local\entities\badge_issued
 
class  core_badges\reportbuilder\local\systemreports\badges
 
class  core_badges\reportbuilder\local\systemreports\course_badges
 
class  core_badges\reportbuilder\local\systemreports\recipients
 
class  core_badges_external
 Badges external functions. More...
 
class  core_badges_generator
 
class  core_badges_observer
 

Functions

 badge_get_tagged_badges (object $tag, bool $exclusivemode=false, null|int $fromctx=0, null|int $ctx=0, bool $rec=true, int $page=0)
 Returns badges tagged with a specified tag.
 
 badges_install_default_backpacks ()
 Called on install or upgrade to create default list of backpacks a user can connect to.
 
 core_badges_myprofile_navigation (\core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page.
 

Variables

global $CFG
 
global core_badges::$CFG
 
global core_badges\external::$CFG
 
global core_badges\reportbuilder\local\entities::$CFG
 
global core_badges\reportbuilder\local\systemreports::$CFG
 
const core_badges\oauth2::BACKPACK_CHALLENGE_METHOD 'S256'
 
const core_badges\oauth2::BACKPACK_CODE_VERIFIER_TIME 60
 
const core_badges::BADGE_ACCESS_TOKEN 'access'
 
const core_badges::BADGE_BACKPACK_ID_TOKEN 'backpack_id'
 
const core_badges::BADGE_EXPIRES_TOKEN 'expires'
 
const core_badges::BADGE_REFRESH_TOKEN 'refresh'
 
const core_badges::BADGE_USER_ID_TOKEN 'user_id'
 

Detailed Description

Function Documentation

◆ badge_get_tagged_badges()

badge_get_tagged_badges ( object $tag,
bool $exclusivemode = false,
null|int $fromctx = 0,
null|int $ctx = 0,
bool $rec = true,
int $page = 0 )

Returns badges tagged with a specified tag.

Parameters
object$tag
bool$exclusivemodeif set to true it means that no other entities tagged with this tag are displayed on the page and the per-page limit may be bigger
null | int$fromctxcontext id where the link was displayed, may be used by callbacks to display items in the same context first
null | int$ctxcontext id where to search for records
bool$recsearch in subcontexts as well
int$page0-based number of page being displayed
Return values
core_tag\output\tagindex

◆ badges_install_default_backpacks()

badges_install_default_backpacks ( )

Called on install or upgrade to create default list of backpacks a user can connect to.

Don't use the global defines from badgeslib because this is for install/upgrade.

Return values
void

◆ core_badges_myprofile_navigation()

core_badges_myprofile_navigation ( \core_user\output\myprofile\tree $tree,
$user,
$iscurrentuser,
$course )

Add nodes to myprofile page.

Parameters
core_user\output\myprofile\tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
stdClass$courseCourse object
Return values
bool