ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
LSItemOnlineStatus Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 array $obj_with_online_status
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 21 of file LSItemOnlineStatus.php.

Member Function Documentation

◆ getObjectTypeFor()

LSItemOnlineStatus::getObjectTypeFor ( int  $ref_id)
protected

Definition at line 63 of file LSItemOnlineStatus.php.

Referenced by hasOnlineStatus().

63  : string
64  {
65  return \ilObject::_lookupType($ref_id, true);
66  }
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ getOnlineStatus()

LSItemOnlineStatus::getOnlineStatus ( int  $ref_id)

Definition at line 49 of file LSItemOnlineStatus.php.

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

49  : bool
50  {
51  if (!$this->hasOnlineStatus($ref_id)) {
52  return true;
53  }
55  }
hasOnlineStatus(int $ref_id)
static _lookupObjId(int $ref_id)
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache.
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:

◆ hasOnlineStatus()

LSItemOnlineStatus::hasOnlineStatus ( int  $ref_id)

Definition at line 57 of file LSItemOnlineStatus.php.

References $type, and getObjectTypeFor().

Referenced by getOnlineStatus().

57  : bool
58  {
59  $type = $this->getObjectTypeFor($ref_id);
60  return in_array($type, self::$obj_with_online_status);
61  }
$type
getObjectTypeFor(int $ref_id)
$ref_id
Definition: ltiauth.php:67
+ 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 42 of file LSItemOnlineStatus.php.

References ilObjectFactory\getInstanceByRefId().

42  : void
43  {
45  $obj->setOfflineStatus(!$status);
46  $obj->update();
47  }
$ref_id
Definition: ltiauth.php:67
static getInstanceByRefId(int $ref_id, bool $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

array 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,
self::S_CONTENTPAGE
)

Definition at line 33 of file LSItemOnlineStatus.php.

◆ S_CONTENTPAGE

const LSItemOnlineStatus::S_CONTENTPAGE = "copa"

Definition at line 28 of file LSItemOnlineStatus.php.

◆ S_EXERCISE

const LSItemOnlineStatus::S_EXERCISE = "exc"

Definition at line 29 of file LSItemOnlineStatus.php.

◆ S_FILE

const LSItemOnlineStatus::S_FILE = "file"

Definition at line 31 of file LSItemOnlineStatus.php.

◆ S_IND_ASSESSMENT

const LSItemOnlineStatus::S_IND_ASSESSMENT = "iass"

Definition at line 30 of file LSItemOnlineStatus.php.

◆ S_LEARNMODULE_HTML

const LSItemOnlineStatus::S_LEARNMODULE_HTML = "htlm"

Definition at line 24 of file LSItemOnlineStatus.php.

◆ S_LEARNMODULE_IL

const LSItemOnlineStatus::S_LEARNMODULE_IL = "lm"

Definition at line 23 of file LSItemOnlineStatus.php.

◆ S_SAHS

const LSItemOnlineStatus::S_SAHS = "sahs"

Definition at line 25 of file LSItemOnlineStatus.php.

◆ S_SURVEY

const LSItemOnlineStatus::S_SURVEY = "svy"

Definition at line 27 of file LSItemOnlineStatus.php.

◆ S_TEST

const LSItemOnlineStatus::S_TEST = "tst"

Definition at line 26 of file LSItemOnlineStatus.php.


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