52 return is_array($this->passes);
64 SELECT DISTINCT tst_pass_result.* FROM tst_pass_result 65 LEFT JOIN tst_test_result 66 ON tst_pass_result.pass = tst_test_result.pass 67 AND tst_pass_result.active_fi = tst_test_result.active_fi 68 WHERE tst_pass_result.active_fi = %s 69 ORDER BY tst_pass_result.pass 72 $res = $this->db->queryF(
78 $this->passes =
array();
80 while (
$row = $this->db->fetchAssoc(
$res)) {
94 SELECT last_finished_pass FROM tst_active WHERE active_id = %s 97 $res = $this->db->queryF(
103 while (
$row = $this->db->fetchAssoc(
$res)) {
123 return $closedPasses;
132 return $reportablePasses;
139 $reportablePasses =
array();
141 foreach ($existingPasses as
$pass) {
143 $reportablePasses[] =
$pass;
147 return $reportablePasses;
152 $closedPasses =
array();
154 foreach ($existingPasses as
$pass) {
156 $closedPasses[] =
$pass;
160 return $closedPasses;
167 foreach ($existingPasses as
$pass) {
168 if ($lastPass === null || $pass > $lastPass) {
178 switch ($this->testOBJ->getScoreReporting()) {
189 if (
$pass < $lastPass) {
202 throw new ilTestException(
'invalid object state: last finished pass was not set!');
223 $reg =
'/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/';
224 $date = $this->testOBJ->getReportingDate();
227 if (!preg_match($reg, $date, $matches)) {
231 $repTS = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
233 return time() >= $repTS;
238 if (!$this->testOBJ->getEnableProcessingTime()) {
242 $startingTime = $this->testOBJ->getStartingTimeOfUser($this->
getActiveId(),
$pass);
244 if ($startingTime ===
false) {
248 return $this->testOBJ->isMaxProcessingTimeReached($startingTime, $this->
getActiveId());
fetchClosedPasses($existingPasses)
__construct(ilDBInterface $db, ilObjTest $testOBJ)
checkLastFinishedPassInitialised()
Base Exception for all Exceptions relating to Modules/Test.
const SCORE_REPORTING_IMMIDIATLY
foreach($_POST as $key=> $value) $res
setLastFinishedPass($lastFinishedPass)
fetchReportablePasses($existingPasses)
getLastFinishedPassTimestamp()
isProcessingTimeReached($pass)
Create styles array
The data for the language used.
const SCORE_REPORTING_FINISHED
const SCORE_REPORTING_DATE
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
isReportablePass($lastPass, $pass)
fetchLastPass($existingPasses)