30 if( !isset(
$_SESSION[self::SESSION_BASEINDEX]) || !is_array(
$_SESSION[self::SESSION_BASEINDEX]) )
32 $_SESSION[self::SESSION_BASEINDEX] = array();
35 $baseSession = &
$_SESSION[self::SESSION_BASEINDEX];
44 if( !isset($contextSession[self::SESSION_SUBINDEX_INSTANT_RESPONSE_ACTIVE]) )
46 $contextSession[self::SESSION_SUBINDEX_INSTANT_RESPONSE_ACTIVE] = 0;
49 if( !isset($contextSession[self::SESSION_SUBINDEX_PARTICIPANT_SOLUTION]) )
51 $contextSession[self::SESSION_SUBINDEX_PARTICIPANT_SOLUTION] = null;
67 return "u{$this->userId}::q{$this->questionId}";
82 $this->
saveSessionValue(self::SESSION_SUBINDEX_INSTANT_RESPONSE_ACTIVE, $instantResponseActive);
87 return $this->
readSessionValue(self::SESSION_SUBINDEX_INSTANT_RESPONSE_ACTIVE);
92 $this->
saveSessionValue(self::SESSION_SUBINDEX_PARTICIPANT_SOLUTION, $participantSolution);
102 return count($this->
readSessionValue(self::SESSION_SUBINDEX_REQUESTED_HINTS));
107 $requestedHints = $this->
readSessionValue(self::SESSION_SUBINDEX_REQUESTED_HINTS);
108 return isset($requestedHints[$hintId]);
113 $requestedHints = $this->
readSessionValue(self::SESSION_SUBINDEX_REQUESTED_HINTS);
114 $requestedHints[$hintId] = $hintId;
115 $this->
saveSessionValue(self::SESSION_SUBINDEX_REQUESTED_HINTS, $requestedHints);
isInstantResponseActive()
const SESSION_SUBINDEX_INSTANT_RESPONSE_ACTIVE
const SESSION_SUBINDEX_PARTICIPANT_SOLUTION
getParticipantsSolution()
setParticipantsSolution($participantSolution)
readSessionValue($subIndex)
setInstantResponseActive($instantResponseActive)
const SESSION_SUBINDEX_REQUESTED_HINTS
saveSessionValue($subIndex, $value)
__construct($userId, $questionId)
addRequestedHint($hintId)