ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

Referenced by hasOnlineStatus().

50  : string
51  {
52  return \ilObject::_lookupType($ref_id, true);
53  }
+ Here is the caller graph for this function:

◆ getOnlineStatus()

LSItemOnlineStatus::getOnlineStatus ( int  $ref_id)

Definition at line 32 of file LSItemOnlineStatus.php.

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

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

◆ hasOnlineStatus()

LSItemOnlineStatus::hasOnlineStatus ( int  $ref_id)

Definition at line 40 of file LSItemOnlineStatus.php.

References $type, and getObjectTypeFor().

Referenced by getOnlineStatus().

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  }
$type
getObjectTypeFor(int $ref_id)
+ 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.

References ilObjectFactory\getInstanceByRefId().

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
+ 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: