ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSCORMLearningModule Class Reference

Class ilObjSCORMLearningModule. More...

+ Inheritance diagram for ilObjSCORMLearningModule:
+ Collaboration diagram for ilObjSCORMLearningModule:

Public Member Functions

 ilObjSCORMLearningModule ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 validate ($directory)
 Validate all XML-Files in a SCOM-Directory.
 getValidationSummary ()
 getTrackingItems ()
 _getTrackingItems ($a_obj_id)
 get all tracking items of scorm object static
 readObject ()
 read manifest file public
 getTrackedItems ()
 get all tracked items of current user
 getTrackedUsers ($a_search)
 getAttemptsForUser ($a_user_id)
 get number of atttempts for a certain user and package
 getModuleVersionForUser ($a_user_id)
 get module version that tracking data for a user was recorded on
 getTrackingDataPerUser ($a_sco_id, $a_user_id)
 getTrackingDataAgg ($a_user_id)
 getTrackingDataAggSco ($a_sco_id)
 exportSelectedRaw ($a_exportall=0, $a_user=array())
 exportSelected ($a_exportall=0, $a_user=array())
 importTrackingData ($a_file)
 importSuccess ($a_file)
 get_user_id ($a_login)
 getUserIdEmail ($a_mail)
 assumes that only one account exists for a mailadress
 sendExportFile ($a_header, $a_content)
 send export file to browser
 getAllScoIds ()
 getStatusForUser ($a_user, $a_allScoIds, $a_numerical=false)
 getCourseCompletionForUser ($a_user)
- Public Member Functions inherited from ilObjSAHSLearningModule
 ilObjSAHSLearningModule ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 create ($upload=false)
 create file based lm
 read ()
 read object
 _lookupOnline ($a_id)
 check wether scorm module is online
 _lookupSubType ($a_obj_id)
 lookup subtype id (scorm, aicc, hacp)
 setEditable ($a_editable)
 Set Editable.
 getEditable ()
 Get Editable.
 setTries ($a_tries)
 Set default tries for questions.
 getTries ()
 Get Tries.
 getDiskUsage ()
 Gets the disk usage of the object in bytes.
 createDataDirectory ()
 creates data directory for package files ("./data/lm_data/lm_<id>")
 getDataDirectory ($mode="filesystem")
 get data directory of lm
 getAPIAdapterName ()
 get api adapter name
 setAPIAdapterName ($a_api)
 set api adapter name
 getAPIFunctionsPrefix ()
 get api functions prefix
 setAPIFunctionsPrefix ($a_prefix)
 set api functions prefix
 getCreditMode ()
 get credit mode
 setCreditMode ($a_credit_mode)
 set credit mode
 setDefaultLessonMode ($a_lesson_mode)
 set default lesson mode
 getDefaultLessonMode ()
 get default lesson mode
 getStyleSheetId ()
 get ID of assigned style sheet object
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object
 setAutoReview ($a_auto_review)
 get auto review
 getAutoReview ()
 set auto review
 getMaxAttempt ()
 get max attempt
 setMaxAttempt ($a_max_attempt)
 set max attempt
 getModuleVersion ()
 get max attempt
 getAssignedGlossary ()
 get assigned glossary
 setAssignedGlossary ($a_assigned_glossary)
 set assigned glossary
 setModuleVersion ($a_module_version)
 set max attempt
 getSession ()
 get session setting
 setSession ($a_session)
 set session setting
 getNoMenu ()
 disable menu
 setNoMenu ($a_no_menu)
 disable menu
 getHideNavig ()
 hide navigation tree
 setHideNavig ($a_hide_navig)
 disable menu
 getDebug ()
 debug
 setDebug ($a_debug)
 debug
 getDebugPw ()
 debug pw
 setDebugPw ($a_debug_pw)
 debug pw
 setAutoContinue ($a_auto_continue)
 get auto continue
 getAutoContinue ()
 set auto continue
 update ()
 update meta data only
 setOnline ($a_online)
 get online
 getOnline ()
 set online
 setSubType ($a_sub_type)
 get sub type
 getSubType ()
 set sub type
 delete ()
 delete SCORM learning module and all related data
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event happend, each object may decide how it reacts.
 getPointsInPercent ()
 Returns the points in percent for the learning module This is called by the certificate generator if [SCORM_POINTS] is inserted.
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getTitle ()
 get object title public
 getUntranslatedTitle ()
 get untranslated object title public
 setTitle ($a_title)
 set object title
 getDescription ()
 get object description
 setDescription ($a_desc)
 set object description
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 _lookupObjIdByImportId ($a_import_id)
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 create ()
 create
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _lookupOwner ($a_id)
 lookup object owner
 _lookupDescription ($a_id)
 lookup object description
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _lookupObjectId ($a_ref_id)
 lookup object id
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public
 createRoleFolder ()
 creates a local role folder
 setRegisterMode ($a_bool)
 isUserRegistered ($a_user_id=0)
 requireRegistration ()
 getXMLZip ()
 getHTMLDirectory ()
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone object permissions, put in tree ...
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies.
 cloneMetaData ($target_obj)
 Copy meta data.

Static Public Member Functions

static _lookupLastAccess ($a_obj_id, $a_usr_id)
 Return the last access timestamp for a given user.
