ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LSItemOnlineStatus Class Reference
+ Collaboration diagram for LSItemOnlineStatus:

Public Member Functions

 setOnlineStatus (int $ref_id, bool $status)
 
 getOnlineStatus (int $ref_id)
 
 hasOnlineStatus (int $ref_id)
 

Data Fields

const S_LEARNMODULE_IL = "lm"
 
const S_LEARNMODULE_HTML = "htlm"
 
const S_SAHS = "sahs"
 
const S_TEST = "tst"
 
const S_SURVEY = "svy"
 
const S_CONTENTPAGE = "copa"
 
const S_EXERCISE = "exc"
 
const S_IND_ASSESSMENT = "iass"
 
const S_FILE = "file"
 

Protected Member Functions

 getObjectTypeFor (int $ref_id)
 

Static Private Attributes

static $obj_with_online_status
 

Detailed Description

Definition at line 5 of file LSItemOnlineStatus.php.

Member Function Documentation

◆ getObjectTypeFor()

LSItemOnlineStatus::getObjectTypeFor ( int  $ref_id)
protected

Definition at line 50 of file LSItemOnlineStatus.php.

50 : string
51 {
52 return \ilObject::_lookupType($ref_id, true);
53 }

Referenced by hasOnlineStatus().

+ Here is the caller graph for this function:

◆ getOnlineStatus()

LSItemOnlineStatus::getOnlineStatus ( int  $ref_id)

Definition at line 32 of file LSItemOnlineStatus.php.

32 : bool
33 {
34 if(!$this->hasOnlineStatus($ref_id)) {
35 return true;
36 }
38 }
hasOnlineStatus(int $ref_id)
static _lookupObjId($a_id)
static lookupOfflineStatus($a_obj_id)
Lookup offline status using objectDataCache.

References ilObject\_lookupObjId(), hasOnlineStatus(), and ilObject\lookupOfflineStatus().

+ Here is the call graph for this function:

◆ hasOnlineStatus()

LSItemOnlineStatus::hasOnlineStatus ( int  $ref_id)

Definition at line 40 of file LSItemOnlineStatus.php.

40 : bool
41 {
42 $type = $this->getObjectTypeFor($ref_id);
43 if (in_array($type, self::$obj_with_online_status)) {
44 return true;
45 }
46
47 return false;
48 }
getObjectTypeFor(int $ref_id)
$type

References $type, and getObjectTypeFor().

Referenced by getOnlineStatus().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOnlineStatus()

LSItemOnlineStatus::setOnlineStatus ( int  $ref_id,
bool  $status 
)

Definition at line 25 of file LSItemOnlineStatus.php.

26 {
28 $obj->setOfflineStatus(!$status);
29 $obj->update();
30 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

Field Documentation

◆ $obj_with_online_status

LSItemOnlineStatus::$obj_with_online_status
staticprivate
Initial value:
= array(
self::S_LEARNMODULE_IL,
self::S_LEARNMODULE_HTML,
self::S_SAHS,
self::S_TEST,
self::S_SURVEY
)

Definition at line 17 of file LSItemOnlineStatus.php.

◆ S_CONTENTPAGE

const LSItemOnlineStatus::S_CONTENTPAGE = "copa"

Definition at line 12 of file LSItemOnlineStatus.php.

◆ S_EXERCISE

const LSItemOnlineStatus::S_EXERCISE = "exc"

Definition at line 13 of file LSItemOnlineStatus.php.

◆ S_FILE

const LSItemOnlineStatus::S_FILE = "file"

Definition at line 15 of file LSItemOnlineStatus.php.

◆ S_IND_ASSESSMENT

const LSItemOnlineStatus::S_IND_ASSESSMENT = "iass"

Definition at line 14 of file LSItemOnlineStatus.php.

◆ S_LEARNMODULE_HTML

const LSItemOnlineStatus::S_LEARNMODULE_HTML = "htlm"

Definition at line 8 of file LSItemOnlineStatus.php.

◆ S_LEARNMODULE_IL

const LSItemOnlineStatus::S_LEARNMODULE_IL = "lm"

Definition at line 7 of file LSItemOnlineStatus.php.

◆ S_SAHS

const LSItemOnlineStatus::S_SAHS = "sahs"

Definition at line 9 of file LSItemOnlineStatus.php.

◆ S_SURVEY

const LSItemOnlineStatus::S_SURVEY = "svy"

Definition at line 11 of file LSItemOnlineStatus.php.

◆ S_TEST

const LSItemOnlineStatus::S_TEST = "tst"

Definition at line 10 of file LSItemOnlineStatus.php.


The documentation for this class was generated from the following file: