| 
    Stud.IP
    2.4 Revision 48548
    
   | 
  
Namespaces | |
| namespace | vote | 
Functions | |
| printJSfunctions () | |
| printFormStart ($voteID, $rangeID, $referer) | |
| printTitleField ($title="") | |
| printQuestionField ($question="") | |
| printAnswerFields ($answers) | |
| printRightRegion () | |
| printRuntimeSettings ($startMode="manual", $stopMode="manual", $startDate, $stopDate, $timeSpan) | |
| printProperties ($multipleChoice, $resultVisibility, $co_visibility, $anonymous, $namesVisibility, $changeable) | |
| printFormEnd () | |
| image_if_true ($option) | |
Variables | |
| global | $type | 
| global | $vote | 
| global | $pageMode | 
| image_if_true | ( | $option | ) | 
prints a cross image or a blank image
public
| bool | $option | the condition | 


| printAnswerFields | ( | $answers | ) | 
prints the answer fields table for current vote
public
| array | $answers | the vote's answers, if existing, e.g.: array( array( "answer_id" => "35b9dfed54c3740edcf96ece787994f3", "text" => "This is my answer", "counter" => 7, "correct" => YES ), array( "answer_id" => ... , .. ) ) | 

| printFormEnd | ( | ) | 
prints the end of the edit form ... closes
public

| printFormStart | ( | $voteID, | |
| $rangeID, | |||
| $referer | |||
| ) | 
prints the start of the edit form and errors, if any ... opens
  | 

| printJSfunctions | ( | ) | 
prints needed javascript functions...
public
| printProperties | ( | $multipleChoice, | |
| $resultVisibility, | |||
| $co_visibility, | |||
| $anonymous, | |||
| $namesVisibility, | |||
| $changeable | |||
| ) | 
prints the table for the vote's properties
public
| bool | $multipleChoice | whether multiple answers are allowed | 
| int | $resultVisibility | see VOTE_RESULTS_* | 
| bool | $co_visibility | whether the user sees the correct answers right after voting (only if test) | 
| bool | $anonymous | whether the vote is being treated anonymously or not | 
| bool | $changeable | whether the user is allowed to change a given answer (only if not anonymous) | 

| printQuestionField | ( | $question = "" | ) | 
prints the question field for current vote
public
| string | $question | the vote's question, if existing | 

| printRightRegion | ( | ) | 
prints the right-hand-side region of the page, with a nice infobox and save/cancel buttons
public

| printRuntimeSettings | ( | $startMode = "manual",  | 
        |
$stopMode = "manual",  | 
        |||
| $startDate, | |||
| $stopDate, | |||
| $timeSpan | |||
| ) | 
prints the tables for the runtime settings (start date, stop date...)
public
| string | $startMode | should be "manual" or "timeBased" | 
| string | $stopMode | should be "manual" or "timeBased" or "timeSpanBased" | 
| int | $startDate | a unix timestamp for the vote's start date | 
| int | $stopDate | a unix timestamp for the vote's stop date | 
| int | $timeSpan | a timespan for the vote in seconds | 

| printTitleField | ( | $title = "" | ) | 
prints the title field for current vote
public
| string | $title | the vote's title, if existing | 

| global $pageMode | 
| int $type | 
is either "vote" or "test" private
| Vote $vote | 
the vote object private