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

Public Member Functions

 TestVote ($oldTestID="")
 setAnswers ($answerArray)
 setCo_Visibility ($co_visibility)
 getCo_Visibility ()
 getNumberOfCorrectAnswers ($userData=NULL)
 readVote ()
 executeWrite ()
 checkConsistency ()
- Public Member Functions inherited from Vote
 Vote ($oldVoteID="")
 finalize ()
 setTitle ($title)
 getTitle ()
 setQuestion ($question)
 getQuestion ()
 addSlashesToText ()
 getAnswers ()
 setStartdate ($timestamp)
 getStartdate ()
 setStopdate ($timestamp)
 getStopdate ()
 getRealStopdate ()
 getCreationdate ()
 getChangedate ()
 setTimespan ($seconds)
 getTimespan ()
 setMultiplechoice ($multiplechoice)
 isMultiplechoice ()
 setResultvisibility ($mode)
 getResultvisibility ()
 setNamesvisibility ($namesvisibility)
 getNamesvisibility ()
 setAnonymous ($anonymous)
 isAnonymous ()
 setChangeable ($changeable)
 isChangeable ()
 isVisible ()
 setVoteID ($objectID)
 getVoteID ()
 setRangeID ($rangeID)
 getRangeID ()
 setAuthorID ($authorID)
 getAuthorID ()
 isInUse ()
 isNew ()
 isActive ()
 isStopped ()
 sortVoteAnswers ()
 getMaxAnswer ()
 getNumberAnswers ()
 getNumberPersons ()
 executeAssociate ($userID, $answerArray)
 executeStart ()
 executeStop ()
 executeRemove ()
 executeRestart ()
 executeContinue ()
 executeSetVisible ($visibility)
 setIsInUse ($isInUse)
 setState ($state)
 setCreationdate ($timestamp)
 setChangedate ($timestamp)
 getState ()
 sortVoteAnswerarray ($a, $b)
- Public Member Functions inherited from StudipObject
 StudipObject ($objectID="")
 createNewID ()
 getObjectID ()
 setObjectID ($objectID)
 getAuthor ()
 getFullname ()
- Public Member Functions inherited from AuthorObject
 AuthorObject ()
 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

 $co_visibility
- Data Fields inherited from Vote
 $title
 $question
 $answerArray
 $startdate
 $stopdate
 $timespan
 $creationdate
 $changedate
 $multiplechoice
 $anonymous
 $changeable
 $visible
 $resultvisibility
 $namesvisibility
 $isInUse
 $state
 $objectID
 $rangeID
 $authorID
 $voteDB
- Data Fields inherited from StudipObject
 $objectID
 $authorID
 $rangeID
- Data Fields inherited from AuthorObject
 $errorArray
 $authorEmail
 $authorName
 $instanceof

Additional Inherited Members

- Static Public Member Functions inherited from Vote
 date2timestamp ($day, $month, $year, $hour=0, $minute=0, $second=0)

Member Function Documentation

checkConsistency ( )

Checks the consostency of the test (internal!) private

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

Here is the caller graph for this function:

executeWrite ( )

Writes the test into the database (!) public

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

getCo_Visibility ( )

Gets the way how to show the correct answers public

Returns
bool true if the correctness of answers shall be revealed to the user right after voting

Here is the caller graph for this function:

getNumberOfCorrectAnswers (   $userData = NULL)

Gets number of correct answers public

Parameters
array$userDatathe answers the user guessed
Returns
int IF param given: the number of answers the user guessed right ELSE: the total number of correct answers of the test

Here is the call graph for this function:

readVote ( )

Loads an old vote (internal!) private

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

setAnswers (   $answerArray)

Sets the answers public

Parameters
$answerArrayarray The answers. E.g. : 0 => array ( "answer_id" => "35b9dfed54c3740edcf96ece787994f3", "text" => "Monday")
Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

setCo_Visibility (   $co_visibility)

Sets the way how to show the correct answers public

Parameters
bool$co_visibilityTRUE if the correctness of answers shall be revealed to the user right after voting

Here is the caller graph for this function:

TestVote (   $oldTestID = "")

Constructor

Parameters
String$oldTestIDThe ID of an old test public

Here is the call graph for this function:

Field Documentation

bool $co_visibility

Whether the correctness shall be revealed to the user right after voting private


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