5include_once 
'./Services/Tracking/classes/class.ilLPStatus.php';
 
   19        include_once 
'./Services/Tracking/classes/class.ilChangeEvent.php';
 
   32        foreach (self::getVisitedPages($a_obj_id) as $user_id => $user_page_ids) {
 
   33            if (!(
bool) 
sizeof(array_diff($all_page_ids, $user_page_ids))) {
 
   64                    if (self::hasVisitedAllPages($a_obj_id, $a_user_id)) {
 
   98        return floor($user_page_ids / $all_page_ids * 100);
 
  109        if (!
sizeof($all_page_ids)) {
 
  114        return !(bool) 
sizeof(array_diff($all_page_ids, $user_page_ids));
 
  125        include_once 
"Services/COPage/classes/class.ilPageObject.php";
 
  127        $set = 
$ilDB->query(
"SELECT lm_data.obj_id" .
 
  129            " JOIN lm_tree ON (lm_tree.child = lm_data.obj_id)" .
 
  130            " WHERE lm_tree.lm_id = " . 
$ilDB->quote($a_obj_id, 
"integer") .
 
  131            " AND lm_data.type = " . 
$ilDB->quote(
"pg", 
"text"));
 
  132        while ($row = 
$ilDB->fetchAssoc($set)) {
 
  135                $res[] = $row[
"obj_id"];
 
  151        if (!
sizeof($all_page_ids)) {
 
  155        $sql = 
"SELECT obj_id, usr_id" .
 
  156            " FROM lm_read_event" .
 
  157            " WHERE " . 
$ilDB->in(
"obj_id", $all_page_ids, 
"", 
"integer");
 
  160            $sql .= 
" AND usr_id = " . 
$ilDB->quote($a_user_id, 
"integer");
 
  163        $set = 
$ilDB->query($sql);
 
  164        while ($row = 
$ilDB->fetchAssoc($set)) {
 
  165            $res[$row[
"usr_id"]][] = $row[
"obj_id"];
 
An exception for terminatinating execution or to throw for unit testing.
static lookupUsersInProgress($a_obj_id)
Lookup users in progress.
static hasAccessed($a_obj_id, $a_usr_id)
Has accessed.
static getLMPages($a_obj_id)
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Determine status.
static _getInProgress($a_obj_id)
static getVisitedPages($a_obj_id, $a_user_id=null)
static _getCompleted($a_obj_id)
determinePercentage($a_obj_id, $a_user_id, $a_obj=null)
Determine percentage.
static hasVisitedAllPages($a_obj_id, $a_user_id)
static _getCompleted($a_obj_id)
Static function to read the users who have the status 'completed'.
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
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
foreach($_POST as $key=> $value) $res