Stud.IP  jlu_3.3 Revision
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 ()
 
 setAnswers ($answerArray)
 
 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)
 
 executeWrite ()
 
 readVote ()
 
 setIsInUse ($isInUse)
 
 setState ($state)
 
 setCreationdate ($timestamp)
 
 setChangedate ($timestamp)
 
 getState ()
 
 checkConsistency ()
 
 sortVoteAnswerarray ($a, $b)
 
- 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

 $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 ($date, $hour=0, $minute=0, $second=0)
 

Member Function Documentation

◆ checkConsistency()

checkConsistency ( )

Checks the consostency of the test (internal!) @access private

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executeWrite()

executeWrite ( )

Writes the test into the database (!) @access public

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

◆ getCo_Visibility()

getCo_Visibility ( )

Gets the way how to show the correct answers @access 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()

getNumberOfCorrectAnswers (   $userData = NULL)

Gets number of correct answers @access 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()

readVote ( )

Loads an old vote (internal!) @access private

Exceptions
error

Reimplemented from Vote.

Here is the call graph for this function:

◆ setAnswers()

setAnswers (   $answerArray)

Sets the answers @access 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()

setCo_Visibility (   $co_visibility)

Sets the way how to show the correct answers @access 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()

TestVote (   $oldTestID = "")

Constructor

Parameters
String$oldTestIDThe ID of an old test @access public

Field Documentation

◆ $co_visibility

bool $co_visibility

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


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