Public Member Functions | Data Fields

EnhancedAnswerblock Class Reference

Class for enhanced mode answerblocks. More...

Public Member Functions

 EnhancedAnswerblock ($question_id=-1)
 EnhancedAnswerblock constructor.
 setId ($id=-1)
 Sets the database id of the answerblock.
 getId ()
 Gets the database id of the answerblock.
 setQuestionId ($id=-1)
 Sets the question id of the answerblock.
 getQuestionId ()
 Gets the question id of the answerblock.
 setAnswerblockIndex ($answerblock_index=-1)
 Sets the answerblock index of the answerblock.
 getAnswerblockIndex ()
 Gets the answerblock index of the answerblock.
 setPoints ($points=0)
 Sets the points of the answerblock.
 getPoints ()
 Gets the points of the answerblock.
 setSubquestionIndex ($subquestion_index=0)
 Sets the subquestion index.
 getSubquestionIndex ()
 Gets the subquestion index.
 setFeedback ($feedback=0)
 Sets the feedback of the answerblock.
 getFeedback ()
 Gets the feedback of the answerblock.
 addConnection ($answer_id, $order, $boolean_prefix)
 Adds a new connection to the answerblock.
 getConnection ($order)
 Gets an answerblock answer of a given position.
 flushConnections ()
 Deletes all existing answerblock answers.

Data Fields

 $id
 $answerblock_index
 $question_id
 $points
 $feedback
 $connections
 $subquestion_index

Detailed Description

Class for enhanced mode answerblocks.

EnhancedAnswerblock is a class encapsulating answerblocks in enhanced question mode

Author:
Helmut Schottmüller <hschottm@tzi.de>
Version:
Id:
class.assEnhancedAnswerblock.php 5474 2004-10-22 13:19:00Z hschottm

class.assEnhancedAnswerblock.php Assessment

Definition at line 34 of file class.assEnhancedAnswerblock.php.


Member Function Documentation

EnhancedAnswerblock::addConnection ( answer_id,
order,
boolean_prefix 
)

Adds a new connection to the answerblock.

Adds a new connection to the answerblock

public

See also:
$feedback

Definition at line 301 of file class.assEnhancedAnswerblock.php.

        {
                $connection = new AnswerblockAnswer();
                $connection->setAnswerId($answer_id);
                $connection->setOrder($order);
                $connection->setBooleanPrefix($boolean_prefix);
                $this->connections[$order] = $connection;
  }

EnhancedAnswerblock::EnhancedAnswerblock ( question_id = -1  ) 

EnhancedAnswerblock constructor.

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

Parameters:
integer $question_id The id of the question containing the answerblock public

Definition at line 106 of file class.assEnhancedAnswerblock.php.

References $question_id.

  {
                $this->question_id = $question_id;
                $this->subquestion_index = 0;
                $this->connections = array();
                $this->feedback = "";
                $this->points = 0;
                $this->answerblock_index = 0;
  }

EnhancedAnswerblock::flushConnections (  ) 

Deletes all existing answerblock answers.

Deletes all existing answerblock answers

public

See also:
$connections

Definition at line 332 of file class.assEnhancedAnswerblock.php.

        {
                $this->connections = array();
        }

EnhancedAnswerblock::getAnswerblockIndex (  ) 

Gets the answerblock index of the answerblock.

Gets the answerblock index of the answerblock

Returns:
integer answerblock index public
See also:
$answerblock_index

Definition at line 201 of file class.assEnhancedAnswerblock.php.

        {
    return $this->answerblock_index;
  }

EnhancedAnswerblock::getConnection ( order  ) 

Gets an answerblock answer of a given position.

Gets an answerblock answer of a given position

Parameters:
integer $order Order of the answerblock answer
Returns:
object AnswerblockAnswer object of the given position public
See also:
$feedback

Definition at line 319 of file class.assEnhancedAnswerblock.php.

        {
                return $this->connections[$order];
  }

EnhancedAnswerblock::getFeedback (  ) 

Gets the feedback of the answerblock.

Gets the feedback of the answerblock

Returns:
integer feedback public
See also:
$feedback

Definition at line 288 of file class.assEnhancedAnswerblock.php.

        {
    return $this->feedback;
  }

