This class handles all DB changes necessary for fraunhofer.
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 14 of file class.ilSoapLearningProgressAdministration.php.
◆ addUserProgress()
ilSoapLearningProgressAdministration::addUserProgress |
( |
ilXmlWriter |
$writer, |
|
|
|
$users, |
|
|
|
$a_type |
|
) |
| |
|
protected |
Definition at line 349 of file class.ilSoapLearningProgressAdministration.php.
References $a_type, $info, $users, ilObjUser\_lookupName(), array, ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
351 foreach (
$users as $user_id) {
362 $writer->
xmlElement(
'Firstname',
array(), (
string) $info[
'firstname']);
static _lookupName($a_user_id)
lookup user name
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlEndTag($tag)
Writes an endtag.
Create styles array
The data for the language used.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
◆ applyProgressFilter()
ilSoapLearningProgressAdministration::applyProgressFilter |
( |
|
$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 377 of file class.ilSoapLearningProgressAdministration.php.
References $GLOBALS, ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), and array.
379 include_once
'./Services/Tracking/classes/class.ilLPStatusWrapper.php';
382 $all_users =
array();
383 if (in_array(self::USER_FILTER_ALL, $usr_ids)) {
384 $all_users = array_unique(
392 $all_users = $usr_ids;
395 if (!$filter or in_array(self::PROGRESS_FILTER_ALL, $filter)) {
396 $GLOBALS[
'log']->write(__METHOD__ .
': Deleting all progress data');
400 $filter_users =
array();
401 if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) {
402 $GLOBALS[
'log']->write(__METHOD__ .
': Filtering in progress.');
405 if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) {
406 $GLOBALS[
'log']->write(__METHOD__ .
': Filtering completed.');
409 if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) {
410 $GLOBALS[
'log']->write(__METHOD__ .
': Filtering failed.');
415 return array_intersect($all_users, $filter_users);
static _getInProgress($a_obj_id)
Static function to read users who have the status 'in_progress'.
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getFailed($a_obj_id)
Static function to read the users who have the status 'completed'.
Create styles array
The data for the language used.
◆ deleteScorm2004Tracking()
ilSoapLearningProgressAdministration::deleteScorm2004Tracking |
( |
|
$a_obj_id, |
|
|
|
$a_usr_ids |
|
) |
| |
|
protected |
Delete scorm 2004 tracking.
- Parameters
-
type | $a_obj_id | |
type | $a_usr_ids | |
Definition at line 441 of file class.ilSoapLearningProgressAdministration.php.
References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.
445 $query =
'SELECT cp_node_id FROM cp_node ' .
446 'WHERE nodename = ' . $ilDB->quote(
'item',
'text') .
' ' .
447 'AND cp_node.slm_id = ' . $ilDB->quote($a_obj_id,
'integer');
452 $scos[] =
$row->cp_node_id;
455 $query =
'DELETE FROM cmi_node ' .
456 'WHERE ' . $ilDB->in(
'user_id', (
array) $a_usr_ids,
false,
'integer') .
' ' .
457 'AND ' . $ilDB->in(
'cp_node_id', $scos,
false,
'integer');
458 $ilDB->manipulate(
$query);
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
◆ deleteScormTracking()
ilSoapLearningProgressAdministration::deleteScormTracking |
( |
|
$a_obj_id, |
|
|
|
$a_usr_ids |
|
) |
| |
|
protected |
Delete SCORM Tracking type $ilDB.
- Parameters
-
type | $a_obj_id | |
type | $a_usr_ids | |
- Returns
- boolean
Definition at line 425 of file class.ilSoapLearningProgressAdministration.php.
References $ilDB, $query, and $res.
429 $query =
'DELETE FROM scorm_tracking ' .
430 'WHERE ' . $ilDB->in(
'user_id', $a_usr_ids,
false,
'integer') .
' ' .
431 'AND obj_id = ' . $ilDB->quote($a_obj_id,
'integer') .
' ';
foreach($_POST as $key=> $value) $res
◆ getLearningProgressChanges()
ilSoapLearningProgressAdministration::getLearningProgressChanges |
( |
|
$sid, |
|
|
|
$timestamp, |
|
|
|
$include_ref_ids, |
|
|
|
$type_filter |
|
) |
| |
Get learning progress changes.
Definition at line 464 of file class.ilSoapLearningProgressAdministration.php.
References $ilLog, $timestamp, ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().
469 if (!$this->__checkSession($sid)) {
472 global $rbacsystem, $tree,
$ilLog;
476 if (is_array($type_filter)) {
477 $types = implode($type_filter,
",");
482 include_once
'./Services/Tracking/classes/class.ilLPXmlWriter.php';
485 $writer->setIncludeRefIds($include_ref_ids);
486 $writer->setTypeFilter($type_filter);
489 return $writer->xmlDumpMem(
true);
XML writer learning progress.
__raiseError($a_message, $a_code)
foreach($mandatory_scripts as $file) $timestamp
initAuth($sid)
Init authentication.
◆ $DELETE_PROGRESS_FILTER_TYPES
ilSoapLearningProgressAdministration::$DELETE_PROGRESS_FILTER_TYPES = array('sahs', 'tst') |
|
staticprotected |
◆ $PROGRESS_INFO_TYPES
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: