ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestEvaluationPassData Class Reference
+ Collaboration diagram for ilTestEvaluationPassData:

Public Member Functions

 __sleep ()
 ilTestEvaluationPassData ()
 Constructor.
 getNrOfAnsweredQuestions ()
 setNrOfAnsweredQuestions ($nrOfAnsweredQuestions)
 getReachedPoints ()
 setReachedPoints ($reachedpoints)
 getMaxPoints ()
 setMaxPoints ($maxpoints)
 getQuestionCount ()
 setQuestionCount ($questioncount)
 getWorkingTime ()
 setWorkingTime ($workingtime)
 getPass ()
 setPass ($a_pass)
 getAnsweredQuestions ()
 addAnsweredQuestion ($question_id, $max_points, $reached_points, $isAnswered, $sequence=NULL)
getAnsweredQuestion ($index)
getAnsweredQuestionByQuestionId ($question_id)
 getAnsweredQuestionCount ()
 getRequestedHintsCount ()
 Getter for $requestedHintsCount.
 setRequestedHintsCount ($requestedHintsCount)
 Setter for $requestedHintsCount.
 getDeductedHintPoints ()
 Getter for $deductedHintPoints.
 setDeductedHintPoints ($deductedHintPoints)
 Setter for $deductedHintPoints.
 setObligationsAnswered ($obligationsAnswered)
 setter for property obligationsAnswered
 areObligationsAnswered ()
 getter for property obligationsAnswered.

Data Fields

 $answeredQuestions
 $pass

Private Attributes

 $workingtime
 $questioncount
 $maxpoints
 $reachedpoints
 $nrOfAnsweredQuestions
 $requestedHintsCount = null
 $deductedHintPoints = null
 $obligationsAnswered = null

Detailed Description

Definition at line 41 of file class.ilTestEvaluationPassData.php.

Member Function Documentation

ilTestEvaluationPassData::__sleep ( )

Definition at line 113 of file class.ilTestEvaluationPassData.php.

{
return array('answeredQuestions', 'pass', 'nrOfAnsweredQuestions', 'reachedpoints',
'maxpoints', 'questioncount', 'workingtime');
}
ilTestEvaluationPassData::addAnsweredQuestion (   $question_id,
  $max_points,
  $reached_points,
  $isAnswered,
  $sequence = NULL 
)

Definition at line 194 of file class.ilTestEvaluationPassData.php.

{
$this->answeredQuestions[] = array(
"id" => $question_id,
"points" => round($max_points, 2),
"reached" => round($reached_points, 2),
'isAnswered' => $isAnswered,
"sequence" => $sequence
);
}
ilTestEvaluationPassData::areObligationsAnswered ( )

getter for property obligationsAnswered.

if property wasn't set yet the method is trying to determine this information by iterating over the added questions. if both wasn't possible the method throws an exception

Exceptions
ilTestEvaluationException
Returns
boolean

Definition at line 294 of file class.ilTestEvaluationPassData.php.

References $obligationsAnswered.

{
if( !is_null($this->obligationsAnswered) )
{
}
if( is_array($this->answeredQuestions) && count($this->answeredQuestions) )
{
foreach($this->answeredQuestions as $question)
{
if( !$question['isAnswered'] )
{
return false;
}
}
return true;
}
'Neither the boolean property ilTestEvaluationPassData::obligationsAnswered was set, '.
'nor the property array property ilTestEvaluationPassData::answeredQuestions contains elements!'
);
}
& ilTestEvaluationPassData::getAnsweredQuestion (   $index)

Definition at line 205 of file class.ilTestEvaluationPassData.php.

{
if (array_key_exists($index, $this->answeredQuestions))
{
return $this->answeredQuestions[$index];
}
else
{
return NULL;
}
}
& ilTestEvaluationPassData::getAnsweredQuestionByQuestionId (   $question_id)

Definition at line 217 of file class.ilTestEvaluationPassData.php.

{
foreach ($this->answeredQuestions as $question)
{
if ($question["id"] == $question_id)
{
return $question;
}
}
return NULL;
}
ilTestEvaluationPassData::getAnsweredQuestionCount ( )

Definition at line 229 of file class.ilTestEvaluationPassData.php.

{
return count($this->answeredQuestions);
}
ilTestEvaluationPassData::getAnsweredQuestions ( )

Definition at line 189 of file class.ilTestEvaluationPassData.php.

References $answeredQuestions.

ilTestEvaluationPassData::getDeductedHintPoints ( )

Getter for $deductedHintPoints.

Returns
integer $deductedHintPoints

Definition at line 259 of file class.ilTestEvaluationPassData.php.

References $deductedHintPoints.

ilTestEvaluationPassData::getMaxPoints ( )

Definition at line 149 of file class.ilTestEvaluationPassData.php.

References $maxpoints.

