38 $this->db = $DIC->database();
39 $this->ass_id = $a_ass_id;
40 $this->user_id = $a_user_id;
47 $this->notice = $a_value;
59 $this->returned_update =
true;
61 $this->returned = $a_value;
71 $this->solved = $a_value;
81 $this->status_time = $a_value;
91 if ($a_value && $a_value != $this->sent) {
94 $this->sent = $a_value;
104 $this->sent_time = $a_value;
114 if ($a_value != $this->sent) {
117 $this->feedback = $a_value;
127 $this->feedback_time = $a_value;
137 if ($a_value != $this->status) {
139 $this->status = $a_value;
140 $this->status_update =
true;
151 if ($a_value != $this->mark) {
154 $this->mark = $a_value;
176 $set =
$ilDB->query(
"SELECT * FROM exc_mem_ass_status" .
177 " WHERE ass_id = " .
$ilDB->quote($this->ass_id,
"integer") .
178 " AND usr_id = " .
$ilDB->quote($this->user_id,
"integer"));
179 if (
$ilDB->numRows($set)) {
183 $this->notice =
$row[
"notice"];
184 $this->returned =
$row[
"returned"];
185 $this->solved =
$row[
"solved"];
186 $this->status_time =
$row[
"status_time"];
187 $this->sent =
$row[
"sent"];
188 $this->sent_time =
$row[
"sent_time"];
189 $this->feedback_time =
$row[
"feedback_time"];
190 $this->feedback =
$row[
"feedback"];
191 $this->status =
$row[
"status"];
192 $this->mark =
$row[
"mark"];
194 $this->db_exists =
true;
220 "ass_id" =>
array(
"integer", $this->ass_id)
221 ,
"usr_id" =>
array(
"integer", $this->user_id)
224 if (!$this->db_exists) {
225 $fields = array_merge(
$keys, $fields);
226 $ilDB->insert(
"exc_mem_ass_status", $fields);
228 $ilDB->update(
"exc_mem_ass_status", $fields,
$keys);
231 if ($this->returned_update) {
234 if ($this->status_update) {
244 $set =
$ilDB->query(
"SELECT fb_cron, fb_date, fb_file" .
245 " FROM exc_assignment" .
246 " WHERE id = " .
$ilDB->quote($this->ass_id,
"integer"));
248 if (
$row[
"fb_cron"] &&
251 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
258 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
268 return "scorm/passed.svg";
271 return "scorm/failed.svg";
274 return "scorm/not_attempted.svg";
285 $ilDB = $DIC->database();
287 $q =
"SELECT count(*) AS cnt" .
288 " FROM exc_mem_ass_status" .
289 " WHERE NOT sent_time IS NULL" .
290 " AND ass_id = " .
$ilDB->quote($a_ass_id,
"integer");
291 $set =
$ilDB->query($q);
292 $rec =
$ilDB->fetchAssoc($set);
293 return ($rec[
"cnt"] > 0);
Exercise assignment member status.
setFeedbackTime($a_value)
const FEEDBACK_DATE_SUBMISSION
static sendFeedbackNotifications($a_ass_id, $a_user_id=null)
static now()
Return current timestamp in Y-m-d H:i:s format.
static lookupAnyExerciseSent($a_ass_id)
Check whether exercise has been sent to any student per mail.
__construct($a_ass_id, $a_user_id)
Create styles array
The data for the language used.
updateUserStatus($a_user_id=0)
Update exercise status of user.