47 $this->course_id = $crs_id;
64 if(!$crs_ref_id = $tree->checkForParentType($a_lm_ref_id,
'crs'))
70 $query =
"DELETE FROM crs_lm_history ".
71 "WHERE lm_ref_id = ".$ilDB->quote($a_lm_ref_id,
'integer').
" ".
72 "AND usr_id = ".$ilDB->quote($a_user_id,
'integer').
"";
76 $query =
"INSERT INTO crs_lm_history ".
77 "SET usr_id = ".$ilDB->quote($a_user_id,
'integer').
", ".
78 "crs_ref_id = ".$ilDB->quote($crs_ref_id,
'integer').
", ".
79 "lm_ref_id = ".$ilDB->quote($a_lm_ref_id,
'integer').
", ".
80 "lm_page_id = ".$ilDB->quote($a_page_id,
'integer').
", ".
81 "last_access = ".$ilDB->quote(time(),
'integer').
"";
90 $query =
"SELECT * FROM crs_lm_history ".
91 "WHERE usr_id = ".$ilDB->quote($this->
getUserId(),
'integer').
" ".
92 "AND crs_ref_id = ".$ilDB->quote($this->
getCourseRefId(),
'integer').
" ".
93 "ORDER BY last_access ";
98 return $row->lm_ref_id;
107 $query =
"SELECT * FROM crs_lm_history ".
108 "WHERE usr_id = ".$ilDB->quote($this->
getUserId(),
'integer').
" ".
109 "AND crs_ref_id = ".$ilDB->quote($this->
getCourseRefId(),
'integer').
"";
114 $lm[
$row->lm_ref_id][
'lm_ref_id'] =
$row->lm_ref_id;
115 $lm[
$row->lm_ref_id][
'lm_page_id'] =
$row->lm_page_id;
116 $lm[
$row->lm_ref_id][
'last_access'] =
$row->last_access;
118 return $lm ? $lm : array();
125 $query =
"DELETE FROM crs_lm_history WHERE usr_id = ".$ilDB->quote($a_usr_id,
'integer').
" ";