33 include_once
'./webservice/soap/classes/class.ilSoapAdministration.php';
52 if (!$this->__checkSession($sid)) {
55 if (!strlen($ref_id)) {
57 'No ref id given. Aborting!',
61 global $rbacsystem, $tree,
$ilLog;
66 'No exercise found for id: ' . $ref_id,
72 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
76 $permission_ok =
false;
78 if ($rbacsystem->checkAccess(
'read', $ref_id)) {
79 $permission_ok =
true;
84 if (!$permission_ok) {
86 'No permission to read the object with id: ' . $ref_id,
92 if (!is_object($lm_obj) || $lm_obj->getType()!=
"sahs") {
94 'Wrong obj id or type for scorm object with id ' . $ref_id,
99 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
100 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
102 $imsFilename = $lm_obj->getDataDirectory() . DIRECTORY_SEPARATOR .
"imsmanifest.xml";
104 if (!file_exists($imsFilename)) {
106 'Could not find manifest file for object with ref id ' . $ref_id,
110 return file_get_contents($imsFilename);
118 if (!$this->__checkSession($sid)) {
121 if (!strlen($ref_id)) {
123 'No ref id given. Aborting!',
127 global $rbacsystem, $tree,
$ilLog;
132 'No exercise found for id: ' . $ref_id,
138 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
142 include_once(
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php");
153 if (!$this->__checkSession($sid)) {
157 if (!strlen($a_ref_id)) {
158 return $this->
__raiseError(
'No ref_id given. Aborting!',
'Client');
161 include_once
'include/inc.header.php';
166 'No scorm module found for id: ' . $a_ref_id,
171 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
172 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
175 return $this->
__raiseError(
'Learning progress not enabled in this installation. Aborting!',
'Server');
184 return 'in_progress';
186 return 'not_attempted';
const LP_STATUS_COMPLETED_NUM
getIMSManifestXML($sid, $ref_id)
get ims manifest xml
getSCORMCompletionStatus($sid, $a_usr_id, $a_ref_id)
const LP_STATUS_IN_PROGRESS_NUM
static _isInTrash($a_ref_id)
checks wether object is in trash
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjectId($a_ref_id)
lookup object id
static _enabledLearningProgress()
check wether learing progress is enabled or not
__raiseError($a_message, $a_code)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
hasSCORMCertificate($sid, $ref_id, $usr_id)
initAuth($sid)
Init authentication.
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
const LP_STATUS_FAILED_NUM
static _lookupUserCertificate($obj_id, $usr_id=0)
Checks whether a certificate exists for the active user or not.