ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTestEvaluation.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
12{
16 protected $db;
17
21 protected $testId;
22
29 {
30 $this->db = $db;
31 $this->testId = $testId;
32 }
33
38 public function getAllActivesPasses()
39 {
40 $query = "
41 SELECT active_fi, pass
42 FROM tst_active actives
43 INNER JOIN tst_pass_result passes
44 ON active_fi = active_id
45 WHERE test_fi = %s
46 ";
47
48 $res = $this->db->queryF($query, array('integer'), array($this->testId));
49
50 $passes = array();
51
52 while ($row = $this->db->fetchAssoc($res)) {
53 if (!isset($passes[$row['active_fi']])) {
54 $passes[$row['active_fi']] = array();
55 }
56
57 $passes[$row['active_fi']][] = $row['pass'];
58 }
59
60 return $passes;
61 }
62}
An exception for terminatinating execution or to throw for unit testing.
__construct(ilDBInterface $db, $testId)
ilTestEvaluation constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$query
foreach($_POST as $key=> $value) $res