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 14786 2008-04-08 14:11:46Z elixir_inter $

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 14786 2008-04-08 14:11:46Z elixir_inter $
filesource:  Source Code for this file


[ 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 42]


Type:   mixed


[ Top ]

$random =

[line 38]


Type:   mixed


[ Top ]

$sound =

[line 36]


Type:   mixed


[ Top ]

$timeLimit =

[line 40]


Type:   mixed


[ Top ]

$type =

[line 37]


Type:   mixed


[ Top ]



Class Methods


constructor Exercise [line 49]

Exercise Exercise( )

constructor of the class



Tags:

author:  - Olivier Brouckaert


[ Top ]

method addToList [line 561]

- 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 626]

void createForm( FormValidator $form)

Creates the form to create / edit an exercise



Parameters:

FormValidator   $form   the formvalidator instance (by reference)

[ Top ]

method delete [line 616]

void delete( )

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



Tags:

author:  - Olivier Brouckaert


[ Top ]

method disable [line 411]

void disable( )

disables the exercise



Tags:

author:  - Olivier Brouckaert


[ Top ]

method disable_results [line 416]

void disable_results( )



[ Top ]

method enable [line 401]

void enable( )

enables the exercise



Tags:

author:  - Olivier Brouckaert


[ Top ]

method enable_results [line 421]

void enable_results( )



[ Top ]

method getShuffle [line 190]

void getShuffle( )

Same as isRandom() but has a name applied to values different than 0 or 1



[ Top ]

method isInList [line 296]

- 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 183]

- 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 517]

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 474]

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 682]

void processCreation( FormValidator $form)

function which process the creation of exercises



Parameters:

FormValidator   $form   the formvalidator instance

[ Top ]

method read [line 69]

- 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 591]

- 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 431]

void save( )

updates the exercise in the data base



Tags:

author:  - Olivier Brouckaert


[ Top ]

method selectDescription [line 150]

- selectDescription( )

returns the exercise description



Tags:

return:  string - exercise description
author:  - Olivier Brouckaert


[ Top ]

method selectId [line 121]

- selectId( )

returns the exercise ID



Tags:

return:  integer - exercise ID
author:  - Olivier Brouckaert


[ Top ]

method selectNbrQuestions [line 223]

- selectNbrQuestions( )

returns the number of questions in this exercise



Tags:

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


[ Top ]

method selectQuestionList [line 212]

- selectQuestionList( )

returns the array with the question ID list



Tags:

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


[ Top ]

method selectRandomList [line 235]

- 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 161]

- selectSound( )

returns the exercise sound file



Tags:

return:  string - exercise description
author:  - Olivier Brouckaert


[ Top ]

method selectStatus [line 201]

- selectStatus( )

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



Tags:

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


[ Top ]

method selectTimeLimit [line 139]

void selectTimeLimit( )

returns the time limit



[ Top ]

method selectTitle [line 132]

- selectTitle( )

returns the exercise title



Tags:

return:  string - exercise title
author:  - Olivier Brouckaert


[ Top ]

method selectType [line 172]

- selectType( )

returns the exercise type



Tags:

return:  integer - exercise type
author:  - Olivier Brouckaert


[ Top ]

method setRandom [line 391]

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 318]

void updateDescription( - $description)

changes the exercise description



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $description   string $description - exercise description

[ Top ]

method updateSound [line 330]

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 307]

void updateTitle( - $title)

changes the exercise title



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $title   string $title - exercise title

[ Top ]

method updateType [line 379]

void updateType( - $type)

changes the exercise type



Tags:

author:  - Olivier Brouckaert


Parameters:

-   $type   integer $type - exercise type

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:24:58 -0500 by phpDocumentor 1.4.1