3declare(strict_types=1);
41 $obj_id = $obj->
getId();
43 $res = $this->db->query($sql);
44 while ($rec = $this->db->fetchAssoc(
$res)) {
45 $members = $members->withAdditionalRecord($rec);
55 string $filter =
null,
60 $sql .=
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
62 if (!is_null($filter)) {
66 if (!is_null($sort)) {
69 $res = $this->db->query($sql);
70 while ($rec = $this->db->fetchAssoc(
$res)) {
71 $usr =
new ilObjUser((
int)$rec[
"usr_id"]);
82 $obj_id = $obj->
getId();
83 $usr_id = $usr->
getId();
84 $sql = $this->loadMemberQuery();
85 $sql .=
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer') .
"\n"
86 .
" AND iassme.usr_id = " . $this->db->quote($usr_id,
'integer');
88 $rec = $this->db->fetchAssoc($this->db->query($sql));
90 return $this->createAssessmentMember($obj, $usr, $rec);
102 if (!is_null($changer_id)) {
103 $changer_id = (
int) $changer_id;
107 if (!is_null($change_time_db)) {
108 $change_time =
new DateTimeImmutable($change_time_db);
111 if (!is_null($examiner_id)) {
112 $examiner_id = (
int) $examiner_id;
117 $this->createGrading($record, $usr->
getFullname()),
129 if (!is_null($event_time_db)) {
130 $event_time =
new DateTimeImmutable();
131 $event_time = $event_time->setTimestamp((
int) $event_time_db);
154 "usr_id" => [
"integer", $member->
id()]
158 if (!is_null($event_time)) {
159 $event_time = $event_time->getTimestamp();
178 $this->db->update(self::MEMBERS_TABLE, $values, $where);
183 return date(
"Y-m-d H:i:s");
191 $sql =
"DELETE FROM " . self::MEMBERS_TABLE .
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
192 $this->db->manipulate($sql);
200 .
"iassme.examiner_id,"
202 .
"iassme.internal_note,"
204 .
"iassme.notification_ts,"
205 .
"iassme.learning_progress,"
206 .
"iassme.finalized,"
208 .
"iassme.event_time,"
209 .
"iassme.user_view_file,"
210 .
"iassme.file_name,"
211 .
"iassme.changer_id,"
212 .
"iassme.change_time,"
213 .
"usr.login AS user_login,"
214 .
"ex.login AS examiner_login"
215 .
" FROM " . self::MEMBERS_TABLE .
" iassme\n"
216 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id\n"
217 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id\n"
231 .
" ,iassme.obj_id, iassme.usr_id, iassme.examiner_id, iassme.record, iassme.internal_note, iassme.notify"
232 .
" ,iassme.notification_ts, iassme.learning_progress, iassme.finalized,iassme.place"
233 .
" ,iassme.event_time, iassme.changer_id, iassme.change_time\n"
234 .
" FROM iass_members iassme"
235 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id"
236 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id"
237 .
" LEFT JOIN usr_data ud ON iassme.changer_id = ud.usr_id"
238 .
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer');
337 $this->db->insert(self::MEMBERS_TABLE, $values);
346 "DELETE FROM " . self::MEMBERS_TABLE . PHP_EOL
347 .
"WHERE obj_id = " . $this->db->quote($iass->
getId(),
'integer') . PHP_EOL
351 $this->db->manipulate($sql);
361 return " AND finalized = 0 AND examiner_id IS NULL\n";
363 return " AND finalized = 0 AND examiner_id IS NOT NULL\n";
365 return " AND finalized = 1 AND learning_progress = 2\n";
367 return " AND finalized = 1 AND learning_progress = 3\n";
375 $vals = explode(
":", $sort);
377 return " ORDER BY " . $vals[0] .
" " . $vals[1];
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const FIELD_INTERNAL_NOTE
const FIELD_CHANGER_LASTNAME
const FIELD_USER_VIEW_FILE
const FIELD_CHANGER_FIRSTNAME
const LP_ASSESSMENT_NOT_COMPLETED
const FIELD_EXAMINER_FIRSTNAME
const FIELD_NOTIFICATION_TS
const FIELD_LEARNING_PROGRESS
const FIELD_EXAMINER_LASTNAME
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFullname(int $a_max_strlen=0)