| 
    Stud.IP
    jlu_3.3 Revision
    
   | 
  
Namespaces | |
| namespace | evaluation | 
Functions | |
| checkMandatoryItems ( $item) | |
| voteFor ( $answer_id) | |
Variables | |
| if(Request::isXHR()) | $db = new EvaluationDB() | 
| $lib = new EvalShow() | |
| $rangeID = Request::option('rangeID',$SessSemName[1]) | |
| if(empty($rangeID)) | $evalID = Request::option('evalID') | 
| $tree = new EvaluationTreeShowUser( $evalID ) | |
| $eval = $tree->tree->eval | |
| $evalDB = new EvaluationDB() | |
| $isPreview = Request::option('isPreview') ? YES : NO | |
| $votedEarlier = $eval->hasVoted( $auth->auth["uid"] ) && $isPreview == NO | |
| $votedNow = Request::submitted('voteButton') && $votedEarlier == NO | |
| else | $userID = $auth->auth["uid"] | 
| $br = new HTMpty( "br" ) | |
| $form = new HTM( "form" ) | |
| if(Request::isXHR()) | else | 
| $table = new HTM( "table" ) | |
| $mandatories = checkMandatoryItems( $eval ) | |
| $answers = Request::quotedArray('answers') | |
| $layout | content_for_layout = $form->createContent() | 
| checkMandatoryItems | ( | $item | ) | 
checkMandatoryItems: put IDs of mandatory questions into global array $mandatories (or, if the user has voted, the IDs of the mandatory questions, which he did not answer to)
| object | the Evaluation object (when called externally). | 


| voteFor | ( | $answer_id | ) | 
vote for an answer of given ID
| string | the ID. | 
| $br = new HTMpty( "br" ) | 
| if (Request::isXHR()) $db = new EvaluationDB() | 
| $eval = $tree->tree->eval | 
| $evalDB = new EvaluationDB() | 
| if (empty( $rangeID)) $evalID = Request::option('evalID') | 
| $isPreview = Request::option('isPreview') ? YES : NO | 
| $lib = new EvalShow() | 
| $mandatories = checkMandatoryItems( $eval ) | 
| $rangeID = Request::option('rangeID',$SessSemName[1]) | 
| $table = new HTM( "table" ) | 
| $tree = new EvaluationTreeShowUser( $evalID ) | 
| $votedNow = Request::submitted('voteButton') && $votedEarlier == NO | 
| $layout content_for_layout = $form->createContent() | 
| if (Request::isXHR()) else |