Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
EvaluationObject Class Reference
Inheritance diagram for EvaluationObject:
Inheritance graph
Collaboration diagram for EvaluationObject:
Collaboration graph

Public Member Functions

 EvaluationObject ($objectID="", $parentObject=NULL, $loadChildren=EVAL_LOAD_NO_CHILDREN)
 setTitle ($title, $encoded=false)
 getTitle ($escaped=false)
 setText ($text, $encoded=false)
 getText ($escaped=false)
 setPosition ($position)
 getPosition ()
 setParentObject (&$parentObject)
 getParentObject ()
 getParentID ()
 setParentID ($parentID)
 removeChildID ($childID)
 addChild (&$child)
getChild ($childID="")
getNextChild ()
 getChildren ()
 getNumberChildren ()
 save ()
 delete ()
duplicate ()
 duplicate_init ()
 init ($objectID="")
 load ()
 check ()
 getSpecialChildobjects (&$object, $instanceof, $reset=false)
 toString ()
- Public Member Functions inherited from StudipObject
 StudipObject ($objectID="")
 createNewID ()
 getObjectID ()
 setObjectID ($objectID)
 getAuthorID ()
 getAuthor ()
 getFullname ()
 setAuthorID ($authorID)
 getRangeID ()
 setRangeID ($rangeID)
- Public Member Functions inherited from AuthorObject
 AuthorObject ()
 finalize ()
 setAuthorEmail ($email)
 getAuthorEmail ()
 setAuthorName ($name)
 getAuthorName ()
 x_instanceof ()
 isError ()
 getErrors ()
 resetErrors ()
 throwError ($errcode, $errstring, $errline=0, $errfile=0, $errtype=ERROR_NORMAL)
 throwErrorFromClass (&$class)
 errorHandler ($no, $str, $file, $line, $ctx)

Data Fields

 $parentObject
 $parentObjectID
 $childObjects
 $numberChildren
 $title
 $text
 $position
 $db
 $childNum
 $loadChildren
- Data Fields inherited from StudipObject
 $objectID
 $authorID
 $rangeID
- Data Fields inherited from AuthorObject
 $errorArray
 $authorEmail
 $authorName
 $instanceof

Member Function Documentation

addChild ( $child)

Adds a child public

Parameters
objectEvaluationObject &$child The child object

Reimplemented in EvaluationQuestion, and EvaluationGroup.

check ( )

Checks if object is in a valid state private

Reimplemented in Evaluation, and EvaluationAnswer.

Here is the call graph for this function:

Here is the caller graph for this function:

delete ( )

Deletes the object from the database public

Here is the call graph for this function:

& duplicate ( )

Duplicates the evaluation object. WARNING: Stored childs will be modified :( public

duplicate_init ( )

Initialisation for duplicated objects private

Here is the call graph for this function:

EvaluationObject (   $objectID = "",
  $parentObject = NULL,
  $loadChildren = EVAL_LOAD_NO_CHILDREN 
)

Constructor

Parameters
string$objectIDThe ID of an existing object
EvaluationObject$parentObjectThe parent object
integer$loadChildrenSee const EVAL_LOAD_*_CHILDREN public

Here is the call graph for this function:

Here is the caller graph for this function:

& getChild (   $childID = "")

Gets the first child and removes it (if no id is given) public

Parameters
string$childIDThe child id
Returns
object The first object

Here is the call graph for this function:

Here is the caller graph for this function:

getChildren ( )

Gets all the childs in the object public

Returns
array An array full of childObjects

Reimplemented in Evaluation.

& getNextChild ( )

Gets the next child public

Returns
object The next object, otherwise NULL

Here is the caller graph for this function:

getNumberChildren ( )

Gets the number of children public

Returns
integer Number of children

Here is the caller graph for this function:

getParentID ( )

Gets the parentObjectID public

Returns
string The parentObjectID
getParentObject ( )

Gets the parentObject public

Returns
object The parentObject.
getPosition ( )

Gets the position public

Returns
string The position
getSpecialChildobjects ( $object,
  $instanceof,
  $reset = false 
)

Gets all children of a special kind

Parameters
EvaluationObject&$objectthe parent object
string$instanceofinstance of the searched child
boolean$resetfor internal use public

Here is the caller graph for this function:

getText (   $escaped = false)

Gets the text public

Parameters
boolean$escapedIf YES, the string is escaped
Returns
string The text
getTitle (   $escaped = false)

Gets the title public

Parameters
boolean$escapedIf YES, the string is escaped
Returns
string The title
init (   $objectID = "")

Initialisation for objects private

Parameters
string$objectIDThe object id

Here is the call graph for this function:

Here is the caller graph for this function:

load ( )

Loads the Object from the database private

Here is the call graph for this function:

Here is the caller graph for this function:

removeChildID (   $childID)

Removes a child from the object (not from the DB!) public

Parameters
string$childIDThe child id

Here is the call graph for this function:

save ( )

Saves the object into the database public

Here is the call graph for this function:

setParentID (   $parentID)

Sets the parentObjectID public

Parameters
string$parentIDThe parent id
setParentObject ( $parentObject)

Sets the parentObject public

Parameters
string&$parentObjectThe parentObject.
setPosition (   $position)

Sets the position public

Parameters
string$positionThe position.

Here is the caller graph for this function:

setText (   $text,
  $encoded = false 
)

Sets the text public

Parameters
string$textThe text.
boolean$encodedYES, if text is escaped (e.g. with addslashes) and have html special chars.
Exceptions
error

Here is the call graph for this function:

setTitle (   $title,
  $encoded = false 
)

Sets the title public

Parameters
string$titleThe title.
boolean$encodedYES, if text is escaped (e.g. with addslashes) and have html special chars.
Exceptions
error

Here is the call graph for this function:

toString ( )

Debugfunction public

Reimplemented in EvaluationAnswer.

Here is the call graph for this function:

Field Documentation

integer $childNum

Is used as a counter for getNextChild ) private

array $childObjects

Array with all linked childobjects private

object DatabaseObject $db

Holds the DB object private

integer $loadChildren

Defines how many children to load. See EVAL_LOAD_*_CHILDREN private

integer $numberChildren

Counts the number of childs private

string $parentObject

The parent object private

$parentObjectID
integer $position

Position of this group in parent object private

integer $text

Text of the group private

integer $title

Title of the group private


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