EnhancedAnswerblock::getId (  ) 

Gets the database id of the answerblock.

Gets the database id of the answerblock

Returns:
integer database id public
See also:
$id

Definition at line 143 of file class.assEnhancedAnswerblock.php.

        {
    return $this->id;
  }

EnhancedAnswerblock::getPoints (  ) 

Gets the points of the answerblock.

Gets the points of the answerblock

Returns:
integer points public
See also:
$points

Definition at line 230 of file class.assEnhancedAnswerblock.php.

        {
    return $this->points;
  }

EnhancedAnswerblock::getQuestionId (  ) 

Gets the question id of the answerblock.

Gets the question id of the answerblock

Returns:
integer question id public
See also:
$question_id

Definition at line 172 of file class.assEnhancedAnswerblock.php.

        {
    return $this->question_id;
  }

EnhancedAnswerblock::getSubquestionIndex (  ) 

Gets the subquestion index.

Gets the subquestion index

Returns:
integer subquestion index public
See also:
$subquestion_index

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

        {
    return $this->subquestion_index;
  }

EnhancedAnswerblock::setAnswerblockIndex ( answerblock_index = -1  ) 

Sets the answerblock index of the answerblock.

Sets the answerblock index of the answerblock

Parameters:
integer $answerblock_index answerblock index public
See also:
$answerblock_index

Definition at line 186 of file class.assEnhancedAnswerblock.php.

References $answerblock_index.

        {
    $this->answerblock_index = $answerblock_index;
  }

EnhancedAnswerblock::setFeedback ( feedback = 0  ) 

Sets the feedback of the answerblock.

Sets the feedback of the answerblock

Parameters:
integer $feedback feedback public
See also:
$feedback

Definition at line 273 of file class.assEnhancedAnswerblock.php.

References $feedback.

        {
    $this->feedback = $feedback;
  }

EnhancedAnswerblock::setId ( id = -1  ) 

Sets the database id of the answerblock.

Sets the database id of the answerblock

Parameters:
integer $id database id public
See also:
$id

Definition at line 128 of file class.assEnhancedAnswerblock.php.

References $id.

        {
    $this->id = $id;
  }

EnhancedAnswerblock::setPoints ( points = 0  ) 

Sets the points of the answerblock.

Sets the points of the answerblock

Parameters:
integer $point points public
See also:
$points

Definition at line 215 of file class.assEnhancedAnswerblock.php.

References $points.

        {
    $this->points = $points;
  }

EnhancedAnswerblock::setQuestionId ( id = -1  ) 

Sets the question id of the answerblock.

Sets the question id of the answerblock

Parameters:
integer $question_id question id public
See also:
$question_id

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

References $question_id.

        {
    $this->question_id = $question_id;
  }

EnhancedAnswerblock::setSubquestionIndex ( subquestion_index = 0  ) 

Sets the subquestion index.

Sets the subquestion index

Parameters:
integer $subquestion_index subquestion index public
See also:
$subquestion_index

Definition at line 244 of file class.assEnhancedAnswerblock.php.

References $subquestion_index.

        {
    $this->subquestion_index = $subquestion_index;
  }


Field Documentation

EnhancedAnswerblock::$answerblock_index

Definition at line 51 of file class.assEnhancedAnswerblock.php.

Referenced by setAnswerblockIndex().

EnhancedAnswerblock::$connections

Definition at line 87 of file class.assEnhancedAnswerblock.php.

EnhancedAnswerblock::$feedback

Definition at line 78 of file class.assEnhancedAnswerblock.php.

Referenced by setFeedback().

EnhancedAnswerblock::$id

Definition at line 42 of file class.assEnhancedAnswerblock.php.

Referenced by setId().

EnhancedAnswerblock::$points

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

Referenced by setPoints().

EnhancedAnswerblock::$question_id

Definition at line 60 of file class.assEnhancedAnswerblock.php.

Referenced by EnhancedAnswerblock(), and setQuestionId().

EnhancedAnswerblock::$subquestion_index

Definition at line 96 of file class.assEnhancedAnswerblock.php.

Referenced by setSubquestionIndex().


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