ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSoapSCORMAdministration Class Reference
+ Inheritance diagram for ilSoapSCORMAdministration:
+ Collaboration diagram for ilSoapSCORMAdministration:

Public Member Functions

 ilSoapExerciseAdministration ()
 getIMSManifestXML ($sid, $ref_id)
 get ims manifest xml
- Public Member Functions inherited from ilSoapAdministration
 ilSoapAdministration ($use_nusoap=true)
 __checkSession ($sid)
 initErrorWriter ()
 Overwrite error handler.
 __explodeSid ($sid)
 __setMessage ($a_str)
 __getMessage ()
 __appendMessage ($a_str)
 __initAuthenticationObject ($a_auth_mode=AUTH_LOCAL)
 __raiseError ($a_message, $a_code)
 getNIC ($sid)
 get client information from current as xml result set
 isFault ($object)
 checkObjectAccess ($ref_id, $expected_type, $permission, $returnObject=false)
 check access for ref id: expected type, permission, return object instance if returnobject is true
 getInstallationInfoXML ()
 getClientInfoXML ($clientid)

Additional Inherited Members

- Static Public Member Functions inherited from ilSoapAdministration
static return_bytes ($val)
 calculate bytes from K,M,G modifiers e.g: 8M = 8 * 1024 * 1024 bytes
- Data Fields inherited from ilSoapAdministration
 $sauth = null
 $error_method = null

Detailed Description

Definition at line 35 of file class.ilSoapSCORMAdministration.php.

Member Function Documentation

ilSoapSCORMAdministration::getIMSManifestXML (   $sid,
  $ref_id 
)

get ims manifest xml

Parameters
string$sid
int$ref_id
Returns
xml following scorm.dtd

Definition at line 51 of file class.ilSoapSCORMAdministration.php.

References $ilLog, $ref_id, ilSoapAdministration\__checkSession(), ilSoapAdministration\__raiseError(), ilObject\_getAllReferences(), ilObject\_isInTrash(), ilObject\_lookupObjectId(), and ilObjectFactory\getInstanceByObjId().

{
if(!$this->__checkSession($sid))
{
return $this->__raiseError($this->sauth->getMessage(),$this->sauth->getMessageCode());
}
if(!strlen($ref_id))
{
return $this->__raiseError('No ref id given. Aborting!',
'Client');
}
include_once './include/inc.header.php';
global $rbacsystem, $tree, $ilLog;
// get obj_id
{
return $this->__raiseError('No exercise found for id: '.$ref_id,
'Client');
}
{
return $this->__raiseError("Parent with ID $ref_id has been deleted.", 'Client');
}
// Check access
$permission_ok = false;
foreach($ref_ids = ilObject::_getAllReferences($obj_id) as $ref_id)
{
if($rbacsystem->checkAccess('read',$ref_id))
{
$permission_ok = true;
break;
}
}
if(!$permission_ok)
{
return $this->__raiseError('No permission to read the object with id: '.$ref_id,
'Server');
}
$lm_obj = ilObjectFactory::getInstanceByObjId($obj_id, false);
if (!is_object($lm_obj) || $lm_obj->getType()!= "sahs")
{
return $this->__raiseError('Wrong obj id or type for scorm object with id '.$ref_id,
'Server');
}
// get scorm xml
require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
$imsFilename = $lm_obj->getDataDirectory().DIRECTORY_SEPARATOR."imsmanifest.xml";
if (!file_exists($imsFilename)) {
return $this->__raiseError('Could not find manifest file for object with ref id '.$ref_id,
'Server');
}
return file_get_contents($imsFilename);
}

+ Here is the call graph for this function:

ilSoapSCORMAdministration::ilSoapExerciseAdministration ( )

Definition at line 37 of file class.ilSoapSCORMAdministration.php.

References ilSoapAdministration\ilSoapAdministration().

+ Here is the call graph for this function:


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