ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestSequenceDynamicQuestionSet Class Reference
+ Collaboration diagram for ilTestSequenceDynamicQuestionSet:

Public Member Functions

 __construct (ilDB $db, ilTestDynamicQuestionSet $questionSet, $activeId)
 Constructor.
 getActiveId ()
 setPreventCheckedQuestionsFromComingUpEnabled ($preventCheckedQuestionsFromComingUpEnabled)
 isPreventCheckedQuestionsFromComingUpEnabled ()
 loadFromDb ()
 saveToDb ()
 loadQuestions (ilObjTestDynamicQuestionSetConfig $dynamicQuestionSetConfig, ilTestDynamicQuestionSetFilterSelection $filterSelection)
 cleanupQuestions (ilTestSessionDynamicQuestionSet $testSession)
 getUpcomingQuestionId ()
 isAnsweredQuestion ($questionId)
 isPostponedQuestion ($questionId)
 isFilteredQuestion ($questionId)
 trackedQuestionExists ()
 getTrackedQuestionList ($currentQuestionId=null)
 resetTrackedQuestionList ()
 openQuestionExists ()
 getOpenQuestions ()
 getTrackedQuestionCount ()
 getCurrentPositionIndex ($questionId)
 getLastPositionIndex ()
 setQuestionUnchecked ($questionId)
 setQuestionChecked ($questionId)
 isQuestionChecked ($questionId)
 setQuestionPostponed ($questionId)
 unsetQuestionPostponed ($questionId)
 setQuestionAnsweredCorrect ($questionId)
 setQuestionAnsweredWrong ($questionId)
 hasStarted ()
 getCompleteQuestionsData ()
 getFilteredQuestionsData ()
 getUserSequenceQuestions ()

Private Member Functions

 loadQuestionTracking ()
 loadAnswerStatus ()
 loadPostponedQuestions ()
 loadCheckedQuestions ()
 saveNewlyTrackedQuestion ()
 getNewOrderIndexForQuestionTracking ()
 saveNewlyAnsweredQuestionsAnswerStatus ()
 saveNewlyPostponedQuestion ()
 removeQuestionsNotPostponedAnymore ()
 saveNewlyCheckedQuestion ()
 removeQuestionsNotCheckedAnymore ()
 fetchUpcomingQuestionId ($excludePostponedQuestions, $forceNonAnsweredQuestion)
 trackQuestion ($questionId, $answerStatus)
 fetchMostLeastPostponedQuestion ($postponedQuestions)

Private Attributes

 $db = null
 $questionSet = null
 $activeId = null
 $preventCheckedQuestionsFromComingUpEnabled
 $questionTracking = array()
 $newlyTrackedQuestion
 $newlyTrackedQuestionsStatus
 $postponedQuestions = array()
 $newlyPostponedQuestion
 $newlyPostponedQuestionsCount
 $alreadyCheckedQuestions
 $newlyCheckedQuestion
 $correctAnsweredQuestions = array()
 $wrongAnsweredQuestions = array()
 $newlyAnsweredQuestion
 $newlyAnsweredQuestionsAnswerStatus

Detailed Description

Definition at line 14 of file class.ilTestSequenceDynamicQuestionSet.php.

Constructor & Destructor Documentation

ilTestSequenceDynamicQuestionSet::__construct ( ilDB  $db,
ilTestDynamicQuestionSet  $questionSet,
  $activeId 
)

Constructor.

Parameters
ilTestDynamicQuestionSet$questionSet

Definition at line 101 of file class.ilTestSequenceDynamicQuestionSet.php.

References $activeId, $db, and $questionSet.

{
$this->db = $db;
$this->questionSet = $questionSet;
$this->activeId = $activeId;
$this->newlyTrackedQuestion = null;
$this->newlyTrackedQuestionsStatus = null;
$this->newlyPostponedQuestion = null;
$this->newlyPostponedQuestionsCount = null;
$this->newlyAnsweredQuestion = null;
$this->newlyAnsweredQuestionsAnswerStatus = null;
$this->alreadyCheckedQuestions = array();
$this->newlyCheckedQuestion = null;
$this->preventCheckedQuestionsFromComingUpEnabled = false;
}

Member Function Documentation

ilTestSequenceDynamicQuestionSet::cleanupQuestions ( ilTestSessionDynamicQuestionSet  $testSession)

