ILIAS  Release_4_0_x_branch Revision 61816
 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
 hasSCORMCertificate ($sid, $ref_id, $usr_id)
 getSCORMCompletionStatus ($sid, $a_usr_id, $a_ref_id)
- 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)
 __setMessageCode ($a_code)
 __getMessageCode ()
 initAuth ($sid)
 initIlias ()
 __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
- Protected Attributes inherited from ilSoapAdministration
 $soap_check = true

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\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObject\_getAllReferences(), ilObject\_isInTrash(), ilObject\_lookupObjectId(), ilObjectFactory\getInstanceByObjId(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().

{
$this->initAuth($sid);
$this->initIlias();
if(!$this->__checkSession($sid))
{
return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
}
if(!strlen($ref_id))
{
return $this->__raiseError('No ref id given. Aborting!',
'Client');
}
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::getSCORMCompletionStatus (   $sid,
  $a_usr_id,
  $a_ref_id 
)

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

References $failed, ilSoapAdministration\__checkSession(), ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObjUserTracking\_enabledLearningProgress(), ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), ilObject\_lookupObjectId(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().

{
$this->initAuth($sid);
$this->initIlias();
if(!$this->__checkSession($sid))
{
return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
}
if(!strlen($a_ref_id))
{
return $this->__raiseError('No ref_id given. Aborting!', 'Client');
}
include_once 'include/inc.header.php';
// get obj_id
if(!$obj_id = ilObject::_lookupObjectId($a_ref_id))
{
return $this->__raiseError('No scorm module found for id: '.$a_ref_id,
'Client');
}
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
{
return $this->__raiseError('Learning progress not enabled in this installation. Aborting!', 'Server');
}
$completed = ilLPStatusWrapper::_getCompleted($obj_id);
$in_progress = ilLPStatusWrapper::_getInProgress($obj_id);
if(in_array($a_usr_id, $completed))
{
return 'completed';
}
else if(in_array($a_usr_id, $failed))
{
return 'failed';
}
else if(in_array($a_usr_id, $in_progress))
{
return 'in_progress';
}
else
{
return 'not_attempted';
}
}

+ Here is the call graph for this function:

ilSoapSCORMAdministration::hasSCORMCertificate (   $sid,
  $ref_id,
  $usr_id 
)

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

References $ilLog, $ref_id, $result, $usr_id, ilSoapAdministration\__checkSession(), ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilObject\_isInTrash(), ilObject\_lookupObjectId(), ilObjSAHSLearningModuleAccess\_lookupUserCertificate(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().

{
$this->initAuth($sid);
$this->initIlias();
if(!$this->__checkSession($sid))
{
return $this->__raiseError($this->__getMessage(),$this->__getMessageCode());
}
if(!strlen($ref_id))
{
return $this->__raiseError('No ref id given. Aborting!',
'Client');
}
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');
}
$result = false;
include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php");
return $result;
}

+ 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: