ILIAS  Release_5_0_x_branch Revision 61816
 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, $manual=0)
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 19 of file class.ilTestEvaluationPassData.php.

Member Function Documentation

ilTestEvaluationPassData::__sleep ( )

Definition at line 91 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,
  $manual = 0 
)

Definition at line 172 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,
'manual' => $manual
);
}
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 273 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 184 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 196 of file class.ilTestEvaluationPassData.php.

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

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

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

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

References $answeredQuestions.

ilTestEvaluationPassData::getDeductedHintPoints ( )

Getter for $deductedHintPoints.

Returns
integer $deductedHintPoints

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

References $deductedHintPoints.

ilTestEvaluationPassData::getMaxPoints ( )

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

References $maxpoints.

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

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

References $pass.

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

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

References $questioncount.

{
}
ilTestEvaluationPassData::getReachedPoints ( )

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

References $reachedpoints.

{
}
ilTestEvaluationPassData::getRequestedHintsCount ( )

Getter for $requestedHintsCount.

Returns
integer $requestedHintsCount

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

References $requestedHintsCount.

ilTestEvaluationPassData::getWorkingTime ( )

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

References $workingtime.

{
}
ilTestEvaluationPassData::ilTestEvaluationPassData ( )

Constructor.

public

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

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

Setter for $deductedHintPoints.

Parameters
integer$deductedHintPoints

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

References $deductedHintPoints.

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

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

References $maxpoints.

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

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

References $nrOfAnsweredQuestions.

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

setter for property obligationsAnswered

Parameters
boolean$obligationsAnswered

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

References $obligationsAnswered.

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

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

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

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

References $questioncount.

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

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

References $reachedpoints.

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

Setter for $requestedHintsCount.

Parameters
integer$requestedHintsCount

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

References $requestedHintsCount.

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

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

References $workingtime.

{
$this->workingtime = $workingtime;
}

Field Documentation

ilTestEvaluationPassData::$answeredQuestions

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

Referenced by getAnsweredQuestions().

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

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

Referenced by getMaxPoints(), and setMaxPoints().

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

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

Referenced by getPass().

ilTestEvaluationPassData::$questioncount
private

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

Referenced by getQuestionCount(), and setQuestionCount().

ilTestEvaluationPassData::$reachedpoints
private

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

Referenced by getReachedPoints(), and setReachedPoints().

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

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

Referenced by getWorkingTime(), and setWorkingTime().


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