65 return array(
'questionTitles',
'participants',
'statistics',
'arrFilter',
'datasets',
'test');
75 $this->participants = array();
76 $this->questionTitles = array();
120 SELECT usr_data.usr_id, 127 FROM tst_pass_result, tst_active 129 ON tst_active.user_fi = usr_data.usr_id 130 WHERE tst_active.active_id = tst_pass_result.active_fi 131 AND tst_active.test_fi = %s 132 ORDER BY usr_data.lastname, 134 tst_pass_result.active_fi, 135 tst_pass_result.pass, 136 tst_pass_result.tstamp 139 $result = $DIC->database()->queryF(
142 array($this->
getTest()->getTestId())
147 while (
$row = $DIC->database()->fetchAssoc(
$result)) {
160 include_once
"./Modules/Test/classes/class.ilTestEvaluationPassData.php";
161 include_once
"./Modules/Test/classes/class.ilTestEvaluationUserData.php";
163 $this->participants = array();
178 $this->
getTest()->buildName($row[
"usr_id"], $row[
"firstname"], $row[
"lastname"], $row[
"title"])
181 $this->
getParticipant($row[
"active_fi"])->setLogin($row[
"login"]);
183 $this->
getParticipant($row[
"active_fi"])->setUserID($row[
"usr_id"]);
185 $this->
getParticipant($row[
"active_fi"])->setSubmitted($row[
'submitted']);
188 if (!is_object($this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"]))) {
190 $pass->setPass($row[
"pass"]);
194 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setReachedPoints($row[
"points"]);
195 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setObligationsAnswered($row[
"obligations_answered"]);
197 if ($row[
"questioncount"] == 0) {
199 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setMaxPoints(
$data[
'points']);
200 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setQuestionCount(
$data[
'count']);
202 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setMaxPoints($row[
"maxpoints"]);
203 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setQuestionCount($row[
"questioncount"]);
206 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setNrOfAnsweredQuestions($row[
"answeredquestions"]);
207 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setWorkingTime($row[
"workingtime"]);
208 $this->
getParticipant($row[
"active_fi"])->getPass($row[
"pass"])->setExamId((
string) $row[
"exam_id"]);
210 $this->
getParticipant($row[
'active_fi'])->getPass($row[
'pass'])->setRequestedHintsCount($row[
'hint_count']);
211 $this->
getParticipant($row[
'active_fi'])->getPass($row[
'pass'])->setDeductedHintPoints($row[
'hint_points']);
237 $this->questionTitles[$question_id] = $question_title;
247 if (array_key_exists($question_id, $this->questionTitles)) {
248 return $this->questionTitles[$question_id];
256 include_once
"./Modules/Test/classes/class.ilTestStatistics.php";
262 $finishedParticipants = 0;
264 foreach ($this->participants as $active_id => $participant) {
265 if (!$participant->isSubmitted()) {
269 $finishedParticipants++;
272 return $finishedParticipants;
277 if (is_array($this->arrFilter) && count($this->arrFilter) > 0) {
278 $filteredParticipants = array();
279 $courseids = array();
282 $ilDB = $DIC[
'ilDB'];
283 if (array_key_exists(
'group', $this->arrFilter)) {
285 $groupids = array_merge($groupids, $ids);
287 if (array_key_exists(
'course', $this->arrFilter)) {
289 $courseids = array_merge($courseids, $ids);
291 foreach ($this->participants as $active_id => $participant) {
293 if (array_key_exists(
'name', $this->arrFilter)) {
294 if (!(strpos(strtolower($participant->getName()), strtolower($this->arrFilter[
'name'])) !==
false)) {
299 if (array_key_exists(
'group', $this->arrFilter)) {
300 include_once
"./Services/Membership/classes/class.ilParticipants.php";
302 $foundfilter =
false;
303 if (count(array_intersect($groupids, $groups))) {
312 if (array_key_exists(
'course', $this->arrFilter)) {
313 include_once
"./Services/Membership/classes/class.ilParticipants.php";
315 $foundfilter =
false;
316 if (count(array_intersect($courseids, $courses))) {
325 if (array_key_exists(
'active_id', $this->arrFilter)) {
326 if ($active_id != $this->arrFilter[
'active_id']) {
332 $filteredParticipants[$active_id] = $participant;
335 return $filteredParticipants;
343 $this->arrFilter = array();
354 $this->arrFilter = array($by =>
$text);
369 $this->participants[$active_id] = $participant;
378 return $this->participants[$active_id];
383 return array_key_exists($active_id, $this->participants);
388 unset($this->participants[$active_id]);
398 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)