3 declare(strict_types=1);
21 $this->access = $access;
28 public function getLearnerItems(
int $usr_id,
int $container_ref_id, array $ls_items) : array
31 $states = $this->state_db->getStatesFor($container_ref_id, [$usr_id]);
32 foreach ($ls_items as $ls_item) {
46 return function(
int $ref_id,
int $usr_id) {
60 if (array_key_exists($ls_item->
getRefId(), $states)) {
61 return $states[$ls_item->
getRefId()];
72 return (
int) $il_lp_status;
78 $access = $this->access->checkAccessOfUser(
85 if (!($online && $access)) {
94 $readable = $this->access->checkAccessOfUser($usr_id,
'read',
'', $ls_item->
getRefId());
getObjIdForRefId(int $ref_id)
getLearningProgressFor(int $usr_id, LSItem $ls_item)
isItemVisibleForUser(int $usr_id, LSItem $ls_item)
getAvailabilityFor(int $usr_id, LSItem $ls_item)
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Data holding class LSItem .
static _lookupObjId($a_id)
Persistence for View-States.
Get LearningProgress and availability of items in sequence.
__construct(ilLSStateDB $state_db, ilAccess $access)
getStateFor(LSItem $ls_item, array $states)
getLearnerItems(int $usr_id, int $container_ref_id, array $ls_items)
Decorate LSItems with learning progress, availability (from conditions) kiosk-mode state information...
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
Add learning progress and availability information to the LSItem.