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!',
63 $rbacsystem = $DIC[
'rbacsystem'];
70 'No exercise found for id: ' . $ref_id,
76 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
80 $permission_ok =
false;
82 if ($rbacsystem->checkAccess(
'read', $ref_id)) {
83 $permission_ok =
true;
88 if (!$permission_ok) {
90 'No permission to read the object with id: ' . $ref_id,
96 if (!is_object($lm_obj) || $lm_obj->getType()!=
"sahs") {
98 'Wrong obj id or type for scorm object with id ' . $ref_id,
103 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
104 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
106 $imsFilename = $lm_obj->getDataDirectory() . DIRECTORY_SEPARATOR .
"imsmanifest.xml";
108 if (!file_exists($imsFilename)) {
110 'Could not find manifest file for object with ref id ' . $ref_id,
114 return file_get_contents($imsFilename);
122 if (!$this->__checkSession($sid)) {
125 if (!strlen($ref_id)) {
127 'No ref id given. Aborting!',
133 $rbacsystem = $DIC[
'rbacsystem'];
134 $tree = $DIC[
'tree'];
140 'No exercise found for id: ' . $ref_id,
146 return $this->
__raiseError(
"Parent with ID $ref_id has been deleted.",
'Client');
150 $result = $certValidator->validate($usr_id, $obj_id);
160 if (!$this->__checkSession($sid)) {
164 if (!strlen($a_ref_id)) {
165 return $this->
__raiseError(
'No ref_id given. Aborting!',
'Client');
168 include_once
'include/inc.header.php';
173 'No scorm module found for id: ' . $a_ref_id,
178 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
179 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
182 return $this->
__raiseError(
'Learning progress not enabled in this installation. Aborting!',
'Server');
191 return 'in_progress';
193 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