ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestLP Class Reference
+ Inheritance diagram for ilTestLP:
+ Collaboration diagram for ilTestLP:

Public Member Functions

 getDefaultMode ()
 getValidModes ()
 isAnonymized ()
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 getCurrentMode ()
 isActive ()
 getModeText ($a_mode)
 getModeInfoText ($a_mode)
 getCollectionInstance ()
 getMembers ($a_search=true)
 resetLPDataForCompleteObject ($a_recursive=true)
 resetLPDataForUserIds (array $a_user_ids, $a_recursive=true)
 handleToTrash ()
 handleDelete ()

Protected Member Functions

 resetCustomLPDataForUserIds (array $a_user_ids, $a_recursive=true)
- Protected Member Functions inherited from ilObjectLP
 __construct ($a_obj_id)
 gatherLPUsers ()
 updateParentCollections ()

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectLP
static getInstance ($a_obj_id)
static isSupportedObjectType ($a_type)
static handleMove ($a_source_ref_id)
- Protected Attributes inherited from ilObjectLP
 $obj_id
 $collection_instance
 $mode

Detailed Description

Definition at line 13 of file class.ilTestLP.php.

Member Function Documentation

ilTestLP::getDefaultMode ( )

Reimplemented from ilObjectLP.

Definition at line 15 of file class.ilTestLP.php.

References ilLPObjSettings\LP_MODE_TEST_PASSED.

ilTestLP::isAnonymized ( )

Reimplemented from ilObjectLP.

Definition at line 29 of file class.ilTestLP.php.

References ilObjTest\_lookupAnonymity().

{
include_once './Modules/Test/classes/class.ilObjTest.php';
return (bool)ilObjTest::_lookupAnonymity($this->obj_id);
}

+ Here is the call graph for this function:

ilTestLP::resetCustomLPDataForUserIds ( array  $a_user_ids,
  $a_recursive = true 
)
protected

Reimplemented from ilObjectLP.

Definition at line 35 of file class.ilTestLP.php.

References $_REQUEST, ilLPStatusFactory\_getInstance(), ilLOUserResults\deleteResultsFromLP(), ilLOSettings\getInstanceByObjId(), ilObjectFactory\getInstanceByObjId(), and ilLOSettings\isObjectiveTest().

{
/* @var ilObjTest $testOBJ */
require_once 'Services/Object/classes/class.ilObjectFactory.php';
$testOBJ = ilObjectFactory::getInstanceByObjId($this->obj_id);
$testOBJ->removeTestResultsByUserIds($a_user_ids);
// :TODO: there has to be a better way
$test_ref_id = (int)$_REQUEST["ref_id"];
if($test_ref_id)
{
require_once "Modules/Course/classes/Objectives/class.ilLOSettings.php";
$course_obj_id = ilLOSettings::isObjectiveTest($test_ref_id);
if($course_obj_id)
{
// is test initial and/or qualified?
$lo_settings = ilLOSettings::getInstanceByObjId($course_obj_id);
$is_i = ($lo_settings->getInitialTest() == $test_ref_id);
$is_q = ($lo_settings->getQualifiedTest() == $test_ref_id);
// remove objective results data
require_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
ilLOUserResults::deleteResultsFromLP($course_obj_id, $a_user_ids, $is_i, $is_q);
// refresh LP - see ilLPStatusWrapper::_updateStatus()
require_once "Services/Tracking/classes/class.ilLPStatusFactory.php";
$lp_status = ilLPStatusFactory::_getInstance($course_obj_id);
if (strtolower(get_class($lp_status)) != "illpstatus")
{
foreach($a_user_ids as $user_id)
{
$lp_status->_updateStatus($course_obj_id, $user_id);
}
}
}
}
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: