33include_once 
'./Services/Tracking/classes/class.ilLPStatus.php';
 
   53        $ilBench->start(
'LearningProgress', 
'9182_LPStatusTestPassed_inProgress');
 
   55        $ilBench->stop(
'LearningProgress', 
'9182_LPStatusTestPassed_inProgress');
 
   66        $ilBench->start(
'LearningProgress', 
'9183_LPStatusTestPassed_completed');
 
   68        $ilBench->stop(
'LearningProgress', 
'9183_LPStatusTestPassed_completed');
 
   89        foreach ($status_info[
'results'] as $user_data) {
 
   90            if ($user_data[$resultArrayStatus]) {
 
   91                $user_ids[] = $user_data[
'user_id'];
 
  100        include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
  144        require_once 
'Modules/Test/classes/class.ilObjTestAccess.php';
 
  146                        SELECT tst_active.active_id, tst_active.tries, count(tst_sequence.active_fi) " . 
$ilDB->quoteIdentifier(
"sequences") . 
", tst_active.last_finished_pass, 
  148                                        (tst_tests.nr_of_tries - 1) = tst_active.last_finished_pass 
  153                        LEFT JOIN tst_sequence 
  154                        ON tst_sequence.active_fi = tst_active.active_id 
  156                        ON tst_tests.test_id = tst_active.test_fi 
  157                        WHERE tst_active.user_fi = {$ilDB->quote($a_user_id, "integer
")} 
  158                        AND tst_active.test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id))} 
  159                        GROUP BY tst_active.active_id, tst_active.tries, is_last_pass 
  163            if ($rec[
'sequences'] > 0) {
 
  164                require_once 
'Modules/Test/classes/class.ilObjTest.php';
 
  166                $test_obj = 
new ilObjTest($a_obj_id, 
false);
 
  170                    $is_finished = 
false;
 
  171                    if ($rec[
'last_finished_pass'] != 
null && $rec[
'sequences'] - 1 == $rec[
'last_finished_pass']) {
 
  178                    if ($rec[
'last_finished_pass'] != 
null) {
 
  182                    if (!$rec[
'is_last_pass'] && $status == self::LP_STATUS_FAILED_NUM) {
 
  237        $set = 
$ilDB->query(
"SELECT tst_result_cache.*, tst_active.user_fi FROM " .
 
  238                     "tst_result_cache JOIN tst_active ON (tst_active.active_id = tst_result_cache.active_fi)" .
 
  239                     " JOIN tst_tests ON (tst_tests.test_id = tst_active.test_fi) " .
 
  240                     " WHERE tst_tests.obj_fi = " . 
$ilDB->quote($a_obj_id, 
"integer") .
 
  241                     " AND tst_active.user_fi = " . 
$ilDB->quote($a_user_id, 
"integer"));
 
  243        if ($rec = 
$ilDB->fetchAssoc($set)) {
 
  244            if ($rec[
"max_points"] > 0) {
 
  245                $per = min(100, 100 / $rec[
"max_points"] * $rec[
"reached_points"]);
 
An exception for terminatinating execution or to throw for unit testing.
determinePercentage($a_obj_id, $a_user_id, $a_obj=null)
Determine percentage.
static _getInProgress($a_obj_id)
determineStatusForScoreLastPassTests($is_finished, $passed)
static getUserIdsByResultArrayStatus($objId, $resultArrayStatus)
static _getStatusInfo($a_obj_id)
static _getCompleted($a_obj_id)
static _getFailed($a_obj_id)
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
determineLpStatus($passed)
static _getNotAttempted($a_obj_id)
static _getStatusInfo($a_obj_id)
Reads informations about the object e.g test results, tlt, number of visits.
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
static _getPassedUsers($a_obj_id)
Returns an array containing the users who passed the test.
static _isPassed($user_id, $a_obj_id)
Returns TRUE if the user with the user id $user_id passed the test with the object id $a_obj_id.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
foreach($_POST as $key=> $value) $res