Public Member Functions

ilLPStatusTypicalLearningTime Class Reference

Inheritance diagram for ilLPStatusTypicalLearningTime:
Collaboration diagram for ilLPStatusTypicalLearningTime:

Public Member Functions

 ilLPStatusTypicalLearningTime ($a_obj_id)
 _getInProgress ($a_obj_id)
 _getCompleted ($a_obj_id)
 _getStatusInfo ($a_obj_id)

Detailed Description

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


Member Function Documentation

ilLPStatusTypicalLearningTime::_getCompleted ( a_obj_id  ) 

Reimplemented from ilLPStatus.

Definition at line 67 of file class.ilLPStatusTypicalLearningTime.php.

References $query, $res, $row, and _getStatusInfo().

        {
                global $ilDB;

                include_once './Services/MetaData/classes/class.ilMDEducational.php';

                $status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
                $tlt = $status_info['tlt'];
                #$tlt = ilMDEducational::_getTypicalLearningTimeSeconds($a_obj_id);
                $query = "SELECT DISTINCT(user_id) FROM ut_learning_progress ".
                        "WHERE spent_time >= '".$tlt."' ".
                        "AND obj_id = '".$a_obj_id."'";

                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $user_ids[] = $row->user_id;
                }
                return $user_ids ? $user_ids : array();
        }

Here is the call graph for this function:

ilLPStatusTypicalLearningTime::_getInProgress ( a_obj_id  ) 

Reimplemented from ilLPStatus.

Definition at line 46 of file class.ilLPStatusTypicalLearningTime.php.

References $query, $res, $row, and _getStatusInfo().

        {
                global $ilDB;

                include_once './Services/MetaData/classes/class.ilMDEducational.php';

                $status_info = ilLPStatusWrapper::_getStatusInfo($a_obj_id);
                $tlt = $status_info['tlt'];

                $query = "SELECT DISTINCT(user_id) FROM ut_learning_progress ".
                        "WHERE spent_time < '".$tlt."' ".
                        "AND obj_id = '".$a_obj_id."'";

                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $user_ids[] = $row->user_id;
                }
                return $user_ids ? $user_ids : array();
        }

Here is the call graph for this function:

ilLPStatusTypicalLearningTime::_getStatusInfo ( a_obj_id  ) 

Reimplemented from ilLPStatus.

Definition at line 88 of file class.ilLPStatusTypicalLearningTime.php.

References ilMDEducational::_getTypicalLearningTimeSeconds().

Referenced by _getCompleted(), and _getInProgress().

        {
                include_once './Services/MetaData/classes/class.ilMDEducational.php';
                $status_info['tlt'] = ilMDEducational::_getTypicalLearningTimeSeconds($a_obj_id);

                return $status_info;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilLPStatusTypicalLearningTime::ilLPStatusTypicalLearningTime ( a_obj_id  ) 

Definition at line 38 of file class.ilLPStatusTypicalLearningTime.php.

References ilLPStatus::ilLPStatus().

        {
                global $ilDB;

                parent::ilLPStatus($a_obj_id);
                $this->db =& $ilDB;
        }

Here is the call graph for this function:


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