Changeset 52 for Dev/trunk/classes/SurveyTool.php
- Timestamp:
- 07/26/11 13:44:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SurveyTool.php
r51 r52 37 37 private function displayDescription() { 38 38 ?> 39 <p ><?php echo $this->survey->description; ?></p>39 <p class='centerBoxed'><?php echo $this->survey->description; ?></p> 40 40 <?php 41 41 } … … 49 49 50 50 private function displayQuestion($question, $numQ) { 51 echo "<fieldset>"; 51 52 $this->displayQuestionTitle($question); 52 53 $this->displayQuestionDescription($question); 53 54 $this->displayAnswerBox($question, $numQ); 55 echo "</fieldset>"; 54 56 } 55 57 56 58 private function displayQuestionTitle($question) { 57 59 ?> 58 < h2><?php echo $question->title; ?></h2>60 <?php echo "<legend><h2>" . $question->title . "</h2></legend>"; ?> 59 61 <?php 60 62 } … … 62 64 private function displayQuestionDescription($question) { 63 65 ?> 64 <p><?php echo $question->description; ?></p>66 <p><?php echo "<div class='questionDescription noPadding'>" . $question->description . "</div>"; ?></p> 65 67 <?php 66 68 } 67 69 68 70 private function displayAnswerBox($question, $numQ) { 71 echo "<div class='answerBox'>"; 69 72 switch ($question->type) { 70 73 case 'text': 71 72 74 ?> 75 <input type="text" name="<?php echo 'q' . $numQ . 'ans1' ?>" value="" class="textBox"/> 76 <?php 73 77 break; 74 78 case 'int': 75 76 79 ?> 80 <input type="text" name="<?php echo 'q' . $numQ . 'ans1' ?>" value="" class="intBox"/> 81 <?php 77 82 break; 78 83 case 'mc': … … 92 97 break; 93 98 case 'scale': 94 95 99 ?> 100 <div class="scaleLabel"><?php echo $question->answers[1]; ?></div> 101 <?php 102 for ($i = 1; $i < $question->answers[3] + 1; $i++) { 103 ?><input type="radio" class="scaleRadio" name="<?php echo 'q' . $numQ . 'ans1' ?>" value="<?php echo $i;?>"/><?php } ?> 104 <div class="scaleLabel"><?php echo $question->answers[2]; ?></div> 105 <?php 96 106 break; 97 107 default: 98 108 break; 99 109 } 110 echo "</div>"; 100 111 } 101 112 102 113 private function submitSurvey() { 103 114 ?> 104 <input type="submit" value="Submit survey!" />115 <input type="submit" value="Submit survey!" class="topMargin surveyButton bigSurveyButton"/> 105 116 <?php 106 117 }
Note: See TracChangeset
for help on using the changeset viewer.