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 358 of file class.ilSoapLearningProgressAdministration.php.
References $a_type, $info, $users, ilObjUser\_lookupName(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
360 foreach (
$users as $user_id) {
371 $writer->
xmlElement(
'Firstname', array(), (
string) $info[
'firstname']);
372 $writer->
xmlElement(
'Lastname', array(), (
string) $info[
'lastname']);
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.
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 386 of file class.ilSoapLearningProgressAdministration.php.
References $GLOBALS, ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), and ilLPStatusWrapper\_getInProgress().
388 include_once
'./Services/Tracking/classes/class.ilLPStatusWrapper.php';
391 $all_users = array();
392 if (in_array(self::USER_FILTER_ALL, $usr_ids)) {
393 $all_users = array_unique(
401 $all_users = $usr_ids;
404 if (!$filter
or in_array(self::PROGRESS_FILTER_ALL, $filter)) {
405 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Deleting all progress data');
409 $filter_users = array();
410 if (in_array(self::PROGRESS_FILTER_IN_PROGRESS, $filter)) {
411 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering in progress.');
414 if (in_array(self::PROGRESS_FILTER_COMPLETED, $filter)) {
415 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering completed.');
418 if (in_array(self::PROGRESS_FILTER_FAILED, $filter)) {
419 $GLOBALS[
'DIC'][
'log']->write(__METHOD__ .
': Filtering failed.');
424 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'.
static _getFailed($a_obj_id)
Static function to read the users who have the status 'completed'.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
◆ 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 452 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
456 $ilDB = $DIC[
'ilDB'];
458 $query =
'SELECT cp_node_id FROM cp_node ' .
459 'WHERE nodename = ' .
$ilDB->quote(
'item',
'text') .
' ' .
460 'AND cp_node.slm_id = ' .
$ilDB->quote($a_obj_id,
'integer');
465 $scos[] =
$row->cp_node_id;
468 $query =
'DELETE FROM cmi_node ' .
469 'WHERE ' .
$ilDB->in(
'user_id', (array) $a_usr_ids,
false,
'integer') .
' ' .
470 'AND ' .
$ilDB->in(
'cp_node_id', $scos,
false,
'integer');
foreach($_POST as $key=> $value) $res
◆ 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 434 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, $ilDB, $query, and $res.
438 $ilDB = $DIC[
'ilDB'];
440 $query =
'DELETE FROM scorm_tracking ' .
441 'WHERE ' .
$ilDB->in(
'user_id', $a_usr_ids,
false,
'integer') .
' ' .
442 '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 477 of file class.ilSoapLearningProgressAdministration.php.
References $DIC, $ilLog, $timestamp, $tree, ilSoapAdministration\__getMessage(), ilSoapAdministration\__getMessageCode(), ilSoapAdministration\__raiseError(), ilSoapAdministration\initAuth(), and ilSoapAdministration\initIlias().
482 if (!$this->__checkSession($sid)) {
487 $rbacsystem = $DIC[
'rbacsystem'];
488 $tree = $DIC[
'tree'];
493 if (is_array($type_filter)) {
494 $types = implode(
",", $type_filter);
499 include_once
'./Services/Tracking/classes/class.ilLPXmlWriter.php';
502 $writer->setIncludeRefIds($include_ref_ids);
503 $writer->setTypeFilter($type_filter);
506 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:= array(
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: