Changeset 52
- Timestamp:
- 07/26/11 13:44:23 (14 years ago)
- Location:
- Dev/trunk
- Files:
-
- 4 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 } -
Dev/trunk/css/style.css
r51 r52 12 12 */ 13 13 14 h1 { 15 width: 100%; 16 text-align: center; 17 color: #333; 18 text-shadow: #fff 0px 0px 10px; 19 margin: 0 0 0.5em 0; 20 } 21 22 h2 { 23 margin: 0; 24 font-size: larger; 25 color: #333; 26 } 27 14 28 h3 { 15 29 margin: 0; … … 19 33 } 20 34 35 legend { 36 padding-left: 0em; 37 color: #888; 38 text-shadow: #fff 0px 0px 1px; 39 } 40 41 fieldset { 42 border: 1px solid #fff; 43 background-color: #eee; 44 -moz-border-radius: 15px; 45 border-radius: 15px; 46 margin-bottom: 2em; 47 padding: 0 1em 1em 1em; 48 -moz-box-shadow: 2px 2px 1px #888; 49 -webkit-box-shadow: 2px 2px 1px #888; 50 box-shadow: 2px 2px 1px #888; 51 } 52 21 53 root { 22 54 display: block; … … 38 70 #header { 39 71 height: 4em; 40 background-color: slategr ey;72 background-color: slategray; 41 73 } 42 74 … … 47 79 text-align: center; 48 80 line-height: 2em; 49 text-shadow: 2px 2px 2px black;81 text-shadow: #0e2933 0px 0px 5px; 50 82 } 51 83 … … 197 229 margin-top: 3em; 198 230 border-top: 1px solid #ddd; 231 text-shadow: #fff 0px 0px 1px; 199 232 } 200 233 … … 222 255 height: 10em; 223 256 } 257 258 /* ################################################################## 259 ===================== STYLESHEET OF GLORY ======================== */ 260 261 .topMargin { 262 margin-top: 2em; 263 } 264 265 .leftPadding { 266 padding-left: 2em; 267 } 268 269 .noPadding { 270 padding: 0; 271 } 272 273 .centerBoxed { 274 margin: 0 auto; 275 width: 30em; 276 text-align: center; 277 padding: 0 1em; 278 /* border: 1px solid gray;*/ 279 } 280 281 /* ################################################################## 282 ===================== STYLESHEET OF GLORY ======================== */ 283 284 .answerBox { 285 padding-left: 1em; 286 } 287 288 .textBox { 289 width: 20em; 290 } 291 292 .intBox { 293 width: 5em; 294 } 295 296 .scaleLabel { 297 display: inline; 298 color: #333; 299 } 300 301 .questionDescription { 302 font-size: small; 303 } -
Dev/trunk/survey.php
r51 r52 22 22 <head> 23 23 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 24 <title> Facilitator</title>24 <title>Survey</title> 25 25 <link rel="stylesheet" type="text/css" href="css/style.css" /> 26 26 <script type="text/javascript" src="js/menu.js"></script> -
Dev/trunk/surveycreation.php
r51 r52 18 18 $timeStamp = $_POST['timeStamp']; 19 19 20 echo 'This is what gets sent:';21 var_dump($_POST);20 // echo 'This is what gets sent:'; 21 // var_dump($_POST); 22 22 // echo '<br/><br/>'; 23 23 $surveyDBI = new SurveyDatabaseInterface($_POST['surveyID']); … … 25 25 $info = $surveyDBI->getSurveyInfo(); 26 26 // echo '<br/><br/>'; 27 echo 'This is what I get back:';28 var_dump($info);27 // echo 'This is what I get back:'; 28 // var_dump($info); 29 29 30 30 $savedSurvey = Survey::getSurvey($info);
Note: See TracChangeset
for help on using the changeset viewer.