ILIAS
trunk Revision v11.0_alpha-1866-gfa368f7776e
|
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 302 of file class.ilBadgeHandler.php.
References $components, and $handler.
ilBadgeHandler::countStaticBadgeInstances | ( | ilBadge | $a_badge | ) |
Definition at line 444 of file class.ilBadgeHandler.php.
References $path, countStaticBadgeInstancesHelper(), getBasePath(), and ilBadge\getId().
|
protected |
Definition at line 454 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 256 of file class.ilBadgeHandler.php.
References $res, ilObject\_lookupType(), getAvailableTypesForObjType(), and ilBadge\getInstancesByParentId().
ilBadgeHandler::getAvailableTypes | ( | bool | $exclude_inactive = true | ) |
Get badges types.
Definition at line 215 of file class.ilBadgeHandler.php.
References $id, $provider, $res, getComponents(), getInactiveTypes(), getProviderInstance(), and getUniqueTypeId().
Referenced by getAvailableTypesForObjType().
ilBadgeHandler::getAvailableTypesForObjType | ( | string | $a_object_type | ) |
Get valid badges types for object type.
Definition at line 239 of file class.ilBadgeHandler.php.
References $id, $res, and getAvailableTypes().
Referenced by getAvailableManualBadges().
ilBadgeHandler::getBadgePath | ( | ilBadge | $a_badge | ) |
Definition at line 467 of file class.ilBadgeHandler.php.
References $path, getBasePath(), ilBadge\getId(), and ilFileUtils\makeDirParents().
|
protected |
Definition at line 424 of file class.ilBadgeHandler.php.
References ilFileUtils\getWebspaceDir().
Referenced by countStaticBadgeInstances(), getBadgePath(), and getInstancePath().
|
protected |
Definition at line 112 of file class.ilBadgeHandler.php.
References null.
Referenced by getComponentCaption(), and getProviderInstance().
ilBadgeHandler::getComponentCaption | ( | string | $a_component_id | ) |
Definition at line 140 of file class.ilBadgeHandler.php.
References getComponent().
ilBadgeHandler::getComponents | ( | ) |
Definition at line 80 of file class.ilBadgeHandler.php.
References $components, null, and ILIAS\Repository\settings().
Referenced by getAvailableTypes().
ilBadgeHandler::getInactiveTypes | ( | ) |
Definition at line 184 of file class.ilBadgeHandler.php.
References null, and ILIAS\Repository\settings().
Referenced by getAvailableTypes(), and triggerEvaluation().
|
static |
Definition at line 54 of file class.ilBadgeHandler.php.
Referenced by ilBadgeManagementGUI\__construct(), ILIAS\Badge\ilBadgeUserTableGUI\__construct(), ilObjBadgeAdministrationGUI\activateTypes(), ilBadgeManagementGUI\addBadge(), ilObjBadgeAdministrationGUI\assertActive(), ilBadgeManagementGUI\assignBadge(), ilBadgeManagementGUI\awardBadgeUserSelection(), ilObjBadgeAdministrationGUI\deactivateTypes(), ilBadgeAssignment\deleteStaticFiles(), ilBadge\deleteStaticFiles(), ilBadgeManagementGUI\editBadge(), ilBadgeManagementGUI\executeCommand(), ilObjBadgeAdministrationGUI\getAdminTabs(), ILIAS\Badge\ilBadgeTypesTableGUI\getRecords(), ILIAS\Badge\ilObjectBadgeTableGUI\getRecords(), ILIAS\GlobalScreen\Provider\Provider\BadgeMainBarProvider\getStaticSubItems(), ilObjGroupGUI\getTabs(), ilObjCourseGUI\getTabs(), ilBadge\getTypeInstance(), ilBadgeManagementGUI\getValidBadgesFromClipboard(), ilBadgeAppEventListener\handleEvent(), ilBadgeWAC\hasAccessToBadgeParentIdNode(), 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(), ilBadgeManagementGUI\splitBadgeAndUserIdsFromString(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().
ilBadgeHandler::getInstancePath | ( | ilBadgeAssignment | $a_ass | ) |
Definition at line 429 of file class.ilBadgeHandler.php.
References $path, ilBadgeAssignment\getBadgeId(), getBasePath(), ilBadgeAssignment\getUserId(), and ilFileUtils\makeDirParents().
ilBadgeHandler::getProviderInstance | ( | string | $a_component_id | ) |
Definition at line 124 of file class.ilBadgeHandler.php.
References getComponent(), and null.
Referenced by getAvailableTypes(), and getTypeInstanceByUniqueId().
ilBadgeHandler::getTypeInstanceByUniqueId | ( | string | $a_id | ) |
Get type instance by unique id (component, type)
Definition at line 163 of file class.ilBadgeHandler.php.
References $parts, $provider, getProviderInstance(), and null.
Referenced by triggerEvaluation().
ilBadgeHandler::getUniqueTypeId | ( | string | $a_component_id, |
ilBadgeType | $a_badge | ||
) |
Definition at line 153 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 | null | $a_parent_obj_id | |
string | null | $a_parent_type |
Definition at line 379 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 319 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 485 of file class.ilBadgeHandler.php.
References $url, $user_id, ilObjUser\_lookupEmail(), ANONYMOUS_USER_ID, ilBadgeAssignment\exists(), ilUtil\getImagePath(), ilLanguage\getUserLanguage(), ilContext\hasHTML(), null, 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 94 of file class.ilBadgeHandler.php.
References null, and ILIAS\Repository\settings().
ilBadgeHandler::setInactiveTypes | ( | ?array | $a_types = null | ) |
string[]|null | $a_types |
Definition at line 197 of file class.ilBadgeHandler.php.
References null, and ILIAS\Repository\settings().
ilBadgeHandler::triggerEvaluation | ( | string | $a_type_id, |
int | $a_user_id, | ||
?array | $a_params = null |
||
) |
Definition at line 342 of file class.ilBadgeHandler.php.
References ilBadgeAssignment\exists(), getInactiveTypes(), ilBadge\getInstancesByType(), getTypeInstanceByUniqueId(), isActive(), and sendNotification().
|
static |
Import component definition.
Definition at line 291 of file class.ilBadgeHandler.php.
References $components, and $handler.
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.