Public Member Functions | Data Fields

ASS_AnswerBinaryState Class Reference

Class for true/false or yes/no answers. More...

Inheritance diagram for ASS_AnswerBinaryState:
Collaboration diagram for ASS_AnswerBinaryState:

Public Member Functions

 ASS_AnswerBinaryState ($answertext="", $points=0.0, $order=0, $state=0, $id=-1)
 ASS_AnswerBinaryState constructor.
 getState ()
 Gets the state.
 isStateChecked ()
 Gets the state.
 isStateSet ()
 Gets the state.
 isStateUnset ()
 Gets the state.
 isStateUnchecked ()
 Gets the state.
 setState ($state=0)
 Sets the state.
 setChecked ()
 Sets the answer as a checked answer.
 setSet ()
 Sets the answer as a set answer.
 setUnset ()
 Sets the answer as a unset answer.
 setUnchecked ()
 Sets the answer as a unchecked answer.

Data Fields

 $state

Detailed Description

Class for true/false or yes/no answers.

ASS_AnswerBinaryState is a class for answers with a binary state indicator (checked/unchecked, set/unset)

Author:
Helmut Schottmüller <helmut.schottmueller@mac.com>
Version:
Id:
class.assAnswerBinaryState.php 9985 2006-02-20 20:06:39Z hschottm

class.assAnswerBinaryState.php Assessment

See also:
ASS_AnswerSimple

Definition at line 38 of file class.assAnswerBinaryState.php.


Member Function Documentation

ASS_AnswerBinaryState::ASS_AnswerBinaryState ( answertext = "",
points = 0.0,
order = 0,
state = 0,
id = -1 
)

ASS_AnswerBinaryState constructor.

The constructor takes possible arguments an creates an instance of the ASS_AnswerBinaryState object.

Parameters:
string $answertext A string defining the answer text
double $points The number of points given for the selected answer
integer $state A integer value indicating the state of the answer
integer $order A nonnegative value representing a possible display or sort order public

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

References ASS_AnswerSimple::$answertext, ASS_AnswerSimple::$id, ASS_AnswerSimple::$order, ASS_AnswerSimple::$points, $state, and ASS_AnswerSimple::ASS_AnswerSimple().

Referenced by ASS_AnswerBinaryStateImage::ASS_AnswerBinaryStateImage(), ASS_AnswerCloze::ASS_AnswerCloze(), and ASS_AnswerImagemap::ASS_AnswerImagemap().

  {
    $this->ASS_AnswerSimple($answertext, $points, $order, $id);
    $this->state = $state;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

ASS_AnswerBinaryState::getState (  ) 

Gets the state.

Returns the state of the answer

Returns:
boolean state public
See also:
$state

Definition at line 81 of file class.assAnswerBinaryState.php.

                      {
    return $this->state;
  }

ASS_AnswerBinaryState::isStateChecked (  ) 

Gets the state.

Returns the answer state

Returns:
boolean state public
See also:
$state

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

                            {
    return $this->state;
  }

ASS_AnswerBinaryState::isStateSet (  ) 

Gets the state.

Returns the answer state

Returns:
boolean state public
See also:
$state

Definition at line 107 of file class.assAnswerBinaryState.php.

                        {
    return $this->state;
  }

ASS_AnswerBinaryState::isStateUnchecked (  ) 

Gets the state.

Returns the answer state

Returns:
boolean state public
See also:
$state

Definition at line 133 of file class.assAnswerBinaryState.php.

                              {
    return !$this->state;
  }

ASS_AnswerBinaryState::isStateUnset (  ) 

Gets the state.

Returns the answer state

Returns:
boolean state public
See also:
$state

Definition at line 120 of file class.assAnswerBinaryState.php.

                          {
    return !$this->state;
  }

ASS_AnswerBinaryState::setChecked (  ) 

Sets the answer as a checked answer.

Sets the state value of the answer to 1

public

See also:
$state

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

                        {
    $this->state = 1;
  }

ASS_AnswerBinaryState::setSet (  ) 

Sets the answer as a set answer.

Sets the state value of the answer to 1

public

See also:
$state

Definition at line 171 of file class.assAnswerBinaryState.php.

                    {
    $this->state = 1;
  }

ASS_AnswerBinaryState::setState ( state = 0  ) 

Sets the state.

Sets the state of the answer using 1 or 0 as indicator

Parameters:
boolean $state A integer value indicating the state of the answer public
See also:
$state

Definition at line 146 of file class.assAnswerBinaryState.php.

References $state.

  {
    $this->state = $state;
  }

ASS_AnswerBinaryState::setUnchecked (  ) 

Sets the answer as a unchecked answer.

Sets the state value of the answer to 0

public

See also:
$state

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

                          {
    $this->state = 0;
  }

ASS_AnswerBinaryState::setUnset (  ) 

Sets the answer as a unset answer.

Sets the state value of the answer to 0

public

See also:
$state

Definition at line 183 of file class.assAnswerBinaryState.php.

                      {
    $this->state = 0;
  }


Field Documentation

ASS_AnswerBinaryState::$state

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