This class handles all DB changes necessary for fraunhofer.
More...
|
| addUserProgress (ilXmlWriter $writer, array $users, int $a_type) |
|
| applyProgressFilter (int $obj_id, array $usr_ids, array $filter) |
| Apply progress filter. More...
|
|
| deleteScormTracking (int $a_obj_id, array $a_usr_ids) |
| Delete SCORM Tracking. More...
|
|
| deleteScorm2004Tracking (int $a_obj_id, array $a_usr_ids) |
| Delete scorm 2004 tracking. More...
|
|
| checkSession (string $sid) |
|
| explodeSid (string $sid) |
|
| setMessage (string $a_str) |
|
| initAuth (string $sid) |
|
| initIlias () |
|
| initAuthenticationObject () |
|
| raiseError (string $a_message, $a_code) |
|
| checkObjectAccess (int $ref_id, array $expected_type, string $permission, bool $returnObject=false) |
| check access for ref id: expected type, permission, return object instance if returnobject is true More...
|
|
This class handles all DB changes necessary for fraunhofer.
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 12 of file class.ilSoapLearningProgressAdministration.php.
◆ addUserProgress()
ilSoapLearningProgressAdministration::addUserProgress |
( |
ilXmlWriter |
$writer, |
|
|
array |
$users, |
|
|
int |
$a_type |
|
) |
| |
|
protected |
Definition at line 384 of file class.ilSoapLearningProgressAdministration.php.
References ilObjUser\_lookupName(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
386 foreach ($users as $user_id) {
396 $writer->
xmlElement(
'Login', array(), (
string) $info[
'login']);
397 $writer->
xmlElement(
'Firstname', array(), (
string) $info[
'firstname']);
398 $writer->
xmlElement(
'Lastname', array(), (
string) $info[
'lastname']);
static _lookupName(int $a_user_id)
lookup user name
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
◆ applyProgressFilter()
ilSoapLearningProgressAdministration::applyProgressFilter |
( |
int |
$obj_id, |
|
|
array |
$usr_ids, |
|
|
array |
$filter |
|
) |
| |
|
protected |
Apply progress filter.
- Parameters
-
int | $obj_id | |
array | $usr_ids | |
array | $filter | |
- Returns
- array $filtered_users
Definition at line 410 of file class.ilSoapLearningProgressAdministration.php.
References $GLOBALS, ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), and ilLPStatusWrapper\_getInProgress().
412 include_once
'./Services/Tracking/classes/class.ilLPStatusWrapper.php';
414 $all_users = array();
415 if (in_array(self::USER_FILTER_ALL, $usr_ids)) {
416 $all_users = array_unique(
424 $all_users = $usr_ids;
427 if (!$filter || in_array(self::PROGRESS_FILTER_ALL, $filter)) {
428 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Deleting all progress data');
432 $filter_users = array();
433 if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) {
434 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering in progress.');
437 if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) {
438 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering completed.');
441 if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) {
442 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering failed.');
447 return array_intersect($all_users, $filter_users);
static _getCompleted(int $a_obj_id)
Static function to read the users who have the status 'completed'.
static _getInProgress(int $a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getFailed(int $a_obj_id)
Static function to read the users who have the status 'completed'.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
◆ deleteScorm2004Tracking()
ilSoapLearningProgressAdministration::deleteScorm2004Tracking |
( |
int |
$a_obj_id, |
|
|
array |
$a_usr_ids |
|
) |
| |
|
protected |
Delete scorm 2004 tracking.
Definition at line 469 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.
473 $ilDB = $DIC[
'ilDB'];
475 $query =
'SELECT cp_node_id FROM cp_node ' .
476 'WHERE nodename = ' .
$ilDB->quote(
'item',
'text') .
' ' .
477 'AND cp_node.slm_id = ' .
$ilDB->quote($a_obj_id,
'integer');
482 $scos[] = $row->cp_node_id;
485 $query =
'DELETE FROM cmi_node ' .
486 'WHERE ' .
$ilDB->in(
'user_id', $a_usr_ids,
false,
'integer') .
' ' .
487 'AND ' .
$ilDB->in(
'cp_node_id', $scos,
false,
'integer');
◆ deleteScormTracking()
ilSoapLearningProgressAdministration::deleteScormTracking |
( |
int |
$a_obj_id, |
|
|
array |
$a_usr_ids |
|
) |
| |
|
protected |
◆ getLearningProgressChanges()
ilSoapLearningProgressAdministration::getLearningProgressChanges |
( |
string |
$sid, |
|
|
string |
$timestamp, |
|
|
bool |
$include_ref_ids, |
|
|
array |
$type_filter |
|
) |
| |
- Parameters
-
- Returns
- soap_fault|SoapFault|string|null
Definition at line 495 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, Vendor\Package\$e, ilSoapAdministration\checkSession(), ilSoapAdministration\getMessage(), ilSoapAdministration\getMessageCode(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilSoapAdministration\raiseError().
505 $rbacsystem = $DIC[
'rbacsystem'];
506 $tree = $DIC[
'tree'];
507 $ilLog = $DIC[
'ilLog'];
511 if (is_array($type_filter)) {
512 $types = implode(
",", $type_filter);
517 include_once
'./Services/Tracking/classes/class.ilLPXmlWriter.php';
520 $writer->setIncludeRefIds($include_ref_ids);
521 $writer->setTypeFilter($type_filter);
524 return $writer->xmlDumpMem(
true);
526 return $this->
raiseError($e->getMessage(),
'Client');
raiseError(string $a_message, $a_code)
XML writer learning progress.
checkSession(string $sid)
foreach($mandatory_scripts as $file) $timestamp
◆ $DELETE_PROGRESS_FILTER_TYPES
array ilSoapLearningProgressAdministration::$DELETE_PROGRESS_FILTER_TYPES = ['sahs', 'tst'] |
|
staticprotected |
◆ $PROGRESS_INFO_TYPES
array ilSoapLearningProgressAdministration::$PROGRESS_INFO_TYPES |
|
staticprotected |
Initial value:= [
self::PROGRESS_FILTER_ALL,
self::PROGRESS_FILTER_IN_PROGRESS,
self::PROGRESS_FILTER_COMPLETED,
self::PROGRESS_FILTER_FAILED,
self::PROGRESS_FILTER_NOT_ATTEMPTED
]
Definition at line 31 of file class.ilSoapLearningProgressAdministration.php.
◆ PROGRESS_FILTER_ALL
const ilSoapLearningProgressAdministration::PROGRESS_FILTER_ALL = 0 |
◆ PROGRESS_FILTER_COMPLETED
const ilSoapLearningProgressAdministration::PROGRESS_FILTER_COMPLETED = 2 |
◆ PROGRESS_FILTER_FAILED
const ilSoapLearningProgressAdministration::PROGRESS_FILTER_FAILED = 3 |
◆ PROGRESS_FILTER_IN_PROGRESS
const ilSoapLearningProgressAdministration::PROGRESS_FILTER_IN_PROGRESS = 1 |
◆ PROGRESS_FILTER_NOT_ATTEMPTED
const ilSoapLearningProgressAdministration::PROGRESS_FILTER_NOT_ATTEMPTED = 4 |
◆ SOAP_LP_ERROR_AUTHENTICATION
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_AUTHENTICATION = 50 |
◆ SOAP_LP_ERROR_INVALID_FILTER
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_INVALID_FILTER = 52 |
◆ SOAP_LP_ERROR_INVALID_REF_ID
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_INVALID_REF_ID = 54 |
◆ SOAP_LP_ERROR_LP_NOT_AVAILABLE
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_LP_NOT_AVAILABLE = 56 |
◆ SOAP_LP_ERROR_LP_NOT_ENABLED
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_LP_NOT_ENABLED = 60 |
◆ SOAP_LP_ERROR_NO_PERMISSION
const ilSoapLearningProgressAdministration::SOAP_LP_ERROR_NO_PERMISSION = 58 |
◆ USER_FILTER_ALL
const ilSoapLearningProgressAdministration::USER_FILTER_ALL = -1 |
The documentation for this class was generated from the following file: