28 $this->adminModeEnabled =
false;
85 return $existingPasses;
90 return $reportablePasses;
96 SELECT DISTINCT tst_pass_result.pass FROM tst_pass_result 97 LEFT JOIN tst_test_result 98 ON tst_pass_result.pass = tst_test_result.pass 99 AND tst_pass_result.active_fi = tst_test_result.active_fi 100 WHERE tst_pass_result.active_fi = %s 103 $res = $this->db->queryF(
107 $existingPasses = array();
109 while(
$row = $this->db->fetchAssoc(
$res) )
111 $existingPasses[] =
$row[
'pass'];
114 return $existingPasses;
121 $reportablePasses = array();
123 foreach($existingPasses as
$pass)
127 $reportablePasses[] =
$pass;
131 return $reportablePasses;
136 $closedPasses = array();
138 foreach($existingPasses as
$pass)
142 $closedPasses[] =
$pass;
146 return $closedPasses;
153 foreach($existingPasses as
$pass)
155 if( $lastPass === null || $pass > $lastPass )
166 switch( $this->testOBJ->getScoreReporting() )
178 if(
$pass < $lastPass)
206 $reg =
'/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/';
207 $date = $this->testOBJ->getReportingDate();
210 if( !preg_match($reg, $date, $matches) )
215 $repTS = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
217 return time() >= $repTS;
222 if( !$this->testOBJ->getEnableProcessingTime() )
227 $startingTime = $this->testOBJ->getStartingTimeOfUser($this->
getActiveId(),
$pass);
229 if($startingTime === FALSE)
234 return $this->testOBJ->isMaxProcessingTimeReached($startingTime, $this->
getActiveId());
fetchClosedPasses($existingPasses)
__construct(ilDB $db, ilObjTest $testOBJ)
const SCORE_REPORTING_IMMIDIATLY
setLastFinishedPass($lastFinishedPass)
fetchReportablePasses($existingPasses)
isProcessingTimeReached($pass)
const SCORE_REPORTING_FINISHED
const SCORE_REPORTING_DATE
setAdminModeEnabled($adminModeEnabled)
isReportablePass($lastPass, $pass)
fetchLastPass($existingPasses)