static _getAllScoIds ($a_id)
 Get an array of id's for all Sco's in the module.
static _getStatusForUser ($a_id, $a_user, $a_allScoIds, $a_numerical=false)
 Get the status of a SCORM module for a given user.
static _getCourseCompletionForUser ($a_id, $a_user)
 Get the completion of a SCORM module for a given user.
static _removeTrackingDataForUser ($user_id)
- Static Public Member Functions inherited from ilObjSAHSLearningModule
static _getTries ($a_id)
static getScormModulesForGlossary ($a_glo_id)
 Get SCORM modules that assign a certain glossary.
- Static Public Member Functions inherited from ilObject
static _getAllReferences ($a_id)
 get all reference ids of object
static _lookupTitle ($a_id)
 lookup object title
static _getIdsForTitle ($title, $type= '', $partialmatch=false)
static _lookupObjId ($a_id)
static _lookupType ($a_id, $a_reference=false)
 lookup object type
 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item.
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies.
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies.

Data Fields

 $validator
- Data Fields inherited from ilObjSAHSLearningModule
 $validator
- Data Fields inherited from ilObject
const TITLE_LENGTH = 128
 max length of object title
 $ilias
 $lng
 $id
 $ref_id
 $type
 $title
 $untranslatedTitle
 $desc
 $long_desc
 $owner
 $create_date
 $last_update
 $import_id
 $register = false
 $referenced
 $objectList
 $max_title
 $max_desc
 $add_dots
 $obj_data_record
 object_data record

Private Member Functions

 importRaw ($a_file)
 lookupSCOId ($a_referrer)
 resolves manifest SCOID to internal ILIAS SCO ID

Detailed Description

Class ilObjSCORMLearningModule.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Id:
class.ilObjSCORMLearningModule.php 25692 2010-09-15 09:44:16Z mwarkus

Definition at line 18 of file class.ilObjSCORMLearningModule.php.

Member Function Documentation

static ilObjSCORMLearningModule::_getAllScoIds (   $a_id)
static

Get an array of id's for all Sco's in the module.

Parameters
int$a_idObject id
Returns
array Sco id's

Definition at line 1060 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by _getCourseCompletionForUser().

{
global $ilDB;
$scos = array();
$val_set = $ilDB->queryF('
SELECT scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id scoid
FROM scorm_object,sc_item,sc_resource
WHERE(scorm_object.slm_id = %s
AND scorm_object.obj_id = sc_item.obj_id
AND sc_item.identifierref = sc_resource.import_id
AND sc_resource.scormtype = %s)
GROUP BY scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id ',
array('integer', 'text'),
array($a_id,'sco'));
while ($val_rec = $ilDB->fetchAssoc($val_set))
{
array_push($scos,$val_rec['scoid']);
}
return $scos;
}

+ Here is the caller graph for this function:

static ilObjSCORMLearningModule::_getCourseCompletionForUser (   $a_id,
  $a_user 
)
static

Get the completion of a SCORM module for a given user.

Parameters
int$a_idObject id
int$a_userUser id
Returns
boolean Completion status

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 1138 of file class.ilObjSCORMLearningModule.php.

References _getAllScoIds(), and _getStatusForUser().

Referenced by ilObjSAHSLearningModuleAccess\_lookupUserCertificate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjSCORMLearningModule::_getStatusForUser (   $a_id,
  $a_user,
  $a_allScoIds,
  $a_numerical = false 
)
static

Get the status of a SCORM module for a given user.

Parameters
int$a_idObject id
int$a_userUser id
array$a_allScoIdsArray of Sco id's in this module
boolean$a_numericalText (false) or boolean result (true)
Returns
mixed Status result

Definition at line 1100 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and ilObject\$lng.

Referenced by _getCourseCompletionForUser().

