ILIAS  release_7 Revision v7.30-3-g800a261c036
ilScormLP Class Reference
+ Inheritance diagram for ilScormLP:
+ Collaboration diagram for ilScormLP:

Public Member Functions

 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 getMailTemplateId ()
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText ($a_mode)
 
 getModeInfoText ($a_mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers ($a_search=true)
 
 resetLPDataForCompleteObject ($a_recursive=true)
 
 resetLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 

Static Public Member Functions

static getDefaultModes ($a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
 
static getTypeClass ($a_type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType ($type)
 
static handleMove ($a_source_ref_id)
 
static getLPMemberships ($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds ($a_obj_type)
 
static supportsMark ($a_obj_type)
 
static supportsMatrixView ($a_obj_type)
 
static getDefaultModes ($a_lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $a_data)
 
static getTypeDefault ($a_type)
 Get current type default. More...
 

Protected Member Functions

 checkSCORMPreconditions ()
 
- Protected Member Functions inherited from ilObjectLP
 __construct ($a_obj_id)
 
 resetCustomLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 

Static Protected Member Functions

static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$a_res, $a_usr_id, $a_obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$a_res, $a_usr_id, $a_parent_ref_id, array $a_obj_ids, $a_mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB ($a_type)
 

Protected Attributes

 $precondition_cache = null
 
- Protected Attributes inherited from ilObjectLP
 $tree
 
 $db
 
 $obj_id
 
 $collection_instance
 
 $mode
 

Additional Inherited Members

- Static Protected Attributes inherited from ilObjectLP
static $type_defaults
 

Detailed Description

Definition at line 14 of file class.ilScormLP.php.

Member Function Documentation

◆ checkSCORMPreconditions()

ilScormLP::checkSCORMPreconditions ( )
protected
Returns
bool
Exceptions
ilDatabaseException

Definition at line 81 of file class.ilScormLP.php.

82 {
83 if (!is_null($this->precondition_cache)) {
85 }
86
87 $this->precondition_cache =
89 true :
90 false;
92 }
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
static getNumberOfConditionsOfTrigger($a_trigger_obj_type, $a_trigger_id)
get all conditions of trigger object

References $precondition_cache, ilConditionHandler\getNumberOfConditionsOfTrigger(), and true.

Referenced by getCurrentMode(), and getValidModes().

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

◆ getCurrentMode()

ilScormLP::getCurrentMode ( )

Reimplemented from ilObjectLP.

Definition at line 69 of file class.ilScormLP.php.

70 {
71 if ($this->checkSCORMPreconditions()) {
73 }
74 return parent::getCurrentMode();
75 }
checkSCORMPreconditions()

References checkSCORMPreconditions(), and ilLPObjSettings\LP_MODE_SCORM.

+ Here is the call graph for this function:

◆ getDefaultMode()

ilScormLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

Definition at line 29 of file class.ilScormLP.php.

References ilLPObjSettings\LP_MODE_DEACTIVATED.

◆ getDefaultModes()

static ilScormLP::getDefaultModes (   $a_lp_active)
static

Get available type-specific default modes (no administration needed)

Parameters
bool$a_lp_active
Returns
array

Reimplemented from ilObjectLP.

Definition at line 21 of file class.ilScormLP.php.

References ilLPObjSettings\LP_MODE_DEACTIVATED, and ilLPObjSettings\LP_MODE_SCORM_PACKAGE.

◆ getMailTemplateId()

ilScormLP::getMailTemplateId ( )

Reimplemented from ilObjectLP.

Definition at line 132 of file class.ilScormLP.php.

133 {
134 include_once './Modules/ScormAicc/classes/class.ilScormMailTemplateLPContext.php';
136 }

References ilScormMailTemplateLPContext\ID.

◆ getValidModes()

ilScormLP::getValidModes ( )

Reimplemented from ilObjectLP.

Definition at line 34 of file class.ilScormLP.php.

35 {
36 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
37 $subtype = ilObjSAHSLearningModule::_lookupSubType($this->obj_id);
38 if ($subtype != "scorm2004") {
39 if ($this->checkSCORMPreconditions()) {
41 }
42
43 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
44 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
45 if (sizeof($collection->getPossibleItems())) {
48 }
50 } else {
51 if ($this->checkSCORMPreconditions()) {
54 }
55
56 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
57 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
58 if (sizeof($collection->getPossibleItems())) {
62 }
63
66 }
67 }
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )

References ilObjSAHSLearningModule\_lookupSubType(), checkSCORMPreconditions(), ilLPObjSettings\LP_MODE_DEACTIVATED, ilLPObjSettings\LP_MODE_SCORM, and ilLPObjSettings\LP_MODE_SCORM_PACKAGE.

+ Here is the call graph for this function:

◆ isLPMember()

static ilScormLP::isLPMember ( array &  $a_res,
  $a_usr_id,
  $a_obj_ids 
)
staticprotected

Find (lp-relevant) members for given object ids.

Parameters
array$a_res
int$a_usr_id
array$a_obj_ids

Reimplemented from ilObjectLP.

Definition at line 94 of file class.ilScormLP.php.

95 {
96 global $DIC;
97 $ilDB = $DIC['ilDB'];
98
99 // subtype
100 $types = array();
101 $set = $ilDB->query("SELECT id,c_type" .
102 " FROM sahs_lm" .
103 " WHERE " . $ilDB->in("id", $a_obj_ids, "", "integer"));
104 while ($row = $ilDB->fetchAssoc($set)) {
105 $types[$row["c_type"]][] = $row["id"];
106 }
107
108 // 2004
109 if (isset($types["scorm2004"])) {
110 $set = $ilDB->query("SELECT obj_id" .
111 " FROM sahs_user" .
112 " WHERE " . $ilDB->in("obj_id", $types["scorm2004"], "", "integer") .
113 " AND user_id = " . $ilDB->quote($a_usr_id, "integer"));
114 while ($row = $ilDB->fetchAssoc($set)) {
115 $a_res[$row["obj_id"]] = true;
116 }
117 }
118
119 // 1.2
120 if (isset($types["scorm"])) {
121 $set = $ilDB->query("SELECT obj_id" .
122 " FROM scorm_tracking" .
123 " WHERE " . $ilDB->in("obj_id", $types["scorm"], "", "integer") .
124 " AND user_id = " . $ilDB->quote($a_usr_id, "integer") .
125 " AND lvalue = " . $ilDB->quote("cmi.core.lesson_status", "text"));
126 while ($row = $ilDB->fetchAssoc($set)) {
127 $a_res[$row["obj_id"]] = true;
128 }
129 }
130 }
global $DIC
Definition: goto.php:24
global $ilDB

References $DIC, and $ilDB.

Field Documentation

◆ $precondition_cache

ilScormLP::$precondition_cache = null
protected

Definition at line 19 of file class.ilScormLP.php.

Referenced by checkSCORMPreconditions().


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