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 10 of file class.ilSoapLearningProgressAdministration.php.
◆ addUserProgress()
| ilSoapLearningProgressAdministration::addUserProgress |
( |
ilXmlWriter |
$writer, |
|
|
array |
$users, |
|
|
int |
$a_type |
|
) |
| |
|
protected |
Definition at line 373 of file class.ilSoapLearningProgressAdministration.php.
References $user_id, ilObjUser\_lookupName(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
385 $writer->
xmlElement(
'Login', array(), (
string) $info[
'login']);
386 $writer->
xmlElement(
'Firstname', array(), (
string) $info[
'firstname']);
387 $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 399 of file class.ilSoapLearningProgressAdministration.php.
References $GLOBALS, ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), and ilLPStatusWrapper\_getInProgress().
401 $all_users = array();
402 if (in_array(self::USER_FILTER_ALL, $usr_ids)) {
403 $all_users = array_unique(
411 $all_users = $usr_ids;
414 if (!$filter || in_array(self::PROGRESS_FILTER_ALL, $filter)) {
415 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Deleting all progress data');
419 $filter_users = array();
420 if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) {
421 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering in progress.');
424 if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) {
425 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering completed.');
428 if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) {
429 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering failed.');
434 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'.
◆ deleteScorm2004Tracking()
| ilSoapLearningProgressAdministration::deleteScorm2004Tracking |
( |
int |
$a_obj_id, |
|
|
array |
$a_usr_ids |
|
) |
| |
|
protected |
Delete scorm 2004 tracking.
Definition at line 456 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.
460 $ilDB = $DIC[
'ilDB'];
462 $query =
'SELECT cp_node_id FROM cp_node ' .
463 'WHERE nodename = ' .
$ilDB->quote(
'item',
'text') .
' ' .
464 'AND cp_node.slm_id = ' .
$ilDB->quote($a_obj_id,
'integer');
469 $scos[] = $row->cp_node_id;
472 $query =
'DELETE FROM cmi_node ' .
473 'WHERE ' .
$ilDB->in(
'user_id', $a_usr_ids,
false,
'integer') .
' ' .
474 'AND ' .
$ilDB->in(
'cp_node_id', $scos,
false,
'integer');
475 $ilDB->manipulate($query);
◆ 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 482 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, Vendor\Package\$e, ilSoapAdministration\checkSession(), ilSoapAdministration\getMessage(), ilSoapAdministration\getMessageCode(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilSoapAdministration\raiseError().
492 $rbacsystem = $DIC[
'rbacsystem'];
493 $tree = $DIC[
'tree'];
494 $ilLog = $DIC[
'ilLog'];
498 if (is_array($type_filter)) {
499 $types = implode(
",", $type_filter);
506 $writer->setIncludeRefIds($include_ref_ids);
507 $writer->setTypeFilter($type_filter);
510 return $writer->xmlDumpMem(
true);
512 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 29 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: