5 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
33 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
36 SELECT active_id, user_fi, COUNT(tst_sequence.active_fi) sequences 38 LEFT JOIN tst_sequence 39 ON tst_sequence.active_fi = tst_active.active_id 40 WHERE tries = {$ilDB->quote(0, "integer
")} 41 AND test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id), "integer
")} 42 GROUP BY active_id, user_fi 43 HAVING COUNT(tst_sequence.active_fi) > {$ilDB->quote(0, "integer
")} 51 $user_ids[$row->user_fi] = $row->user_fi;
54 return array_values($user_ids);
64 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
67 SELECT active_id, user_fi, COUNT(tst_sequence.active_fi) sequences 69 LEFT JOIN tst_sequence 70 ON tst_sequence.active_fi = tst_active.active_id 71 WHERE tries > {$ilDB->quote(0, "integer
")} 72 AND test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id))} 73 GROUP BY active_id, user_fi 74 HAVING COUNT(tst_sequence.active_fi) > {$ilDB->quote(0, "integer
")} 82 $user_ids[$row->user_fi] = $row->user_fi;
85 return array_values($user_ids);
94 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
97 SELECT active_id, user_fi, COUNT(tst_sequence.active_fi) sequences 99 LEFT JOIN tst_sequence 100 ON tst_sequence.active_fi = tst_active.active_id 101 WHERE test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id))} 102 GROUP BY active_id, user_fi 103 HAVING COUNT(tst_sequence.active_fi) = {$ilDB->quote(0, "integer
")} 111 $user_ids[$row->user_fi] = $row->user_fi;
114 return array_values($user_ids);
127 $ilDB = $DIC[
'ilDB'];
129 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
131 $res =
$ilDB->query(
"SELECT DISTINCT user_fi FROM tst_active" .
136 $user_ids[] = $rec[
"user_fi"];
154 $ilDB = $DIC[
'ilDB'];
156 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
159 SELECT active_id, user_fi, tries, COUNT(tst_sequence.active_fi) sequences 161 LEFT JOIN tst_sequence 162 ON tst_sequence.active_fi = tst_active.active_id 163 WHERE user_fi = {$ilDB->quote($a_user_id, "integer
")} 164 AND test_fi = {$ilDB->quote(ilObjTestAccess::_getTestIDFromObjectID($a_obj_id))} 165 GROUP BY active_id, user_fi, tries 168 $status = self::LP_STATUS_NOT_ATTEMPTED_NUM;
171 if ($rec[
'sequences'] > 0) {
172 $status = self::LP_STATUS_IN_PROGRESS_NUM;
174 if ($rec[
'tries'] > 0) {
175 $status = self::LP_STATUS_COMPLETED_NUM;
static _getNotAttempted($a_obj_id)
static _getInProgress($a_obj_id)
foreach($_POST as $key=> $value) $res
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
static _getTestIDFromObjectID($object_id)
Returns the ILIAS test id for a given object id.
static getParticipants($a_obj_id)
Get participants.
static _getCompleted($a_obj_id)
__construct(Container $dic, ilPlugin $plugin)