2 require_once
'Modules/IndividualAssessment/interfaces/Members/interface.ilIndividualAssessmentMembersStorage.php';
3 require_once
'Modules/IndividualAssessment/classes/Members/class.ilIndividualAssessmentMembers.php';
4 require_once
'Modules/IndividualAssessment/classes/Members/class.ilIndividualAssessmentMember.php';
5 require_once
'Modules/IndividualAssessment/classes/class.ilObjIndividualAssessment.php';
31 $obj_id = $obj->
getId();
33 $res = $this->db->query($sql);
34 while ($rec = $this->db->fetchAssoc(
$res)) {
35 $members = $members->withAdditionalRecord($rec);
45 string $filter = null,
50 $sql .=
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
52 if (!is_null($filter)) {
56 if (!is_null($sort)) {
59 $res = $this->db->query($sql);
60 while ($rec = $this->db->fetchAssoc(
$res)) {
72 $obj_id = $obj->
getId();
73 $usr_id = $usr->
getId();
75 $sql .=
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer') .
"\n" 76 .
" AND iassme.usr_id = " . $this->db->quote($usr_id,
'integer');
78 $rec = $this->db->fetchAssoc($this->db->query($sql));
92 if (!is_null($changer_id)) {
93 $changer_id = (int) $changer_id;
97 if (!is_null($change_time_db)) {
98 $change_time =
new DateTime($change_time_db);
101 if (!is_null($examiner_id)) {
102 $examiner_id = (int) $examiner_id;
119 if (!is_null($event_time_db)) {
121 $event_time = $event_time->setTimestamp($event_time_db);
142 $where = array(
"obj_id" => array(
"integer", $member->
assessmentId())
143 ,
"usr_id" => array(
"integer", $member->
id())
146 if (!is_null($event_time)) {
147 $event_time = $event_time->getTimestamp();
166 $this->db->update(self::MEMBERS_TABLE, $values, $where);
174 $sql =
"DELETE FROM " . self::MEMBERS_TABLE .
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
175 $this->db->manipulate($sql);
183 .
"iassme.examiner_id," 185 .
"iassme.internal_note," 187 .
"iassme.notification_ts," 188 .
"iassme.learning_progress," 189 .
"iassme.finalized," 191 .
"iassme.event_time," 192 .
"iassme.user_view_file," 193 .
"iassme.file_name," 194 .
"iassme.changer_id," 195 .
"iassme.change_time," 196 .
"usr.lastname AS user_lastname," 197 .
"ex.login AS examiner_login" 198 .
" FROM " . self::MEMBERS_TABLE .
" iassme\n" 199 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id\n" 200 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id\n" 217 .
" ,iassme.obj_id, iassme.usr_id, iassme.examiner_id, iassme.record, iassme.internal_note, iassme.notify" 218 .
" ,iassme.notification_ts, iassme.learning_progress, iassme.finalized,iassme.place" 219 .
" ,iassme.event_time, iassme.changer_id, iassme.change_time\n" 220 .
" FROM iass_members iassme" 221 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id" 222 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id" 223 .
" LEFT JOIN usr_data ud ON iassme.changer_id = ud.usr_id" 224 .
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer');
232 $values = array(
"obj_id" => array(
"integer", $iass->
getId())
249 $this->db->insert(self::MEMBERS_TABLE, $values);
257 $sql =
"DELETE FROM " . self::MEMBERS_TABLE .
"\n" 258 .
" WHERE obj_id = " . $this->db->quote($iass->
getId(),
'integer') .
"\n" 261 $this->db->manipulate($sql);
271 return " AND finalized = 0 AND examiner_id IS NULL\n";
274 return " AND finalized = 0 AND examiner_id IS NOT NULL\n";
277 return " AND finalized = 1 AND learning_progress = 2\n";
280 return " AND finalized = 1 AND learning_progress = 3\n";
287 $vals = explode(
":", $sort);
289 return " ORDER BY " . $vals[0] .
" " . $vals[1];
For the purpose of streamlining the grading and learning-process status definition outside of tests...
const FIELD_INTERNAL_NOTE
const FIELD_LEARNING_PROGRESS
const FIELD_CHANGER_FIRSTNAME
const FIELD_USER_VIEW_FILE
const LP_ASSESSMENT_NOT_COMPLETED
foreach($_POST as $key=> $value) $res
getId()
get object id public
const FIELD_EXAMINER_FIRSTNAME
const FIELD_NOTIFICATION_TS
Edit the record of a user, set LP.
getFullname($a_max_strlen=0)
get fullname public
const FIELD_EXAMINER_LASTNAME
const FIELD_CHANGER_LASTNAME
Member administration related logic, add and remove members, get the list of all members, etc.