{
}
ilTestEvaluationPassData::getNrOfAnsweredQuestions ( )
ilTestEvaluationPassData::getPass ( )

Definition at line 179 of file class.ilTestEvaluationPassData.php.

References $pass.

{
return $this->pass;
}
ilTestEvaluationPassData::getQuestionCount ( )

Definition at line 159 of file class.ilTestEvaluationPassData.php.

References $questioncount.

{
}
ilTestEvaluationPassData::getReachedPoints ( )

Definition at line 139 of file class.ilTestEvaluationPassData.php.

References $reachedpoints.

{
}
ilTestEvaluationPassData::getRequestedHintsCount ( )

Getter for $requestedHintsCount.

Returns
integer $requestedHintsCount

Definition at line 239 of file class.ilTestEvaluationPassData.php.

References $requestedHintsCount.

ilTestEvaluationPassData::getWorkingTime ( )

Definition at line 169 of file class.ilTestEvaluationPassData.php.

References $workingtime.

{
}
ilTestEvaluationPassData::ilTestEvaluationPassData ( )

Constructor.

public

Definition at line 124 of file class.ilTestEvaluationPassData.php.

{
$this->answeredQuestions = array();
}
ilTestEvaluationPassData::setDeductedHintPoints (   $deductedHintPoints)

Setter for $deductedHintPoints.

Parameters
integer$deductedHintPoints

Definition at line 269 of file class.ilTestEvaluationPassData.php.

References $deductedHintPoints.

{
$this->deductedHintPoints = $deductedHintPoints;
}
ilTestEvaluationPassData::setMaxPoints (   $maxpoints)

Definition at line 154 of file class.ilTestEvaluationPassData.php.

References $maxpoints.

{
$this->maxpoints = $maxpoints;
}
ilTestEvaluationPassData::setNrOfAnsweredQuestions (   $nrOfAnsweredQuestions)

Definition at line 134 of file class.ilTestEvaluationPassData.php.

References $nrOfAnsweredQuestions.

{
$this->nrOfAnsweredQuestions = $nrOfAnsweredQuestions;
}
ilTestEvaluationPassData::setObligationsAnswered (   $obligationsAnswered)

setter for property obligationsAnswered

Parameters
boolean$obligationsAnswered

Definition at line 279 of file class.ilTestEvaluationPassData.php.

References $obligationsAnswered.

{
$this->obligationsAnswered = (bool)$obligationsAnswered;
}
ilTestEvaluationPassData::setPass (   $a_pass)

Definition at line 184 of file class.ilTestEvaluationPassData.php.

{
$this->pass = $a_pass;
}
ilTestEvaluationPassData::setQuestionCount (   $questioncount)

Definition at line 164 of file class.ilTestEvaluationPassData.php.

References $questioncount.

{
$this->questioncount = $questioncount;
}
ilTestEvaluationPassData::setReachedPoints (   $reachedpoints)

Definition at line 144 of file class.ilTestEvaluationPassData.php.

References $reachedpoints.

{
$this->reachedpoints = $reachedpoints;
}
ilTestEvaluationPassData::setRequestedHintsCount (   $requestedHintsCount)

Setter for $requestedHintsCount.

Parameters
integer$requestedHintsCount

Definition at line 249 of file class.ilTestEvaluationPassData.php.

References $requestedHintsCount.

{
$this->requestedHintsCount = $requestedHintsCount;
}
ilTestEvaluationPassData::setWorkingTime (   $workingtime)

Definition at line 174 of file class.ilTestEvaluationPassData.php.

References $workingtime.

{
$this->workingtime = $workingtime;
}

Field Documentation

ilTestEvaluationPassData::$answeredQuestions

Definition at line 48 of file class.ilTestEvaluationPassData.php.

Referenced by getAnsweredQuestions().

ilTestEvaluationPassData::$deductedHintPoints = null
private
ilTestEvaluationPassData::$maxpoints
private

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

Referenced by getMaxPoints(), and setMaxPoints().

ilTestEvaluationPassData::$nrOfAnsweredQuestions
private
ilTestEvaluationPassData::$obligationsAnswered = null
private
ilTestEvaluationPassData::$pass

Definition at line 90 of file class.ilTestEvaluationPassData.php.

Referenced by getPass().

ilTestEvaluationPassData::$questioncount
private

Definition at line 62 of file class.ilTestEvaluationPassData.php.

Referenced by getQuestionCount(), and setQuestionCount().

ilTestEvaluationPassData::$reachedpoints
private

Definition at line 76 of file class.ilTestEvaluationPassData.php.

Referenced by getReachedPoints(), and setReachedPoints().

ilTestEvaluationPassData::$requestedHintsCount = null
private
ilTestEvaluationPassData::$workingtime
private

Definition at line 55 of file class.ilTestEvaluationPassData.php.

Referenced by getWorkingTime(), and setWorkingTime().


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