dokeos-exercise
[ class tree: dokeos-exercise ] [ index: dokeos-exercise ] [ all elements ]

Class: Matching

Source Location: /main/exercice/matching.class.php

Class Overview

Question
   |
   --Matching

This class allows to instantiate an object of type MULTIPLE_ANSWER (MULTIPLE CHOICE, MULTIPLE ANSWER), extending the class question


Author(s):

  • Eric Marguin

Variables

Methods


Inherited Variables

Inherited Methods

Class: Question

Question::Question()
constructor of the class
Question::addToList()
adds an exercise into the exercise list
Question::createAnswersForm()
abstract function which creates the form to create / edit the answers of the question
Question::createForm()
Creates the form to create / edit a question A subclass can redifine this function to add fields...
Question::delete()
deletes a question from the database the parameter tells if the question is removed from all exercises (value = 0), or just from one exercise (value = exercise ID)
Question::display_type_menu()
Displays the menu of question types
Question::duplicate()
duplicates the question
Question::exportPicture()
exports a picture to another question
Question::getInstance()
Returns an instance of the class corresponding to the type
Question::getTmpPicture()
moves the temporary question "tmp" to "quiz-$questionId" Temporary pictures are used when we don't want to save a picture right after a form submission.
Question::processAnswersCreation()
abstract function which process the creation of answers
Question::processCreation()
function which process the creation of questions
Question::read()
reads question informations from the data base
Question::removeFromList()
removes an exercise from the exercise list
Question::removePicture()
deletes the picture
Question::resizePicture()
Resizes a picture || Warning!: can only be called after uploadPicture, or if picture is already available in object.
Question::save()
updates the question in the data base if an exercise ID is provided, we add that exercise ID into the exercise list
Question::selectDescription()
returns the question description
Question::selectExerciseList()
returns the array with the exercise ID list
Question::selectId()
returns the question ID
Question::selectNbrExercises()
returns the number of exercises which this question is in
Question::selectPicture()
returns the picture name
Question::selectPosition()
returns the question position
Question::selectTitle()
returns the question title
Question::selectType()
returns the answer type
Question::selectWeighting()
returns the question weighting
Question::setTmpPicture()
saves the picture coming from POST into a temporary file Temporary pictures are used when we don't want to save a picture right after a form submission.
Question::updateDescription()
changes the question description
Question::updatePosition()
changes the question position
Question::updateTitle()
changes the question title
Question::updateType()
changes the answer type. If the user changes the type from "unique answer" to "multiple answers" (or conversely) answers are not deleted, otherwise yes
Question::updateWeighting()
changes the question weighting
Question::uploadPicture()
adds a picture to the question

Class Details

[line 41]
This class allows to instantiate an object of type MULTIPLE_ANSWER (MULTIPLE CHOICE, MULTIPLE ANSWER), extending the class question



Tags:

author:  Eric Marguin


[ Top ]


Class Variables

static $explanationLangVar =  'Matching'

[line 45]


Type:   mixed
Overrides:   Array


[ Top ]

static $typePicture =  'matching.gif'

[line 44]


Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


constructor Matching [line 50]

Matching Matching( )

Constructor



[ Top ]

method createAnswersForm [line 59]

void createAnswersForm( the $form)

function which redifines Question::createAnswersForm



Overrides Question::createAnswersForm() (abstract function which creates the form to create / edit the answers of the question)

Parameters:

the   $form   formvalidator instance

[ Top ]

method processAnswersCreation [line 234]

void processAnswersCreation( the $form)

abstract function which creates the form to create / edit the answers of the question



Overrides Question::processAnswersCreation() (abstract function which process the creation of answers)

Parameters:

the   $form   formvalidator instance

[ Top ]


Documentation generated on Wed, 05 Sep 2007 06:14:57 +0200 by phpDocumentor 1.4.0