50 $ilDB = $DIC->database();
53 "SELECT status FROM il_wiki_contributor " .
54 "WHERE wiki_id = %s and user_id = %s",
55 array(
"integer",
"integer"),
56 array($a_obj_id, $a_user_id)
59 return $row[
"status"];
75 $ilDB = $DIC->database();
78 "SELECT status_time FROM il_wiki_contributor " .
79 "WHERE wiki_id = %s and user_id = %s",
80 array(
"integer",
"integer"),
81 array($a_obj_id, $a_user_id)
84 return $row[
"status_time"];
98 public static function _writeStatus($a_obj_id, $a_user_id, $a_status)
102 $ilDB = $DIC->database();
104 $ilDB->manipulate(
"DELETE FROM il_wiki_contributor WHERE " .
105 " wiki_id = " .
$ilDB->quote($a_obj_id,
"integer") .
106 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer"));
109 "INSERT INTO il_wiki_contributor (status, wiki_id, user_id, status_time) " .
110 "VALUES (%s,%s,%s,%s)",
111 array(
"integer",
"integer",
"integer",
"timestamp"),
static _writeStatus($a_obj_id, $a_user_id, $a_status)
Write success status.
static now()
Return current timestamp in Y-m-d H:i:s format.
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
static _lookupStatusTime($a_obj_id, $a_user_id)
Lookup last change in mark or success status.
Create styles array
The data for the language used.