Definition at line 382 of file class.ilTestSequenceDynamicQuestionSet.php.

References ilTestSessionDynamicQuestionSet\getCurrentQuestionId(), isFilteredQuestion(), and ilTestSessionDynamicQuestionSet\setCurrentQuestionId().

{
switch( true )
{
case !$this->questionSet->questionExists($testSession->getCurrentQuestionId()):
case !$this->isFilteredQuestion($testSession->getCurrentQuestionId()):
$testSession->setCurrentQuestionId(null);
}
foreach($this->postponedQuestions as $questionId)
{
if( !$this->questionSet->questionExists($questionId) )
{
unset($this->postponedQuestions[$questionId]);
}
}
foreach($this->wrongAnsweredQuestions as $questionId)
{
if( !$this->questionSet->questionExists($questionId) )
{
unset($this->wrongAnsweredQuestions[$questionId]);
}
}
foreach($this->correctAnsweredQuestions as $questionId)
{
if( !$this->questionSet->questionExists($questionId) )
{
unset($this->correctAnsweredQuestions[$questionId]);
}
}
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::fetchMostLeastPostponedQuestion (   $postponedQuestions)
private
Parameters
$postponedQuestions
Returns
int|null|string

Definition at line 705 of file class.ilTestSequenceDynamicQuestionSet.php.

References $postponedQuestions.

Referenced by fetchUpcomingQuestionId().

{
$minPostponeCount = null;
$minPostponeItem = null;
foreach(array_reverse($postponedQuestions, true) as $qId => $postponeCount)
{
if($minPostponeCount === null || $postponeCount <= $minPostponeCount)
{
$minPostponeCount = $postponeCount;
$minPostponeItem = $qId;
}
}
return $minPostponeItem;
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::fetchUpcomingQuestionId (   $excludePostponedQuestions,
  $forceNonAnsweredQuestion 
)
private

Definition at line 436 of file class.ilTestSequenceDynamicQuestionSet.php.

References $postponedQuestions, fetchMostLeastPostponedQuestion(), isPreventCheckedQuestionsFromComingUpEnabled(), and isQuestionChecked().

Referenced by getUpcomingQuestionId().

{
foreach($this->questionSet->getActualQuestionSequence() as $level => $questions)
{
foreach($questions as $pos => $qId)
{
if( isset($this->correctAnsweredQuestions[$qId]) )
{
continue;
}
{
continue;
}
if( $forceNonAnsweredQuestion && isset($this->wrongAnsweredQuestions[$qId]) )
{
continue;
}
if( isset($this->postponedQuestions[$qId]) )
{
$postponedQuestions[$qId] = $this->postponedQuestions[$qId];
continue;
}
return $qId;
}
if( !$excludePostponedQuestions && count($postponedQuestions) )
{
}
}
return null;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::getCompleteQuestionsData ( )

Definition at line 675 of file class.ilTestSequenceDynamicQuestionSet.php.

{
return $this->questionSet->getCompleteQuestionList()->getQuestionDataArray();
}
ilTestSequenceDynamicQuestionSet::getCurrentPositionIndex (   $questionId)

Definition at line 559 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$i = 0;
foreach($this->questionSet->getActualQuestionSequence() as $level => $questions)
{
foreach($questions as $pos => $qId)
{
$i++;
if($qId == $questionId)
{
return $i;
}
}
}
return null;
}
ilTestSequenceDynamicQuestionSet::getFilteredQuestionsData ( )

Definition at line 680 of file class.ilTestSequenceDynamicQuestionSet.php.

{
return $this->questionSet->getFilteredQuestionList()->getQuestionDataArray();
}
ilTestSequenceDynamicQuestionSet::getLastPositionIndex ( )

Definition at line 579 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$count = 0;
foreach($this->questionSet->getActualQuestionSequence() as $level => $questions)
{
$count += count($questions);
}
return $count;
}
ilTestSequenceDynamicQuestionSet::getNewOrderIndexForQuestionTracking ( )
private

Definition at line 270 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, $res, $row, and getActiveId().

Referenced by saveNewlyTrackedQuestion().

{
$query = "
SELECT (MAX(orderindex) + 1) new_order_index
FROM tst_seq_qst_tracking
WHERE active_fi = %s
AND pass = %s
";
$res = $this->db->queryF($query, array('integer','integer'), array($this->getActiveId(), 0));
$row = $this->db->fetchAssoc($res);
if( $row['new_order_index'] )
{
return $row['new_order_index'];
}
return 1;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::getOpenQuestions ( )

Definition at line 538 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by openQuestionExists().

{
$completeQuestionIds = array_keys( $this->questionSet->getAllQuestionsData() );
$openQuestions = array_diff($completeQuestionIds, $this->correctAnsweredQuestions);
return $openQuestions;
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::getTrackedQuestionCount ( )

Definition at line 547 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$uniqueQuestions = array();
foreach($this->questionTracking as $trackedQuestion)
{
$uniqueQuestions[$trackedQuestion['qid']] = $trackedQuestion['qid'];
}
return count($uniqueQuestions);
}
ilTestSequenceDynamicQuestionSet::getTrackedQuestionList (   $currentQuestionId = null)

Definition at line 508 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$questionList = array();
if( $currentQuestionId )
{
$questionList[$currentQuestionId] = $this->questionSet->getQuestionData($currentQuestionId);
}
foreach( array_reverse($this->questionTracking) as $trackedQuestion)
{
if( !isset($questionList[ $trackedQuestion['qid'] ]) )
{
$questionList[ $trackedQuestion['qid'] ] = $this->questionSet->getQuestionData($trackedQuestion['qid']);
}
}
return $questionList;
}
ilTestSequenceDynamicQuestionSet::getUpcomingQuestionId ( )

Definition at line 419 of file class.ilTestSequenceDynamicQuestionSet.php.

References fetchUpcomingQuestionId().

{
if( $questionId = $this->fetchUpcomingQuestionId(true, true) )
return $questionId;
if( $questionId = $this->fetchUpcomingQuestionId(true, false) )
return $questionId;
if( $questionId = $this->fetchUpcomingQuestionId(false, true) )
return $questionId;
if( $questionId = $this->fetchUpcomingQuestionId(false, false) )
return $questionId;
return null;
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::getUserSequenceQuestions ( )

Definition at line 687 of file class.ilTestSequenceDynamicQuestionSet.php.

{
//return array_keys( $this->getTrackedQuestionList() );
$questionSequence = array();
foreach( $this->questionSet->getActualQuestionSequence() as $level => $questions )
{
$questionSequence = array_merge($questionSequence, $questions);
}
return $questionSequence;
}
ilTestSequenceDynamicQuestionSet::hasStarted ( )

Definition at line 668 of file class.ilTestSequenceDynamicQuestionSet.php.

References trackedQuestionExists().

{
return $this->trackedQuestionExists();
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::isAnsweredQuestion (   $questionId)

Definition at line 477 of file class.ilTestSequenceDynamicQuestionSet.php.

{
return (
isset($this->correctAnsweredQuestions[$questionId])
|| isset($this->wrongAnsweredQuestions[$questionId])
);
}
ilTestSequenceDynamicQuestionSet::isFilteredQuestion (   $questionId)

Definition at line 490 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by cleanupQuestions().

{
foreach($this->questionSet->getActualQuestionSequence() as $level => $questions)
{
if( in_array($questionId, $questions) )
{
return true;
}
}
return false;
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::isPostponedQuestion (   $questionId)

Definition at line 485 of file class.ilTestSequenceDynamicQuestionSet.php.

{
return isset($this->postponedQuestions[$questionId]);
}
ilTestSequenceDynamicQuestionSet::isPreventCheckedQuestionsFromComingUpEnabled ( )

Definition at line 132 of file class.ilTestSequenceDynamicQuestionSet.php.

References $preventCheckedQuestionsFromComingUpEnabled.

Referenced by fetchUpcomingQuestionId().

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::isQuestionChecked (   $questionId)

Definition at line 604 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by fetchUpcomingQuestionId().

{
return isset($this->alreadyCheckedQuestions[$questionId]);
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::loadAnswerStatus ( )
private

Definition at line 168 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, $res, and $row.

Referenced by loadFromDb().

{
$query = "
SELECT question_fi, correctness
FROM tst_seq_qst_answstatus
WHERE active_fi = %s
AND pass = %s
";
$res = $this->db->queryF($query, array('integer','integer'), array($this->activeId, 0));
$this->correctAnsweredQuestions = array();
$this->wrongAnsweredQuestions = array();
while( $row = $this->db->fetchAssoc($res) )
{
if( $row['correctness'] )
{
$this->correctAnsweredQuestions[ $row['question_fi'] ] = $row['question_fi'];
}
else
{
$this->wrongAnsweredQuestions[ $row['question_fi'] ] = $row['question_fi'];
}
}
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::loadCheckedQuestions ( )
private

Definition at line 214 of file class.ilTestSequenceDynamicQuestionSet.php.

References $res, $row, and getActiveId().

Referenced by loadFromDb().

{
$res = $this->db->queryF("SELECT question_fi FROM tst_seq_qst_checked WHERE active_fi = %s AND pass = %s",
array('integer','integer'), array($this->getActiveId(), 0)
);
while( $row = $this->db->fetchAssoc($res) )
{
$this->alreadyCheckedQuestions[ $row['question_fi'] ] = $row['question_fi'];
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::loadFromDb ( )

Definition at line 137 of file class.ilTestSequenceDynamicQuestionSet.php.

References loadAnswerStatus(), loadCheckedQuestions(), loadPostponedQuestions(), and loadQuestionTracking().

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::loadPostponedQuestions ( )
private

Definition at line 195 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, $res, and $row.

Referenced by loadFromDb().

{
$query = "
SELECT question_fi, cnt
FROM tst_seq_qst_postponed
WHERE active_fi = %s
AND pass = %s
";
$res = $this->db->queryF($query, array('integer','integer'), array($this->activeId, 0));
$this->postponedQuestions = array();
while( $row = $this->db->fetchAssoc($res) )
{
$this->postponedQuestions[ $row['question_fi'] ] = $row['cnt'];
}
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::loadQuestions ( ilObjTestDynamicQuestionSetConfig  $dynamicQuestionSetConfig,
ilTestDynamicQuestionSetFilterSelection  $filterSelection 
)

Definition at line 369 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$this->questionSet->load($dynamicQuestionSetConfig, $filterSelection);
// echo "<table><tr>";
// echo "<td width='200'><pre>".print_r($this->questionSet->getActualQuestionSequence(), 1)."</pre></td>";
// echo "<td width='200'><pre>".print_r($this->correctAnsweredQuestions, 1)."</pre></td>";
// echo "<td width='200'><pre>".print_r($this->wrongAnsweredQuestions, 1)."</pre></td>";
// echo "</tr></table>";
}
ilTestSequenceDynamicQuestionSet::loadQuestionTracking ( )
private

Definition at line 145 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, $res, and $row.

Referenced by loadFromDb().

{
$query = "
SELECT question_fi, status
FROM tst_seq_qst_tracking
WHERE active_fi = %s
AND pass = %s
ORDER BY orderindex ASC
";
$res = $this->db->queryF($query, array('integer','integer'), array($this->activeId, 0));
$this->questionTracking = array();
while( $row = $this->db->fetchAssoc($res) )
{
$this->questionTracking[] = array(
'qid' => $row['question_fi'],
'status' => $row['status']
);
}
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::openQuestionExists ( )

Definition at line 533 of file class.ilTestSequenceDynamicQuestionSet.php.

References getOpenQuestions().

{
return count($this->getOpenQuestions()) > 0;
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::removeQuestionsNotCheckedAnymore ( )
private

Definition at line 351 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, and getActiveId().

Referenced by saveToDb().

{
$NOT_IN_checkedQuestions = $this->db->in('question_fi', $this->alreadyCheckedQuestions, true, 'integer');
// BEGIN: FIX IN QUERY
if($NOT_IN_checkedQuestions == ' 1=2 ') $NOT_IN_checkedQuestions = ' 1=1 ';
// END: FIX IN QUERY
$query = "
DELETE FROM tst_seq_qst_checked
WHERE active_fi = %s
AND pass = %s
AND $NOT_IN_checkedQuestions
";
$this->db->manipulateF($query, array('integer', 'integer'), array((int)$this->getActiveId(), 0));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::removeQuestionsNotPostponedAnymore ( )
private

Definition at line 325 of file class.ilTestSequenceDynamicQuestionSet.php.

References $query, and getActiveId().

Referenced by saveToDb().

{
$INquestions = $this->db->in('question_fi', array_keys($this->postponedQuestions), true, 'integer');
$query = "
DELETE FROM tst_seq_qst_postponed
WHERE active_fi = %s
AND pass = %s
AND $INquestions
";
$this->db->manipulateF($query, array('integer','integer'), array($this->getActiveId(), 0));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::resetTrackedQuestionList ( )

Definition at line 528 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$this->questionTracking = array();
}
ilTestSequenceDynamicQuestionSet::saveNewlyAnsweredQuestionsAnswerStatus ( )
private

Definition at line 291 of file class.ilTestSequenceDynamicQuestionSet.php.

References getActiveId().

Referenced by saveToDb().

{
if( (int)$this->newlyAnsweredQuestion )
{
$this->db->replace('tst_seq_qst_answstatus',
array(
'active_fi' => array('integer', (int)$this->getActiveId()),
'pass' => array('integer', 0),
'question_fi' => array('integer', (int)$this->newlyAnsweredQuestion)
),
array(
'correctness' => array('integer', (int)$this->newlyAnsweredQuestionsAnswerStatus)
)
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::saveNewlyCheckedQuestion ( )
private

Definition at line 339 of file class.ilTestSequenceDynamicQuestionSet.php.

References getActiveId().

Referenced by saveToDb().

{
if( (int)$this->newlyCheckedQuestion )
{
$this->db->replace('tst_seq_qst_checked', array(
'active_fi' => array('integer', (int)$this->getActiveId()),
'pass' => array('integer', 0),
'question_fi' => array('integer', (int)$this->newlyCheckedQuestion)
), array());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::saveNewlyPostponedQuestion ( )
private

Definition at line 308 of file class.ilTestSequenceDynamicQuestionSet.php.

References getActiveId().

Referenced by saveToDb().

{
if( (int)$this->newlyPostponedQuestion )
{
$this->db->replace('tst_seq_qst_postponed',
array(
'active_fi' => array('integer', (int)$this->getActiveId()),
'pass' => array('integer', 0),
'question_fi' => array('integer', (int)$this->newlyPostponedQuestion)
),
array(
'cnt' => array('integer', (int)$this->newlyPostponedQuestionsCount)
)
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::saveNewlyTrackedQuestion ( )
private

Definition at line 250 of file class.ilTestSequenceDynamicQuestionSet.php.

References getActiveId(), and getNewOrderIndexForQuestionTracking().

Referenced by saveToDb().

{
if( (int)$this->newlyTrackedQuestion )
{
$newOrderIndex = $this->getNewOrderIndexForQuestionTracking();
$this->db->replace('tst_seq_qst_tracking',
array(
'active_fi' => array('integer', (int)$this->getActiveId()),
'pass' => array('integer', 0),
'question_fi' => array('integer', (int)$this->newlyTrackedQuestion)
),
array(
'status' => array('text', $this->newlyTrackedQuestionsStatus),
'orderindex' => array('integer', $newOrderIndex)
)
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::saveToDb ( )

Definition at line 226 of file class.ilTestSequenceDynamicQuestionSet.php.

References getActiveId(), removeQuestionsNotCheckedAnymore(), removeQuestionsNotPostponedAnymore(), saveNewlyAnsweredQuestionsAnswerStatus(), saveNewlyCheckedQuestion(), saveNewlyPostponedQuestion(), and saveNewlyTrackedQuestion().

{
$this->db->manipulateF(
"DELETE FROM tst_sequence WHERE active_fi = %s AND pass = %s",
array('integer','integer'), array($this->getActiveId(), 0)
);
$this->db->insert('tst_sequence', array(
'active_fi' => array('integer', $this->getActiveId()),
'pass' => array('integer', 0),
'sequence' => array('clob', null),
'postponed' => array('text', null),
'hidden' => array('text', null),
'tstamp' => array('integer', time())
));
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::setPreventCheckedQuestionsFromComingUpEnabled (   $preventCheckedQuestionsFromComingUpEnabled)

Definition at line 127 of file class.ilTestSequenceDynamicQuestionSet.php.

References $preventCheckedQuestionsFromComingUpEnabled.

{
$this->preventCheckedQuestionsFromComingUpEnabled = $preventCheckedQuestionsFromComingUpEnabled;
}
ilTestSequenceDynamicQuestionSet::setQuestionAnsweredCorrect (   $questionId)

Definition at line 630 of file class.ilTestSequenceDynamicQuestionSet.php.

References trackQuestion().

{
$this->trackQuestion($questionId, 'correct');
$this->correctAnsweredQuestions[$questionId] = $questionId;
if( isset($this->wrongAnsweredQuestions[$questionId]) )
unset($this->wrongAnsweredQuestions[$questionId]);
$this->newlyAnsweredQuestion = $questionId;
$this->newlyAnsweredQuestionsAnswerStatus = true;
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::setQuestionAnsweredWrong (   $questionId)

Definition at line 643 of file class.ilTestSequenceDynamicQuestionSet.php.

References trackQuestion().

{
$this->trackQuestion($questionId, 'wrong');
$this->wrongAnsweredQuestions[$questionId] = $questionId;
if( isset($this->correctAnsweredQuestions[$questionId]) )
unset($this->correctAnsweredQuestions[$questionId]);
$this->newlyAnsweredQuestion = $questionId;
$this->newlyAnsweredQuestionsAnswerStatus = false;
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::setQuestionChecked (   $questionId)

Definition at line 598 of file class.ilTestSequenceDynamicQuestionSet.php.

{
$this->newlyCheckedQuestion = $questionId;
$this->alreadyCheckedQuestions[$questionId] = $questionId;
}
ilTestSequenceDynamicQuestionSet::setQuestionPostponed (   $questionId)

Definition at line 609 of file class.ilTestSequenceDynamicQuestionSet.php.

References trackQuestion().

{
$this->trackQuestion($questionId, 'postponed');
if( !isset($this->postponedQuestions[$questionId]) )
{
$this->postponedQuestions[$questionId] = 0;
}
$this->postponedQuestions[$questionId]++;
$this->newlyPostponedQuestion = $questionId;
$this->newlyPostponedQuestionsCount = $this->postponedQuestions[$questionId];
}

+ Here is the call graph for this function:

ilTestSequenceDynamicQuestionSet::setQuestionUnchecked (   $questionId)

Definition at line 593 of file class.ilTestSequenceDynamicQuestionSet.php.

{
unset($this->alreadyCheckedQuestions[$questionId]);
}
ilTestSequenceDynamicQuestionSet::trackedQuestionExists ( )

Definition at line 503 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by hasStarted().

{
return (bool)count($this->questionTracking);
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::trackQuestion (   $questionId,
  $answerStatus 
)
private

Definition at line 656 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by setQuestionAnsweredCorrect(), setQuestionAnsweredWrong(), and setQuestionPostponed().

{
$this->questionTracking[] = array(
'qid' => $questionId, 'status' => $answerStatus
);
$this->newlyTrackedQuestion = $questionId;
$this->newlyTrackedQuestionsStatus = $answerStatus;
}

+ Here is the caller graph for this function:

ilTestSequenceDynamicQuestionSet::unsetQuestionPostponed (   $questionId)

Definition at line 624 of file class.ilTestSequenceDynamicQuestionSet.php.

{
if( isset($this->postponedQuestions[$questionId]) )
unset($this->postponedQuestions[$questionId]);
}

Field Documentation

ilTestSequenceDynamicQuestionSet::$activeId = null
private

Definition at line 29 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by __construct(), and getActiveId().

ilTestSequenceDynamicQuestionSet::$alreadyCheckedQuestions
private

Definition at line 69 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$correctAnsweredQuestions = array()
private

Definition at line 79 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$db = null
private

Definition at line 19 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by __construct().

ilTestSequenceDynamicQuestionSet::$newlyAnsweredQuestion
private

Definition at line 89 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyAnsweredQuestionsAnswerStatus
private

Definition at line 94 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyCheckedQuestion
private

Definition at line 74 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyPostponedQuestion
private

Definition at line 59 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyPostponedQuestionsCount
private

Definition at line 64 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyTrackedQuestion
private

Definition at line 44 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$newlyTrackedQuestionsStatus
private

Definition at line 49 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$postponedQuestions = array()
private
ilTestSequenceDynamicQuestionSet::$preventCheckedQuestionsFromComingUpEnabled
private
ilTestSequenceDynamicQuestionSet::$questionSet = null
private

Definition at line 24 of file class.ilTestSequenceDynamicQuestionSet.php.

Referenced by __construct().

ilTestSequenceDynamicQuestionSet::$questionTracking = array()
private

Definition at line 39 of file class.ilTestSequenceDynamicQuestionSet.php.

ilTestSequenceDynamicQuestionSet::$wrongAnsweredQuestions = array()
private

Definition at line 84 of file class.ilTestSequenceDynamicQuestionSet.php.


The documentation for this class was generated from the following file: