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

Class: Exercise

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

Class Overview


Exercise class: This class allows to instantiate an object of type Exercise


Author(s):

  • Olivier Brouckaert

Version:

  • $Id: exercise.class.php 12445 2007-05-22 11:52:14Z elixir_julian $

Variables

Methods



Class Details

[line 31]
Exercise class: This class allows to instantiate an object of type Exercise



Tags:

author:  Olivier Brouckaert
version:  $Id: exercise.class.php 12445 2007-05-22 11:52:14Z elixir_julian $


[ Top ]


Class Variables

$active =

[line 39]


Type:   mixed


[ Top ]

$description =

[line 35]


Type:   mixed


[ Top ]

$exercise =

[line 34]


Type:   mixed


[ Top ]

$id =

[line 33]


Type:   mixed


[ Top ]

$questionList =

[line 41]


Type:   mixed


[ Top ]

$random =

[line 38]


Type:   mixed


[ Top ]

$sound =

[line 36]


Type:   mixed


[ Top ]

$type =

[line 37]


Type:   mixed


[ Top ]



Class Methods


constructor Exercise [line 48]

Exercise Exercise( )

constructor of the class



Tags:

author:  - Olivier Brouckaert


[ Top ]

method addToList [line 533]

- addToList( - $questionId)

adds a question into the question list



Tags:

return:  boolean - true if the question has been added, otherwise false
author:  - Olivier Brouckaert


Parameters:

-   $questionId   integer $questionId - question ID

[ Top ]

method createForm [line 598]

void createForm( FormValidator $form)

Creates the form to create / edit an exercise



Parameters:

FormValidator   $form   the formvalidator instance (by reference)

[ Top ]

method delete [line 588]

void delete( )

deletes the exercise from the database Notice : leaves the question in the data base



Tags:

author:  - Olivier Brouckaert


[ Top ]

method disable [line 394]

void disable( )

disables the exercise



Tags:

author:  - Olivier Brouckaert


[ Top ]

method enable [line 384]

void enable( )

enables the exercise



Tags:

author:  - Olivier Brouckaert


[ Top ]

method isInList [line 279]

- isInList( - $questionId)

returns 'true' if the question ID is in the question list



Tags:

return:  boolean - true if in the list, otherwise false
author:  - Olivier Brouckaert


Parameters:

-   $questionId   integer $questionId - question ID

[ Top ]

method isRandom [line 173]

- isRandom( )

tells if questions are selected randomly, and if so returns the draws



Tags:

return:  integer - 0 if not random, otherwise the draws
author:  - Olivier Brouckaert


[ Top ]

method moveDown [line 489]

void moveDown( - $id)

moves a question down in the list



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $id   integer $id - question ID to move down

[ Top ]

method moveUp [line 446]

void moveUp( - $id)

moves a question up in the list



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $id   integer $id - question ID to move up

[ Top ]

method processCreation [line 647]

void processCreation( FormValidator $form)

function which process the creation of exercises



Parameters:

FormValidator   $form   the formvalidator instance

[ Top ]

method read [line 67]

- read( - $id)

reads exercise informations from the data base



Tags:

return:  boolean - true if exercise exists, otherwise false
author:  - Olivier Brouckaert


Parameters:

-   $id   integer $id - exercise ID

[ Top ]

method removeFromList [line 563]

- removeFromList( - $questionId)

removes a question from the question list



Tags:

return:  boolean - true if the question has been removed, otherwise false
author:  - Olivier Brouckaert


Parameters:

-   $questionId   integer $questionId - question ID

[ Top ]

method save [line 404]

void save( )

updates the exercise in the data base



Tags:

author:  - Olivier Brouckaert


[ Top ]

method selectDescription [line 140]

- selectDescription( )

returns the exercise description



Tags:

return:  string - exercise description
author:  - Olivier Brouckaert


[ Top ]

method selectId [line 118]

- selectId( )

returns the exercise ID



Tags:

return:  integer - exercise ID
author:  - Olivier Brouckaert


[ Top ]

method selectNbrQuestions [line 206]

- selectNbrQuestions( )

returns the number of questions in this exercise



Tags:

return:  integer - number of questions
author:  - Olivier Brouckaert


[ Top ]

method selectQuestionList [line 195]

- selectQuestionList( )

returns the array with the question ID list



Tags:

return:  array - question ID list
author:  - Olivier Brouckaert


[ Top ]

method selectRandomList [line 218]

- selectRandomList( )

selects questions randomly in the question list



Tags:

return:  array - if the exercise is not set to take questions randomly, returns the question list without randomizing, otherwise, returns the list with questions selected randomly
author:  - Olivier Brouckaert


[ Top ]

method selectSound [line 151]

- selectSound( )

returns the exercise sound file



Tags:

return:  string - exercise description
author:  - Olivier Brouckaert


[ Top ]

method selectStatus [line 184]

- selectStatus( )

returns the exercise status (1 = enabled ; 0 = disabled)



Tags:

return:  boolean - true if enabled, otherwise false
author:  - Olivier Brouckaert


[ Top ]

method selectTitle [line 129]

- selectTitle( )

returns the exercise title



Tags:

return:  string - exercise title
author:  - Olivier Brouckaert


[ Top ]

method selectType [line 162]

- selectType( )

returns the exercise type



Tags:

return:  integer - exercise type
author:  - Olivier Brouckaert


[ Top ]

method setRandom [line 374]

void setRandom( - $random)

sets to 0 if questions are not selected randomly if questions are selected randomly, sets the draws



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $random   integer $random - 0 if not random, otherwise the draws

[ Top ]

method updateDescription [line 301]

void updateDescription( - $description)

changes the exercise description



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $description   string $description - exercise description

[ Top ]

method updateSound [line 313]

void updateSound( - $sound, - $delete)

changes the exercise sound file



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $sound   string $sound - exercise sound file
-   $delete   string $delete - ask to delete the file

[ Top ]

method updateTitle [line 290]

void updateTitle( - $title)

changes the exercise title



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $title   string $title - exercise title

[ Top ]

method updateType [line 362]

void updateType( - $type)

changes the exercise type



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $type   integer $type - exercise type

[ Top ]


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