ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 isSupportedObjectType ($a_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)
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectLP
 $obj_id
 
 $collection_instance
 
 $mode
 
- 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

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

81 {
82 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
83 if(count(ilConditionHandler::_getConditionsOfTrigger('sahs', $this->obj_id)))
84 {
85 return true;
86 }
87 return false;
88 }
static _getConditionsOfTrigger($a_trigger_obj_type, $a_trigger_id)
get all conditions of trigger object

References ilConditionHandler\_getConditionsOfTrigger().

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 71 of file class.ilScormLP.php.

72 {
73 if($this->checkSCORMPreconditions())
74 {
76 }
77 return parent::getCurrentMode();
78 }
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 24 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 16 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 29 of file class.ilScormLP.php.

30 {
31 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
32 $subtype = ilObjSAHSLearningModule::_lookupSubType($this->obj_id);
33 if($subtype != "scorm2004")
34 {
35 if($this->checkSCORMPreconditions())
36 {
38 }
39
40 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
41 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
42 if(sizeof($collection->getPossibleItems()))
43 {
46 }
48 }
49 else
50 {
51 if($this->checkSCORMPreconditions())
52 {
55 }
56
57 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
58 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
59 if(sizeof($collection->getPossibleItems()))
60 {
64 }
65
68 }
69 }
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)

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 90 of file class.ilScormLP.php.

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

References $ilDB, and $row.


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