{
global $ilDB, $lng;
$scos = $a_allScoIds;
//check if all SCO's are completed
$scos_c = implode(',',$scos);
$val_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE (user_id = %s
AND obj_id = %s
AND '.$ilDB->in('sco_id', $scos, false, 'integer').'
AND ((lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'completed').')
OR (lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'passed').')))',
array('integer','integer','text','text'),
array($a_user,$a_id,'cmi.core.lesson_status', 'cmi.core.lesson_status'));
while ($val_rec = $ilDB->fetchAssoc($val_set))
{
$key = array_search($val_rec['sco_id'], $scos);
unset ($scos[$key]);
}
//check for completion
if (count($scos) == 0) {
$completion = ($a_numerical===true) ? true: $lng->txt("cont_complete");
}
if (count($scos) > 0) {
$completion = ($a_numerical===true) ? false: $lng->txt("cont_incomplete");
}
return $completion;
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::_getTrackingItems (   $a_obj_id)

get all tracking items of scorm object static

Reimplemented in ilObjSCORM2004LearningModule, and ilObjAICCLearningModule.

Definition at line 68 of file class.ilObjSCORMLearningModule.php.

Referenced by ilLPCollections\_getPossibleSAHSItems(), and getTrackingItems().

{
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMTree.php");
$tree = new ilSCORMTree($a_obj_id);
$root_id = $tree->readRootId();
$items = array();
$childs = $tree->getSubTree($tree->getNodeData($root_id));
foreach($childs as $child)
{
if($child["c_type"] == "sit")
{
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
$sc_item =& new ilSCORMItem($child["obj_id"]);
if ($sc_item->getIdentifierRef() != "")
{
$items[count($items)] =& $sc_item;
}
}
}
return $items;
}

+ Here is the caller graph for this function:

static ilObjSCORMLearningModule::_lookupLastAccess (   $a_obj_id,
  $a_usr_id 
)
static

Return the last access timestamp for a given user.

Parameters
int$a_obj_idobject id
int$user_iduser id
Returns
timestamp

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 265 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and $row.

Referenced by ilSCORMPresentationGUI\downloadCertificate().

{
global $ilDB;
$result = $ilDB->queryF('
SELECT user_id,c_timestamp last_access FROM scorm_tracking
WHERE obj_id = %s
AND user_id = %s
ORDER BY c_timestamp DESC',
array('integer','integer'), array($a_obj_id,$a_usr_id));
if ($ilDB->numRows($result))
{
$row = $ilDB->fetchAssoc($result);
return $row["last_access"];
}
return "";
}

+ Here is the caller graph for this function:

static ilObjSCORMLearningModule::_removeTrackingDataForUser (   $user_id)
static

Definition at line 1209 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by ilObjUser\delete().

{
global $ilDB;
//gobjective
$ilDB->manipulateF(
'DELETE FROM scorm_tracking WHERE user_id = %s',
array('integer'),
array($user_id)
);
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::exportSelected (   $a_exportall = 0,
  $a_user = array() 
)

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 599 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, $query, $res, $row, ilObject\_exists(), ilObject\getId(), and sendExportFile().

{
global $ilDB, $ilUser;
$scos = array();
//get all SCO's of this object
$query = 'SELECT scorm_object.obj_id, scorm_object.title, '
. 'scorm_object.c_type, scorm_object.slm_id, scorm_object.obj_id scoid '
. 'FROM scorm_object, sc_item, sc_resource '
. 'WHERE (scorm_object.slm_id = %s '
. 'AND scorm_object.obj_id = sc_item.obj_id '
. 'AND sc_item.identifierref = sc_resource.import_id '
. 'AND sc_resource.scormtype = %s) '
. 'GROUP BY scorm_object.obj_id, scorm_object.title, scorm_object.c_type, '
. 'scorm_object.slm_id, scorm_object.obj_id ';
$res = $ilDB->queryF(
array('integer', 'text'),
array($this->getId(), 'sco')
);
while($row = $ilDB->fetchAssoc($res))
{
$scos[] = $row['scoid'];
}
$csv = null;
//a module is completed when all SCO's are completed
$user_array = array();
if($a_exportall == 1)
{
$query = 'SELECT user_id FROM scorm_tracking WHERE obj_id = %s GROUP BY user_id';
$res = $ilDB->queryF(
array('integer'),
array($this->getId())
);
while($row = $ilDB->fetchAssoc($res))
{
$user_array[] = $row['user_id'];
}
}
else
{
$user_array = $a_user;
}
foreach($user_array as $user)
{
$scos_c = $scos;
//copy SCO_array
//check if all SCO's are completed
for($i = 0; $i < count($scos); $i++)
{
$query = 'SELECT * FROM scorm_tracking '
. 'WHERE (user_id = %s AND obj_id = %s AND sco_id = %s '
. 'AND ( (lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'completed').') OR (lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'passed').') ) )';
$res = $ilDB->queryF(
array('integer', 'integer', 'integer', 'text', 'text'),
array($user, $this->getId(), $scos[$i], 'cmi.core.lesson_status', 'cmi.core.lesson_status')
);
$data = $ilDB->fetchAssoc($res);
if(is_array($data) && count($data))
{
//delete from array
$key = array_search($scos[$i], $scos_c);
unset($scos_c[$key]);
}
}
//check for completion
if(count($scos_c) == 0)
{
$completion = 1;
}
else
{
$completion = 0;
}
if(ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr')
{
//write export entry
$e_user = new ilObjUser($user);
$login = $e_user->getLogin();
$firstname = $e_user->getFirstname();
$lastname = $e_user->getLastname();
$email = $e_user->getEmail();
$department = $e_user->getDepartment();
//get the date for csv export
$query = 'SELECT MAX(c_timestamp) exp_date '
. 'FROM scorm_tracking '
. 'WHERE user_id = %s AND obj_id = %s';
$res = $ilDB->queryF(
array('integer', 'integer'),
array($user, $this->getId())
);
$data = $ilDB->fetchAssoc($res);
if(is_array($data) && count($data))
{
$validDate = false;
$datetime = explode(' ', $data['exp_date']);
if(count($datetime) == 2)
{
$date = explode('-', $datetime[0]);
if(count($date) == 3 && checkdate($date[1], $date[2], $date[0]))
$validDate = true;
}
if($validDate)
$date = date('d.m.Y', strtotime($data['exp_date']));
else
$date = '';
}
else
{
$date = '';
}
$csv = $csv. "$department;$login;$lastname;$firstname;$email;$date;$completion\n";
}
}
$header = "Department;Login;Lastname;Firstname;Email;Date;Status\n";
$this->sendExportFile($header, $csv);
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::exportSelectedRaw (   $a_exportall = 0,
  $a_user = array() 
)

Definition at line 518 of file class.ilObjSCORMLearningModule.php.

References $_POST, $ilDB, $query, $res, $row, $timestamp, ilObject\_exists(), ilObject\getId(), and sendExportFile().

{
global $ilDB, $ilUser;
$csv = null;
$user_array = array();
if(!isset($_POST['user']) && $a_exportall == 0)
{
$this->ilias->raiseError($this->lng->txt('no_checkbox'), $this->ilias->error_obj->MESSAGE);
}
if($a_exportall == 1)
{
$res = $ilDB->queryF(
'SELECT user_id FROM scorm_tracking WHERE obj_id = %s GROUP BY user_id',
array('integer'),
array($this->getId())
);
while($row = $ilDB->fetchAssoc($res))
{
$user_array[] = $row['user_id'];
}
}
else
{
$user_array = $a_user;
}
//loop through users and get all data
foreach($user_array as $user)
{
//get user e-mail
if(ilObject::_exists($user) && ilObject::_lookUpType($user) == 'usr')
{
$e_user = new ilObjUser($user);
$email = $e_user->getEmail();
//get sco related information
$query = 'SELECT rvalue, lvalue, identifierref, c_timestamp '
. 'FROM scorm_tracking '
. 'INNER JOIN sc_item ON sc_item.obj_id = scorm_tracking.sco_id '
. 'WHERE scorm_tracking.sco_id <> 0 AND user_id = %s AND scorm_tracking.obj_id = %s';
$res = $ilDB->queryF(
array('integer', 'integer'),
array($user, $this->getId())
);
while($row = $ilDB->fetchAssoc($res))
{
//get mail address for user-id
$sco_id = $row['identifierref'];
$key = $row['lvalue'];
$value = $row['rvalue'];
$timestamp = $row['c_timestamp'];
$csv = $csv. "$sco_id;$key;$value;$email;$timestamp;$user\n";
}
//get sco unrelated information
$query = 'SELECT rvalue, lvalue, c_timestamp FROM scorm_tracking '
. 'WHERE sco_id = 0 AND user_id = %s AND obj_id = %s';
$res = $ilDB->queryF(
array('integer', 'integer'),
array($user, $this->getId())
);
while($row = $ilDB->fetchAssoc($res))
{
$key = $row['lvalue'];
$value = $row['rvalue'];
$timestamp = $row['c_timestamp'];
$csv = $csv. "0;$key;$value;$email;$timestamp;$user\n";
}
}
}
$header = "Scoid;Key;Value;Email;Timestamp;Userid\n";
$this->sendExportFile($header, $csv);
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::get_user_id (   $a_login)

Definition at line 983 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by ilObjSCORM2004LearningModule\importSuccess(), and importSuccess().

{
global $ilDB, $ilUser;
$val_set = $ilDB->queryF('SELECT * FROM usr_data WHERE(login=%s)',
array('text'),array($a_login));
$val_rec = $ilDB->fetchAssoc($val_set);
if (count($val_rec)>0) {
return $val_rec['usr_id'];
} else {
return null;
}
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getAllScoIds ( )

Definition at line 1143 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and ilObject\getId().

Referenced by getCourseCompletionForUser().

{
global $ilDB;
$scos = array();
//get all SCO's of this object
$val_set = $ilDB->queryF('
SELECT scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id scoid
FROM scorm_object, sc_item,sc_resource
WHERE(scorm_object.slm_id = %s
AND scorm_object.obj_id = sc_item.obj_id
AND sc_item.identifierref = sc_resource.import_id
AND sc_resource.scormtype = %s )
GROUP BY scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id',
array('integer','text'),
array($this->getId(),'sco'));
while ($val_rec = $ilDB->fetchAssoc($val_set))
{
array_push($scos,$val_rec['scoid']);
}
return $scos;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getAttemptsForUser (   $a_user_id)

get number of atttempts for a certain user and package

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 324 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and ilObject\getId().

Referenced by getTrackedUsers().

{
global $ilDB;
$val_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($a_user_id,0,'package_attempts',$this->getId()));
$val_rec = $ilDB->fetchAssoc($val_set);
$val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
if ($val_rec["rvalue"] == null) {
$val_rec["rvalue"]="";
}
return $val_rec["rvalue"];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getCourseCompletionForUser (   $a_user)

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 1204 of file class.ilObjSCORMLearningModule.php.

References getAllScoIds(), and getStatusForUser().

{
return $this->getStatusForUser($a_user,$this->getAllScoIds,true);
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getModuleVersionForUser (   $a_user_id)

get module version that tracking data for a user was recorded on

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 349 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and ilObject\getId().

Referenced by getTrackedUsers().

{
global $ilDB;
$val_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($a_user_id,0,'module_version',$this->getId()));
$val_rec = $ilDB->fetchAssoc($val_set);
$val_rec["rvalue"] = str_replace("\r\n", "\n", $val_rec["rvalue"]);
if ($val_rec["rvalue"] == null) {
$val_rec["rvalue"]="";
}
return $val_rec["rvalue"];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getStatusForUser (   $a_user,
  $a_allScoIds,
  $a_numerical = false 
)

Definition at line 1174 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by getCourseCompletionForUser().

{
global $ilDB;
$scos = $a_allScoIds;
//loook up status
//check if all SCO's are completed
$scos_c = implode(',',$scos);
$val_set = $ilDB->queryF('
SELECT sco_id FROM scorm_tracking
WHERE (user_id = %s
AND obj_id = %s
AND '.$ilDB->in('sco_id', $scos, false, 'integer').'
AND ((lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'completed').') OR (lvalue = %s AND '.$ilDB->like('rvalue', 'clob', 'passed').') ) )',
array('integer','integer','text','text',),
array($a_user,$this->getID(),'cmi.core.lesson_status','cmi.core.lesson_status'));
while ($val_rec = $ilDB->fetchAssoc($val_set))
{
$key = array_search($val_rec['sco_id'], $scos);
unset ($scos[$key]);
}
//check for completion
if (count($scos) == 0) {
$completion = ($a_numerical===true) ? true: $this->lng->txt("cont_complete");
}
if (count($scos) > 0) {
$completion = ($a_numerical===true) ? false: $this->lng->txt("cont_incomplete");
}
return $completion;
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getTrackedItems ( )

get all tracked items of current user

Reimplemented in ilObjSCORM2004LearningModule, and ilObjAICCLearningModule.

Definition at line 236 of file class.ilObjSCORMLearningModule.php.

References $ilDB, and ilObject\getId().

{
global $ilDB, $ilUser;
$sco_set = $ilDB->queryF('
SELECT DISTINCT sco_id FROM scorm_tracking WHERE obj_id = %s',
array('integer'),array($this->getId()));
$items = array();
while($sco_rec = $ilDB->fetchAssoc($sco_set))
{
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
$sc_item =& new ilSCORMItem($sco_rec["sco_id"]);
if ($sc_item->getIdentifierRef() != "")
{
$items[count($items)] =& $sc_item;
}
}
return $items;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getTrackedUsers (   $a_search)

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 284 of file class.ilObjSCORMLearningModule.php.

References $ilDB, ilObject\_exists(), ilDatePresentation\formatDate(), getAttemptsForUser(), ilObject\getId(), getModuleVersionForUser(), and IL_CAL_DATETIME.

{
global $ilUser, $ilDB, $ilUser;
$sco_set = $ilDB->queryF('
SELECT user_id,MAX(c_timestamp) last_access FROM scorm_tracking
WHERE obj_id = %s
GROUP BY user_id',
array('integer'), array($this->getId()));
$items = array();
while($sco_rec = $ilDB->fetchAssoc($sco_set))
{
if ($sco_rec['last_access'] != 0) {
$sco_rec['last_access'] = ilDatePresentation::formatDate(new ilDateTime($sco_rec['last_access'],IL_CAL_DATETIME));
} else {
$sco_rec['last_access'] = "";
}
if (ilObject::_exists($sco_rec['user_id']) && ilObject::_lookUpType($sco_rec["user_id"])=="usr" ) {
$user = new ilObjUser($sco_rec['user_id']);
//$sco_rec['status'] = $this->getStatusForUser($sco_rec["user_id"]);
$sco_rec['version'] = $this->getModuleVersionForUser($sco_rec["user_id"]);
$sco_rec['attempts'] = $this->getAttemptsForUser($sco_rec["user_id"]);
$sco_rec['username'] = $user->getLastname().", ".$user->getFirstname();
if ($a_search != "" && (strpos(strtolower($user->getLastname()), strtolower($a_search)) !== false || strpos(strtolower($user->getFirstname()), strtolower($a_search)) !== false ) ) {
$items[] = $sco_rec;
} else if ($a_search == "") {
$items[] = $sco_rec;
}
}
}
return $items;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getTrackingDataAgg (   $a_user_id)

Definition at line 394 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, and ilObject\getId().

{
global $ilDB;
// get all users with any tracking data
$sco_set = $ilDB->queryF('
SELECT DISTINCT sco_id FROM scorm_tracking
WHERE obj_id = %s
AND user_id = %s
AND sco_id <> %s',
array('integer','integer','integer'),
array($this->getId(),$a_user_id,0));
$data = array();
while($sco_rec = $ilDB->fetchAssoc($sco_set))
{
$data_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE obj_id = %s
AND sco_id = %s
AND user_id = %s
AND lvalue <> %s
AND (lvalue = %s
OR lvalue = %s
OR lvalue = %s)',
array('integer','integer','integer','text','text','text','text'),
array($this->getId(),
$sco_rec["sco_id"],
$a_user_id,
"package_attempts",
"cmi.core.lesson_status",
"cmi.core.total_time",
"cmi.core.score.raw")
);
$score = $time = $status = "";
while($data_rec = $ilDB->fetchAssoc($data_set))
{
switch($data_rec["lvalue"])
{
case "cmi.core.lesson_status":
$status = $data_rec["rvalue"];
break;
case "cmi.core.total_time":
$time = $data_rec["rvalue"];
break;
case "cmi.core.score.raw":
$score = $data_rec["rvalue"];
break;
}
}
//create sco_object
$sc_item =& new ilSCORMItem($sco_rec["sco_id"]);
$data[] = array("sco_id"=>$sco_rec["sco_id"], "title" => $sc_item->getTitle(),
"score" => $score, "time" => $time, "status" => $status);
}
return $data;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getTrackingDataAggSco (   $a_sco_id)

Definition at line 458 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, and ilObject\getId().

{
global $ilDB;
// get all users with any tracking data
$user_set = $ilDB->queryF('
SELECT DISTINCT user_id FROM scorm_tracking
WHERE obj_id = %s
AND sco_id = %s',
array('integer','integer'),
array($this->getId(),$a_sco_id));
$data = array();
while($user_rec = $ilDB->fetchAssoc($user_set))
{
$data_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE obj_id = %s
AND sco_id = %s
AND user_id = %s
AND (lvalue = %s
OR lvalue = %s
OR lvalue = %s)',
array('integer','integer','integer','text','text','text'),
array($this->getId(),
$a_sco_id,
$user_rec["user_id"],
"cmi.core.lesson_status",
"cmi.core.total_time",
"cmi.core.score.raw")
);
$score = $time = $status = "";
while($data_rec = $ilDB->fetchAssoc($data_set))
{
switch($data_rec["lvalue"])
{
case "cmi.core.lesson_status":
$status = $data_rec["rvalue"];
break;
case "cmi.core.total_time":
$time = $data_rec["rvalue"];
break;
case "cmi.core.score.raw":
$score = $data_rec["rvalue"];
break;
}
}
$data[] = array("user_id" => $user_rec["user_id"],
"score" => $score, "time" => $time, "status" => $status);
}
return $data;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getTrackingDataPerUser (   $a_sco_id,
  $a_user_id 
)

Definition at line 371 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, and ilObject\getId().

{
global $ilDB;
$data_set = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND obj_id = %s
ORDER BY lvalue',
array('integer','integer','integer'),
array($a_user_id,$a_sco_id,$this->getId()));
$data = array();
while($data_rec = $ilDB->fetchAssoc($data_set))
{
$data[] = $data_rec;
}
return $data;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getTrackingItems ( )

Reimplemented in ilObjAICCLearningModule.

Definition at line 58 of file class.ilObjSCORMLearningModule.php.

References _getTrackingItems(), and ilObject\getId().

+ Here is the call graph for this function:

ilObjSCORMLearningModule::getUserIdEmail (   $a_mail)

assumes that only one account exists for a mailadress

Definition at line 1023 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by importRaw().

{
global $ilDB, $ilUser;
$val_set = $ilDB->queryF('SELECT usr_id FROM usr_data WHERE(email=%s)',
array('text'),array($a_mail));
$val_rec = $ilDB->fetchAssoc($val_set);
return $val_rec["usr_id"];
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::getValidationSummary ( )

Definition at line 49 of file class.ilObjSCORMLearningModule.php.

Referenced by ilObjSCORM2004LearningModule\readObject(), and readObject().

{
if(is_object($this->validator))
{
return $this->validator->getSummary();
}
return "";
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::ilObjSCORMLearningModule (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

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

References ilObject\ilObject().

{
$this->type = "sahs";
parent::ilObject($a_id,$a_call_by_reference);
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::importRaw (   $a_file)
private

Definition at line 911 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, ilLPStatusWrapper\_updateStatus(), ilObject\getId(), getUserIdEmail(), and lookupSCOId().

Referenced by importTrackingData().

{
global $ilDB, $ilUser;
$fhandle = fopen($a_file, "r");
$fields = fgetcsv($fhandle, 4096, ';');
$users = array();
while(($csv_rows = fgetcsv($fhandle, 4096, ";")) !== FALSE)
{
$data = array_combine($fields, $csv_rows);
$il_sco_id = $this->lookupSCOId($data['Scoid']);
//look for required data for an import
$user_id = $data['Userid'];
$users[] = $user_id;
if ($user_id == "" || $user_id == null) {
//look for Email
$user_id = $this->getUserIdEmail($data['Email']);
}
//do the actual import
if ($user_id != "" && $il_sco_id>=0)
{
$statement = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($user_id, $il_sco_id, $data['Key'],$this->getID())
);
if($ilDB->numRows($statement) > 0)
{
$ilDB->update('scorm_tracking',
array(
'rvalue' => array('clob', $data['Value']),
'c_timestamp' => array('timestamp', $data['Timestamp'])
),
array(
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $il_sco_id),
'lvalue' => array('text', $data['Key']),
'obj_id' => array('integer', $this->getId())
)
);
}
else
{
$ilDB->insert('scorm_tracking', array(
'obj_id' => array('integer', $this->getId()),
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $il_sco_id),
'lvalue' => array('text', $data['Key']),
'rvalue' => array('clob', $data['Value']),
'c_timestamp' => array('timestamp', $data['Timestamp'])
));
}
}
}
fclose($fhandle);
// update learning progress
foreach ($users as $user_id)
{
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
}
return 0;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::importSuccess (   $a_file)

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 762 of file class.ilObjSCORMLearningModule.php.

References $data, $ilDB, ilLPStatusWrapper\_updateStatus(), get_user_id(), and ilObject\getId().

Referenced by importTrackingData().

{
global $ilDB, $ilUser;
$scos = array();
//get all SCO's of this object
$val_set = $ilDB->queryF('
SELECT scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id scoid
FROM scorm_object,sc_item,sc_resource
WHERE(scorm_object.slm_id = %s
AND scorm_object.obj_id=sc_item.obj_id
AND sc_item.identifierref = sc_resource.import_id
AND sc_resource.scormtype = %s)
GROUP BY scorm_object.obj_id,
scorm_object.title,
scorm_object.c_type,
scorm_object.slm_id,
scorm_object.obj_id ',
array('integer','text'),
array($this->getId(),'sco')
);
if (count($val_set)<1)
{
return -1;
}
while($rows_sco = $ilDB->fetchAssoc($val_set))
{
array_push($scos,$rows_sco['scoid']);
}
$fhandle = fopen($a_file, "r");
$obj_id = $ilDB->quote($this->getID());
$fields = fgetcsv($fhandle, 4096, ';');
$users = array();
while(($csv_rows = fgetcsv($fhandle, 4096, ";")) !== FALSE) {
$data = array_combine($fields, $csv_rows);
//check the format
$statuscheck = 0;
if (count($csv_rows) == 6) {$statuscheck = 1;}
if ($this->get_user_id($data["Login"])>0) {
$user_id = $ilDB->quote($this->get_user_id($data["Login"]));
$users[] = $user_id;
$import = $data["Status"];
if ($import == "") {$import = 1;}
//iterate over all SCO's
if ($import == 1) {
foreach ($scos as $sco)
{
$sco_id = $sco;
$date_ex = explode('.', $data['Date']);
$date = implode('-', array($date_ex[2], $date_ex[1], $date_ex[0]));
$statement = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($user_id, $sco_id, 'cmi.core.lesson_status',$obj_id)
);
if($ilDB->numRows($statement) > 0)
{
$ilDB->update('scorm_tracking',
array(
'rvalue' => array('clob', 'completed'),
'c_timestamp' => array('timestamp', $date)
),
array(
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $sco_id),
'lvalue' => array('text', 'cmi.core.lesson_status'),
'obj_id' => array('integer', $obj_id)
)
);
}
else
{
$ilDB->insert('scorm_tracking', array(
'obj_id' => array('integer', $obj_id),
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $sco_id),
'lvalue' => array('text', 'cmi.core.lesson_status'),
'rvalue' => array('clob', 'completed'),
'c_timestamp' => array('timestamp', $date)
));
}
$statement = $ilDB->queryF('
SELECT * FROM scorm_tracking
WHERE user_id = %s
AND sco_id = %s
AND lvalue = %s
AND obj_id = %s',
array('integer','integer','text','integer'),
array($user_id, $sco_id, 'cmi.core.entry',$obj_id)
);
if($ilDB->numRows($statement) > 0)
{
$ilDB->update('scorm_tracking',
array(
'rvalue' => array('clob', 'completed'),
'c_timestamp' => array('timestamp', $date)
),
array(
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $sco_id),
'lvalue' => array('text', 'cmi.core.entry'),
'obj_id' => array('integer', $obj_id)
)
);
}
else
{
$ilDB->insert('scorm_tracking', array(
'obj_id' => array('integer', $obj_id),
'user_id' => array('integer', $user_id),
'sco_id' => array('integer', $sco_id),
'lvalue' => array('text', 'cmi.core.entry'),
'rvalue' => array('clob', 'completed'),
'c_timestamp' => array('timestamp', $date)
));
}
}
}
} else {
//echo "Warning! User $csv_rows[0] does not exist in ILIAS. Data for this user was skipped.\n";
}
}
foreach ($users as $user_id)
{
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
}
return 0;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::importTrackingData (   $a_file)

Definition at line 731 of file class.ilObjSCORMLearningModule.php.

References $error, $ilDB, importRaw(), and importSuccess().

{
global $ilDB, $ilUser;
$error = 0;
//echo file_get_contents($a_file);
$method = null;
//lets import
$fhandle = fopen($a_file, "r");
//the top line is the field names
$fields = fgetcsv($fhandle, 4096, ';');
//lets check the import method
fclose($fhandle);
switch($fields[0])
{
case "Scoid":
$error = $this->importRaw($a_file);
break;
case "Department":
$error = $this->importSuccess($a_file);
break;
default:
return -1;
break;
}
return $error;
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::lookupSCOId (   $a_referrer)
private

resolves manifest SCOID to internal ILIAS SCO ID

Definition at line 1001 of file class.ilObjSCORMLearningModule.php.

References $ilDB.

Referenced by importRaw().

{
global $ilDB, $ilUser;
//non specific SCO entries
if ($a_referrer=="0") {
return 0;
}
$val_set = $ilDB->queryF('
SELECT obj_id FROM sc_item,scorm_tree
WHERE (obj_id = child
AND identifierref = %s
AND slm_id = %s)',
array('text','integer'), array($a_referrer,$this->getID()));
$val_rec = $ilDB->fetchAssoc($val_set);
return $val_rec["obj_id"];
}

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::readObject ( )

read manifest file public

Reimplemented in ilObjSCORM2004LearningModule, and ilObjAICCLearningModule.

Definition at line 97 of file class.ilObjSCORMLearningModule.php.

References $_POST, $ilErr, ilObjSAHSLearningModule\getDataDirectory(), getValidationSummary(), seems_not_utf8(), and validate().

{
global $ilErr;
// the seems_utf8($str) function
include_once("include/inc.utf8checker.php");
$needs_convert = false;
// convert imsmanifest.xml file in iso to utf8 if needed
// include_once("include/inc.convertcharset.php");
$manifest_file = $this->getDataDirectory()."/imsmanifest.xml";
// check if manifestfile exists and space left on device...
$check_for_manifest_file = is_file($manifest_file);
// if no manifestfile
if (!$check_for_manifest_file)
{
$this->ilias->raiseError($this->lng->txt("Manifestfile $manifest_file not found!"), $this->ilias->error_obj->MESSAGE);
return;
}
if ($check_for_manifest_file)
{
$manifest_file_array = file($manifest_file);
foreach($manifest_file_array as $mfa)
{
if (seems_not_utf8($mfa))
{
$needs_convert = true;
break;
}
}
// to copy the file we need some extraspace, counted in bytes *2 ... we need 2 copies....
$estimated_manifest_filesize = filesize($manifest_file) * 2;
// i deactivated this, because it seems to fail on some windows systems (see bug #1795)
//$check_disc_free = disk_free_space($this->getDataDirectory()) - $estimated_manifest_filesize;
$check_disc_free = 2;
}
// if $manifest_file needs to be converted to UTF8
if ($needs_convert)
{
// if file exists and enough space left on device
if ($check_for_manifest_file && ($check_disc_free > 1))
{
// create backup from original
if (!copy($manifest_file, $manifest_file.".old"))
{
echo "Failed to copy $manifest_file...<br>\n";
}
// read backupfile, convert each line to utf8, write line to new file
// php < 4.3 style
$f_write_handler = fopen($manifest_file.".new", "w");
$f_read_handler = fopen($manifest_file.".old", "r");
while (!feof($f_read_handler))
{
$zeile = fgets($f_read_handler);
//echo mb_detect_encoding($zeile);
fputs($f_write_handler, utf8_encode($zeile));
}
fclose($f_read_handler);
fclose($f_write_handler);
// copy new utf8-file to imsmanifest.xml
if (!copy($manifest_file.".new", $manifest_file))
{
echo "Failed to copy $manifest_file...<br>\n";
}
if (!@is_file($manifest_file))
{
$this->ilias->raiseError($this->lng->txt("cont_no_manifest"),
$this->ilias->error_obj->WARNING);
}
}
else
{
// gives out the specific error
if (!($check_disc_free > 1))
$this->ilias->raiseError($this->lng->txt("Not enough space left on device!"),$this->ilias->error_obj->MESSAGE);
return;
}
}
else
{
// check whether file starts with BOM (that confuses some sax parsers, see bug #1795)
$hmani = fopen($manifest_file, "r");
$start = fread($hmani, 3);
if (strtolower(bin2hex($start)) == "efbbbf")
{
$f_write_handler = fopen($manifest_file.".new", "w");
while (!feof($hmani))
{
$n = fread($hmani, 900);
fputs($f_write_handler, $n);
}
fclose($f_write_handler);
fclose($hmani);
// copy new utf8-file to imsmanifest.xml
if (!copy($manifest_file.".new", $manifest_file))
{
echo "Failed to copy $manifest_file...<br>\n";
}
}
else
{
fclose($hmani);
}
}
//validate the XML-Files in the SCORM-Package
if ($_POST["validate"] == "y")
{
if (!$this->validate($this->getDataDirectory()))
{
$ilErr->raiseError("<b>Validation Error(s):</b><br>".$this->getValidationSummary(),$ilErr->MESSAGE);
}
}
// start SCORM package parser
include_once ("./Modules/ScormAicc/classes/SCORM/class.ilSCORMPackageParser.php");
// todo determine imsmanifest.xml path here...
$slmParser = new ilSCORMPackageParser($this, $manifest_file);
$slmParser->startParsing();
return $slmParser->getPackageTitle();
}

+ Here is the call graph for this function:

ilObjSCORMLearningModule::sendExportFile (   $a_header,
  $a_content 
)

send export file to browser

Definition at line 1039 of file class.ilObjSCORMLearningModule.php.

References $filename, $timestamp, exit, and ilObject\getRefId().

Referenced by ilObjSCORM2004LearningModule\exportSelected(), exportSelected(), and exportSelectedRaw().

{
$timestamp = time();
$refid = $this->getRefId();
$filename = "scorm_tracking_".$refid."_".$timestamp.".csv";
//Header
header("Expires: 0");
header("Cache-control: private");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Description: File Transfer");
header("Content-Type: application/octet-stream");
header("Content-disposition: attachment; filename=$filename");
echo $a_header.$a_content;
exit;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSCORMLearningModule::validate (   $directory)

Validate all XML-Files in a SCOM-Directory.

public

Returns
boolean true if all XML-Files are wellfomred and valid

Reimplemented in ilObjSCORM2004LearningModule.

Definition at line 42 of file class.ilObjSCORMLearningModule.php.

Referenced by readObject().

{
$this->validator =& new ilObjSCORMValidator($directory);
$returnValue = $this->validator->validate();
return $returnValue;
}

+ Here is the caller graph for this function:

Field Documentation

ilObjSCORMLearningModule::$validator

Definition at line 20 of file class.ilObjSCORMLearningModule.php.


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