|
| __construct ($a_obj_id) |
|
| determineStatus ($a_obj_id, $a_user_id, $a_obj=null) |
| Determine status. More...
|
|
| determinePercentage ($a_obj_id, $a_user_id, $a_obj=null) |
| Determine percentage. More...
|
|
| __construct ($a_obj_id) |
|
| _updateStatus ($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false) |
| New status handling (st: status, nr: accesses, p: percentage, t: time spent, m: mark) More...
|
|
| determinePercentage ($a_obj_id, $a_usr_id, $a_obj=null) |
| Determine percentage. More...
|
|
| determineStatus ($a_obj_id, $a_usr_id, $a_obj=null) |
| Determine status. More...
|
|
| refreshStatus ($a_obj_id, $a_users=null) |
| Refresh status. More...
|
|
|
static | _getInProgress ($a_obj_id) |
|
static | _getCompleted ($a_obj_id) |
|
static | _getNotAttempted ($a_obj_id) |
|
static | _getFailed ($a_obj_id) |
|
static | _getStatusInfo ($a_obj_id) |
|
static | _getCountNotAttempted ($a_obj_id) |
|
static | _getNotAttempted ($a_obj_id) |
|
static | _getCountInProgress ($a_obj_id) |
|
static | _getInProgress ($a_obj_id) |
|
static | _getCountCompleted ($a_obj_id) |
|
static | _getCompleted ($a_obj_id) |
|
static | _getFailed ($a_obj_id) |
|
static | _getCountFailed () |
|
static | _getStatusInfo ($a_obj_id) |
|
static | _getTypicalLearningTime ($a_obj_id) |
|
static | checkStatusForObject ($a_obj_id, $a_users=false) |
| This function checks whether the status for a given number of users is dirty and must be recalculated. More...
|
|
static | writeStatus ($a_obj_id, $a_user_id, $a_status, $a_percentage=false, $a_force_per=false) |
| Write status for user and object. More...
|
|
static | setInProgressIfNotAttempted ($a_obj_id, $a_user_id) |
| This function shoudl be clalled for normal "read events". More...
|
|
static | setAllDirty () |
| Sets all status to dirty. More...
|
|
static | setDirty ($a_obj_id) |
| Sets status of an object to dirty. More...
|
|
static | _lookupStatus ($a_obj_id, $a_user_id, $a_create=true) |
| Lookup status. More...
|
|
static | _lookupPercentage ($a_obj_id, $a_user_id) |
| Lookup percentage. More...
|
|
static | _hasUserCompleted ($a_obj_id, $a_user_id) |
| Lookup user object completion. More...
|
|
static | _lookupStatusChanged ($a_obj_id, $a_user_id) |
| Lookup status changed. More...
|
|
static | _lookupCompletedForObject ($a_obj_id, $a_user_ids=null) |
| Get completed users for object. More...
|
|
static | _lookupFailedForObject ($a_obj_id, $a_user_ids=null) |
| Get failed users for object. More...
|
|
static | _lookupInProgressForObject ($a_obj_id, $a_user_ids=null) |
| Get in progress users for object. More...
|
|
static | preloadListGUIData ($a_obj_ids) |
|
static | getListGUIStatus ($a_obj_id) |
|
ilLPStatusTestPassed::determineStatus |
( |
|
$a_obj_id, |
|
|
|
$a_user_id, |
|
|
|
$a_obj = null |
|
) |
| |
Determine status.
Behaviour of "old" 4.0 learning progress:
Setting "Multiple Pass Scoring": Score the last pass
- Test not started: No entry
- First question opened: Icon/Text: Failed, Score 0%
- First question answered (correct, points enough for passing): Icon/Text: Completed, Score 66%
- No change after successfully finishing the pass. (100%)
- 2nd Pass, first question opened: Still Completed/Completed
- First question answered (incorrect, success possible): Icon/Text Failed, Score 33%
- Second question answered (correct): Icon/Text completed
- 3rd pass, like 2nd, but two times wrong answer: Icon/Text: Failed
Setting "Multiple Pass Scoring": Score the best pass
- Test not started: No entry
- First question opened: Icon/Text: Failed, Score 0%
- First question answered (correct, points enough for passing): Icon/Text: Completed, Score 66%
- No change after successfully finishing the pass. (100%)
- 2nd Pass, first question opened: Still Completed/Completed
- First question answered (incorrect, success possible): Still Completed/Completed
Due to this behaviour in 4.0 we do not have a "in progress" status. During the test the status is "failed" unless the score is enough to pass the test, which makes the learning progress status "completed".
- Parameters
-
integer | object id |
integer | user id |
object | object (optional depends on object type) |
- Returns
- integer status
Definition at line 134 of file class.ilLPStatusTestPassed.php.
References $ilDB, $res, ilObjTestAccess\_isPassed(), determineLpStatus(), determineStatusForScoreLastPassTests(), SCORE_BEST_PASS, and SCORE_LAST_PASS.
138 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
139 require_once
'Modules/Test/classes/class.ilObjTestAccess.php';
140 $res = $ilDB->query(
" 141 SELECT tst_active.active_id, tst_active.tries, count(tst_sequence.active_fi) " . $ilDB->quoteIdentifier(
"sequences") .
", tst_active.last_finished_pass, 143 (tst_tests.nr_of_tries - 1) = tst_active.last_finished_pass 148 LEFT JOIN tst_sequence 149 ON tst_sequence.active_fi = tst_active.active_id 151 ON tst_tests.test_id = tst_active.test_fi 152 WHERE tst_active.user_fi = {$ilDB->quote($a_user_id, "integer
")} 153 AND tst_active.test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id))} 154 GROUP BY tst_active.active_id, tst_active.tries, is_last_pass 157 if ($rec = $ilDB->fetchAssoc(
$res))
159 if( $rec[
'sequences'] > 0 )
161 require_once
'Modules/Test/classes/class.ilObjTest.php';
163 $test_obj =
new ilObjTest($a_obj_id,
false);
168 $is_finished =
false;
169 if($rec[
'last_finished_pass'] != null && $rec[
'sequences'] - 1 == $rec[
'last_finished_pass'])
177 $status = self::LP_STATUS_IN_PROGRESS_NUM;
179 if($rec[
'last_finished_pass'] != null)
184 if( !$rec[
'is_last_pass'] && $status == self::LP_STATUS_FAILED_NUM )
186 $status = self::LP_STATUS_IN_PROGRESS_NUM;
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...
determineLpStatus($passed)
determineStatusForScoreLastPassTests($is_finished, $passed)