ILIAS
release_8 Revision v8.19
|
Class ilBadgeHandler. More...
Public Member Functions | |
isActive () | |
setActive (bool $a_value) | |
getComponents () | |
setComponents (array $a_components=null) | |
getProviderInstance (string $a_component_id) | |
getComponentCaption (string $a_component_id) | |
getUniqueTypeId (string $a_component_id, ilBadgeType $a_badge) | |
getTypeInstanceByUniqueId (string $a_id) | |
Get type instance by unique id (component, type) More... | |
getInactiveTypes () | |
setInactiveTypes (array $a_types=null) | |
getAvailableTypes (bool $exclude_inactive=true) | |
Get badges types. More... | |
getAvailableTypesForObjType (string $a_object_type) | |
Get valid badges types for object type. More... | |
getAvailableManualBadges (int $a_parent_obj_id, string $a_parent_obj_type=null) | |
Get available manual badges for object id. More... | |
isObjectActive (int $a_obj_id, ?string $a_obj_type=null) | |
triggerEvaluation (string $a_type_id, int $a_user_id, array $a_params=null) | |
getUserIds (int $a_parent_ref_id, int $a_parent_obj_id=null, string $a_parent_type=null) | |
getInstancePath (ilBadgeAssignment $a_ass) | |
countStaticBadgeInstances (ilBadge $a_badge) | |
getBadgePath (ilBadge $a_badge) | |
sendNotification (array $a_user_map, int $a_parent_ref_id=null) | |
Static Public Member Functions | |
static | getInstance () |
static | updateFromXML (string $a_component_id) |
Import component definition. More... | |
static | clearFromXML (string $a_component_id) |
Remove component definition. More... | |
Data Fields | |
const | GENERAL_INFO = 'inform_about_badges' |
Protected Member Functions | |
__construct () | |
getComponent (string $a_id) | |
getBasePath () | |
countStaticBadgeInstancesHelper (int &$a_cnt, string $a_path) | |
Protected Attributes | |
ilComponentRepository | $component_repository |
ilDBInterface | $db |
ilTree | $tree |
ilLanguage | $lng |
ilSetting | $settings |
Static Protected Attributes | |
static ilBadgeHandler | $instance = null |
Class ilBadgeHandler.
Definition at line 29 of file class.ilBadgeHandler.php.
|
protected |
Definition at line 40 of file class.ilBadgeHandler.php.
References $DIC, and ILIAS\Repository\settings().
|
static |
Remove component definition.
Definition at line 298 of file class.ilBadgeHandler.php.
ilBadgeHandler::countStaticBadgeInstances | ( | ilBadge | $a_badge | ) |
Definition at line 441 of file class.ilBadgeHandler.php.
References $path, countStaticBadgeInstancesHelper(), getBasePath(), and ilBadge\getId().
|
protected |
Definition at line 451 of file class.ilBadgeHandler.php.
Referenced by countStaticBadgeInstances().
ilBadgeHandler::getAvailableManualBadges | ( | int | $a_parent_obj_id, |
string | $a_parent_obj_type = null |
||
) |
Get available manual badges for object id.
Definition at line 252 of file class.ilBadgeHandler.php.
References $res, $type, ilObject\_lookupType(), getAvailableTypesForObjType(), and ilBadge\getInstancesByParentId().
ilBadgeHandler::getAvailableTypes | ( | bool | $exclude_inactive = true | ) |
Get badges types.
Definition at line 211 of file class.ilBadgeHandler.php.
References $id, $provider, $res, $type, getComponents(), getInactiveTypes(), getProviderInstance(), and getUniqueTypeId().
Referenced by getAvailableTypesForObjType().
ilBadgeHandler::getAvailableTypesForObjType | ( | string | $a_object_type | ) |
Get valid badges types for object type.
Definition at line 235 of file class.ilBadgeHandler.php.
References $id, $res, $type, and getAvailableTypes().
Referenced by getAvailableManualBadges().
ilBadgeHandler::getBadgePath | ( | ilBadge | $a_badge | ) |
Definition at line 464 of file class.ilBadgeHandler.php.
References $path, getBasePath(), ilBadge\getId(), and ilFileUtils\makeDirParents().
|
protected |
Definition at line 421 of file class.ilBadgeHandler.php.
References ilFileUtils\getWebspaceDir().
Referenced by countStaticBadgeInstances(), getBadgePath(), and getInstancePath().
|
protected |
Definition at line 110 of file class.ilBadgeHandler.php.
Referenced by getComponentCaption(), and getProviderInstance().
ilBadgeHandler::getComponentCaption | ( | string | $a_component_id | ) |
Definition at line 138 of file class.ilBadgeHandler.php.
References getComponent().
ilBadgeHandler::getComponents | ( | ) |
Definition at line 80 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
Referenced by getAvailableTypes().
ilBadgeHandler::getInactiveTypes | ( | ) |
Definition at line 182 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
Referenced by getAvailableTypes(), and triggerEvaluation().
|
static |
Definition at line 54 of file class.ilBadgeHandler.php.
Referenced by ilBadgeManagementGUI\__construct(), ilObjBadgeAdministrationGUI\activateTypes(), ilBadgeManagementGUI\addBadge(), ilObjBadgeAdministrationGUI\assertActive(), ilBadgeManagementGUI\assignBadge(), ilBadgeManagementGUI\awardBadgeUserSelection(), ilObjBadgeAdministrationGUI\deactivateTypes(), ilBadgeAssignment\deleteStaticFiles(), ilBadge\deleteStaticFiles(), ilBadgeManagementGUI\editBadge(), ilBadgeManagementGUI\executeCommand(), ilObjBadgeAdministrationGUI\getAdminTabs(), ilBadgeTypesTableGUI\getItems(), ilObjectBadgeTableGUI\getItems(), ilBadgeUserTableGUI\getItems(), ILIAS\Badge\Provider\BadgeMainBarProvider\getStaticSubItems(), ilObjGroupGUI\getTabs(), ilObjCourseGUI\getTabs(), ilBadge\getTypeInstance(), ilBadgeManagementGUI\getValidBadgesFromClipboard(), ilBadgeAppEventListener\handleEvent(), ilBadgeWAC\hasAccessToBadgeParentIdNode(), ilObjectBadgeTableGUI\initFilter(), ilBadgeTableGUI\initFilter(), ilObjBadgeAdministrationGUI\initFormSettings(), ilObjBadgeAdministrationGUI\initImageTemplateForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilBadgeLearningHistoryProvider\isActive(), ilAchievements\isActive(), ilBadgeManagementGUI\listBadges(), ilBadgeManagementGUI\listUsers(), ilBadge\prepareJson(), ilBadgeDefinitionProcessor\purge(), ilBadgeManagementGUI\saveBadge(), ilPersonalProfileGUI\savePublicProfile(), ilObjBadgeAdministrationGUI\saveSettings(), ilPersonalProfileGUI\showPublicProfileFields(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().
ilBadgeHandler::getInstancePath | ( | ilBadgeAssignment | $a_ass | ) |
Definition at line 426 of file class.ilBadgeHandler.php.
References $path, ilBadgeAssignment\getBadgeId(), getBasePath(), ilBadgeAssignment\getUserId(), and ilFileUtils\makeDirParents().
ilBadgeHandler::getProviderInstance | ( | string | $a_component_id | ) |
Definition at line 122 of file class.ilBadgeHandler.php.
References getComponent().
Referenced by getAvailableTypes(), and getTypeInstanceByUniqueId().
ilBadgeHandler::getTypeInstanceByUniqueId | ( | string | $a_id | ) |
Get type instance by unique id (component, type)
Definition at line 161 of file class.ilBadgeHandler.php.
References $parts, $provider, $type, and getProviderInstance().
Referenced by triggerEvaluation().
ilBadgeHandler::getUniqueTypeId | ( | string | $a_component_id, |
ilBadgeType | $a_badge | ||
) |
Definition at line 151 of file class.ilBadgeHandler.php.
References ilBadgeType\getId().
Referenced by getAvailableTypes().
ilBadgeHandler::getUserIds | ( | int | $a_parent_ref_id, |
int | $a_parent_obj_id = null , |
||
string | $a_parent_type = null |
||
) |
int | $a_parent_ref_id | |
int | null | $a_parent_obj_id | |
string | null | $a_parent_type |
Definition at line 376 of file class.ilBadgeHandler.php.
References $tree, ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupObjectId(), and ilObject\_lookupType().
ilBadgeHandler::isActive | ( | ) |
Definition at line 67 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
Referenced by isObjectActive(), and triggerEvaluation().
ilBadgeHandler::isObjectActive | ( | int | $a_obj_id, |
?string | $a_obj_type = null |
||
) |
Definition at line 315 of file class.ilBadgeHandler.php.
References ilContainer\_lookupContainerSetting(), ilObject\_lookupType(), ilObjectServiceSettingsGUI\BADGES, and isActive().
ilBadgeHandler::sendNotification | ( | array | $a_user_map, |
int | $a_parent_ref_id = null |
||
) |
Definition at line 482 of file class.ilBadgeHandler.php.
References $url, ilLink\_getLink(), ilObjUser\_lookupEmail(), ANONYMOUS_USER_ID, ilBadgeAssignment\exists(), ilUtil\getImagePath(), ilLanguage\getUserLanguage(), ilContext\hasHTML(), and ilLanguage\txt().
Referenced by triggerEvaluation().
ilBadgeHandler::setActive | ( | bool | $a_value | ) |
Definition at line 72 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
ilBadgeHandler::setComponents | ( | array | $a_components = null | ) |
string[]|null | $a_components |
Definition at line 95 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
ilBadgeHandler::setInactiveTypes | ( | array | $a_types = null | ) |
string[]|null | $a_types |
Definition at line 196 of file class.ilBadgeHandler.php.
References ILIAS\Repository\settings().
ilBadgeHandler::triggerEvaluation | ( | string | $a_type_id, |
int | $a_user_id, | ||
array | $a_params = null |
||
) |
Definition at line 338 of file class.ilBadgeHandler.php.
References $type, ilBadgeAssignment\exists(), getInactiveTypes(), ilBadge\getInstancesByType(), getTypeInstanceByUniqueId(), isActive(), sendNotification(), and ilBadgeAssignment\store().
|
static |
Import component definition.
Definition at line 287 of file class.ilBadgeHandler.php.
Referenced by ilBadgeDefinitionProcessor\beginTag().
|
protected |
Definition at line 33 of file class.ilBadgeHandler.php.
|
protected |
Definition at line 34 of file class.ilBadgeHandler.php.
|
staticprotected |
Definition at line 38 of file class.ilBadgeHandler.php.
|
protected |
Definition at line 36 of file class.ilBadgeHandler.php.
|
protected |
Definition at line 37 of file class.ilBadgeHandler.php.
|
protected |
Definition at line 35 of file class.ilBadgeHandler.php.
Referenced by getUserIds().
const ilBadgeHandler::GENERAL_INFO = 'inform_about_badges' |
Definition at line 31 of file class.ilBadgeHandler.php.