52 return is_array($this->passes);
65 SELECT DISTINCT tst_pass_result.* FROM tst_pass_result 66 LEFT JOIN tst_test_result 67 ON tst_pass_result.pass = tst_test_result.pass 68 AND tst_pass_result.active_fi = tst_test_result.active_fi 69 WHERE tst_pass_result.active_fi = %s 70 ORDER BY tst_pass_result.pass 73 $res = $this->db->queryF(
77 $this->passes =
array();
79 while(
$row = $this->db->fetchAssoc(
$res) )
94 SELECT last_finished_pass FROM tst_active WHERE active_id = %s 97 $res = $this->db->queryF(
101 while(
$row = $this->db->fetchAssoc(
$res) )
122 return $closedPasses;
131 return $reportablePasses;
138 $reportablePasses =
array();
140 foreach($existingPasses as
$pass)
144 $reportablePasses[] =
$pass;
148 return $reportablePasses;
153 $closedPasses =
array();
155 foreach($existingPasses as
$pass)
159 $closedPasses[] =
$pass;
163 return $closedPasses;
170 foreach($existingPasses as
$pass)
172 if( $lastPass === null || $pass > $lastPass )
183 switch( $this->testOBJ->getScoreReporting() )
195 if(
$pass < $lastPass)
210 throw new ilTestException(
'invalid object state: last finished pass was not set!');
233 $reg =
'/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/';
234 $date = $this->testOBJ->getReportingDate();
237 if( !preg_match($reg, $date, $matches) )
242 $repTS = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
244 return time() >= $repTS;
249 if( !$this->testOBJ->getEnableProcessingTime() )
254 $startingTime = $this->testOBJ->getStartingTimeOfUser($this->
getActiveId(),
$pass);
256 if($startingTime === FALSE)
261 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
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)