ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 ()
 

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, array $a_obj_ids)
 
- Static Protected Member Functions inherited from ilObjectLP
static getTypeClass ($a_type)
 
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
 
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)
 
- Protected Attributes inherited from ilObjectLP
 $obj_id
 
 $collection_instance
 
 $mode
 

Detailed Description

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

Member Function Documentation

◆ checkSCORMPreconditions()

ilScormLP::checkSCORMPreconditions ( )
protected

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

73 {
74 include_once('./Services/AccessControl/classes/class.ilConditionHandler.php');
75 if(count(ilConditionHandler::_getConditionsOfTrigger('sahs', $this->obj_id)))
76 {
77 return true;
78 }
79 return false;
80 }
_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 63 of file class.ilScormLP.php.

64 {
65 if($this->checkSCORMPreconditions())
66 {
68 }
69 return parent::getCurrentMode();
70 }
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 16 of file class.ilScormLP.php.

References ilLPObjSettings\LP_MODE_DEACTIVATED.

◆ getMailTemplateId()

ilScormLP::getMailTemplateId ( )

Reimplemented from ilObjectLP.

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

125 {
126 include_once './Modules/ScormAicc/classes/class.ilScormMailTemplateLPContext.php';
128 }

References ilScormMailTemplateLPContext\ID.

◆ getValidModes()

ilScormLP::getValidModes ( )

Reimplemented from ilObjectLP.

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

22 {
23 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
24 $subtype = ilObjSAHSLearningModule::_lookupSubType($this->obj_id);
25 if($subtype != "scorm2004")
26 {
27 if($this->checkSCORMPreconditions())
28 {
30 }
31
32 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
33 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
34 if(sizeof($collection->getPossibleItems()))
35 {
38 }
40 }
41 else
42 {
43 if($this->checkSCORMPreconditions())
44 {
47 }
48
49 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfSCOs.php";
50 $collection = new ilLPCollectionOfSCOs($this->obj_id, ilLPObjSettings::LP_MODE_SCORM);
51 if(sizeof($collection->getPossibleItems()))
52 {
56 }
57
60 }
61 }
_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,
array  $a_obj_ids 
)
staticprotected

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

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

References $ilDB, and $row.


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