2require_once
'Modules/IndividualAssessment/interfaces/Members/interface.ilIndividualAssessmentMembersStorage.php';
3require_once
'Modules/IndividualAssessment/classes/Members/class.ilIndividualAssessmentMembers.php';
4require_once
'Modules/IndividualAssessment/classes/Members/class.ilIndividualAssessmentMember.php';
5require_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);
47 $sql .=
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
49 if (!is_null($filter)) {
53 if (!is_null($sort)) {
56 $res = $this->db->query($sql);
57 while ($rec = $this->db->fetchAssoc(
$res)) {
69 $obj_id = $obj->
getId();
70 $usr_id = $usr->
getId();
72 $sql .=
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer') .
"\n"
73 .
" AND iassme.usr_id = " . $this->db->quote($usr_id,
'integer');
75 $rec = $this->db->fetchAssoc($this->db->query($sql));
89 $where = array(
"obj_id" => array(
"integer", $member->
assessmentId())
90 ,
"usr_id" => array(
"integer", $member->
id())
108 $this->db->update(self::MEMBERS_TABLE,
$values, $where);
116 $sql =
"DELETE FROM " . self::MEMBERS_TABLE .
" WHERE obj_id = " . $this->db->quote($obj->
getId(),
'integer');
117 $this->db->manipulate($sql);
125 .
"iassme.examiner_id,"
127 .
"iassme.internal_note,"
129 .
"iassme.notification_ts,"
130 .
"iassme.learning_progress,"
131 .
"iassme.finalized,"
133 .
"iassme.event_time,"
134 .
"iassme.user_view_file,"
135 .
"iassme.file_name,"
136 .
"iassme.changer_id,"
137 .
"iassme.change_time,"
138 .
"usr.lastname AS user_lastname,"
139 .
"ex.login AS examiner_login"
140 .
" FROM " . self::MEMBERS_TABLE .
" iassme\n"
141 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id\n"
142 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id\n"
159 .
" ,iassme.obj_id, iassme.usr_id, iassme.examiner_id, iassme.record, iassme.internal_note, iassme.notify"
160 .
" ,iassme.notification_ts, iassme.learning_progress, iassme.finalized,iassme.place"
161 .
" ,iassme.event_time, iassme.changer_id, iassme.change_time\n"
162 .
" FROM iass_members iassme"
163 .
" JOIN usr_data usr ON iassme.usr_id = usr.usr_id"
164 .
" LEFT JOIN usr_data ex ON iassme.examiner_id = ex.usr_id"
165 .
" LEFT JOIN usr_data ud ON iassme.changer_id = ud.usr_id"
166 .
" WHERE obj_id = " . $this->db->quote($obj_id,
'integer');
174 $values = array(
"obj_id" => array(
"integer", $iass->
getId())
191 $this->db->insert(self::MEMBERS_TABLE,
$values);
199 $sql =
"DELETE FROM " . self::MEMBERS_TABLE .
"\n"
200 .
" WHERE obj_id = " . $this->db->quote($iass->
getId(),
'integer') .
"\n"
203 $this->db->manipulate($sql);
213 return " AND finalized = 0 AND examiner_id IS NULL\n";
216 return " AND finalized = 0 AND examiner_id IS NOT NULL\n";
219 return " AND finalized = 1 AND learning_progress = 2\n";
222 return " AND finalized = 1 AND learning_progress = 3\n";
229 $vals = explode(
":", $sort);
231 return " ORDER BY " . $vals[0] .
" " . $vals[1];
An exception for terminatinating execution or to throw for unit testing.
@classDescription Date and time handling
Edit the record of a user, set LP.
examinerId()
Get the user id of the examiner.
viewFile()
Can user see the uploaded file.
assessmentId()
Get the ilObjIndividualAssessment id corresponding to this membership.
finalized()
Is this membership allready finalized?
place()
Get place where ia was held.
eventTime()
Get date when ia was.
LPStatus()
Get the LP-status corresponding to this membership.
id()
Get the user id corresponding to this membership.
fileName()
Get the name of the uploaded file.
changerId()
Get the user id of the changer.
notify()
Will the user be notified after finalization?
notificationTS()
Get the timestamp, at which the notification was sent.
Member administration related logic, add and remove members, get the list of all members,...
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
For the purpose of streamlining the grading and learning-process status definition outside of tests,...
getId()
get object id @access public
foreach($_POST as $key=> $value) $res