65 return array(
'questionTitles',
'participants',
'statistics',
'arrFilter',
'datasets',
'test');
75 $this->participants = array();
76 $this->questionTitles = array();
120 SELECT usr_data.usr_id, 126 tst_active.submitted, 127 tst_active.last_finished_pass 128 FROM tst_pass_result, tst_active 130 ON tst_active.user_fi = usr_data.usr_id 131 WHERE tst_active.active_id = tst_pass_result.active_fi 132 AND tst_active.test_fi = %s 133 ORDER BY usr_data.lastname, 135 tst_pass_result.active_fi, 136 tst_pass_result.pass, 137 tst_pass_result.tstamp 140 $result = $DIC->database()->queryF(
143 array($this->
getTest()->getTestId())
148 while ($row = $DIC->database()->fetchAssoc(
$result)) {
161 include_once
"./Modules/Test/classes/class.ilTestEvaluationPassData.php";
162 include_once
"./Modules/Test/classes/class.ilTestEvaluationUserData.php";
164 $this->participants = array();
170 foreach ($this->
loadRows() as $row) {
179 $this->
getTest()->buildName($row[
"usr_id"], $row[
"firstname"], $row[
"lastname"], $row[
"title"])
182 $this->
getParticipant($row[
"active_fi"])->setLogin($row[
"login"]);
184 $this->
getParticipant($row[
"active_fi"])->setUserID($row[
"usr_id"]);
186 $this->
getParticipant($row[
"active_fi"])->setSubmitted($row[
'submitted']);
188 $this->
getParticipant($row[
"active_fi"])->setLastFinishedPass($row[
'last_finished_pass']);
191 if (!is_object($this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"]))) {
193 $pass->setPass($row[
"pass"]);
197 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setReachedPoints($row[
"points"]);
198 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setObligationsAnswered($row[
"obligations_answered"]);
200 if ($row[
"questioncount"] == 0) {
202 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setMaxPoints(
$data[
'points']);
203 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setQuestionCount(
$data[
'count']);
205 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setMaxPoints($row[
"maxpoints"]);
206 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setQuestionCount($row[
"questioncount"]);
209 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setNrOfAnsweredQuestions($row[
"answeredquestions"]);
210 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setWorkingTime($row[
"workingtime"]);
211 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setExamId((
string) $row[
"exam_id"]);
213 $this->
getParticipant($row[
'active_fi'])->getPass($row[
'pass'])->setRequestedHintsCount($row[
'hint_count']);
214 $this->
getParticipant($row[
'active_fi'])->getPass($row[
'pass'])->setDeductedHintPoints($row[
'hint_points']);
225 $this->test = &
$test;
240 $this->questionTitles[$question_id] = $question_title;
250 if (array_key_exists($question_id, $this->questionTitles)) {
251 return $this->questionTitles[$question_id];
259 include_once
"./Modules/Test/classes/class.ilTestStatistics.php";
265 $finishedParticipants = 0;
267 foreach ($this->participants as $active_id => $participant) {
268 if (!$participant->isSubmitted()) {
272 $finishedParticipants++;
275 return $finishedParticipants;
280 if (is_array($this->arrFilter) && count($this->arrFilter) > 0) {
281 $filteredParticipants = array();
282 $courseids = array();
285 $ilDB = $DIC[
'ilDB'];
286 if (array_key_exists(
'group', $this->arrFilter)) {
288 $groupids = array_merge($groupids, $ids);
290 if (array_key_exists(
'course', $this->arrFilter)) {
292 $courseids = array_merge($courseids, $ids);
294 foreach ($this->participants as $active_id => $participant) {
296 if (array_key_exists(
'name', $this->arrFilter)) {
297 if (!(strpos(strtolower($participant->getName()), strtolower($this->arrFilter[
'name'])) !==
false)) {
302 if (array_key_exists(
'group', $this->arrFilter)) {
303 include_once
"./Services/Membership/classes/class.ilParticipants.php";
305 $foundfilter =
false;
306 if (count(array_intersect($groupids, $groups))) {
315 if (array_key_exists(
'course', $this->arrFilter)) {
316 include_once
"./Services/Membership/classes/class.ilParticipants.php";
318 $foundfilter =
false;
319 if (count(array_intersect($courseids, $courses))) {
328 if (array_key_exists(
'active_id', $this->arrFilter)) {
329 if ($active_id != $this->arrFilter[
'active_id']) {
335 $filteredParticipants[$active_id] = $participant;
338 return $filteredParticipants;
346 $this->arrFilter = array();
357 $this->arrFilter = array($by => $text);
372 $this->participants[$active_id] = $participant;
381 return $this->participants[$active_id];
386 return array_key_exists($active_id, $this->participants);
391 unset($this->participants[$active_id]);
401 return array_keys($this->participants);
getTotalFinishedParticipants()
checkParticipantAccess($activeId)
$accessFilteredParticipantList
removeParticipant($active_id)
addQuestionTitle($question_id, $question_title)
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
setAccessFilteredParticipantList($accessFilteredParticipantList)
__construct(ilObjTest $test=null)
Constructor.
getAccessFilteredParticipantList()
static _getQuestionCountAndPointsForPassOfParticipant($active_id, $pass)
participantExists($active_id)
getQuestionTitle($question_id)
This class calculates statistical data for a test which has to be calculated using all participant da...
addParticipant($active_id, $participant)
static _getIdsForTitle($title, $type='', $partialmatch=false)
getParticipant($active_id)
setFilterArray($arrFilter)