Changeset 95 for Dev/trunk/classes
- Timestamp:
- 08/31/11 15:35:10 (14 years ago)
- Location:
- Dev/trunk/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/Survey.php
r75 r95 1 1 <?php 2 2 3 /* 3 4 * To change this template, choose Tools | Templates … … 16 17 public $description; 17 18 public $questions; 18 19 public $results; 19 public $results; 20 21 const DEFAULT_DESCRIPTION = "Write a helpful description for this survey here."; 20 22 21 23 public function __construct($id, $title, $description = null) { … … 24 26 $this->description = $description; 25 27 $this->questions = array(); 26 27 28 29 $this->results = null; 28 30 } 29 30 public function addQuestion($question) 31 { 32 array_push($this->questions, $question); 33 } 34 35 public function setResults($surveyResults) 36 { 37 $this->results = $surveyResults; 38 } 31 32 public function addQuestion($question) { 33 array_push($this->questions, $question); 34 } 35 36 public function setResults($surveyResults) { 37 $this->results = $surveyResults; 38 } 39 39 40 40 public static function getSurvey($info) { … … 70 70 return $survey; 71 71 } 72 73 /** 74 * TODO: Should return Results-object from reading RDF-database 75 * @param type $surveyID 76 */ 77 public static function getResults($surveyID) 78 { 79 80 } 72 73 /** 74 * TODO: Should return Results-object from reading RDF-database 75 * @param type $surveyID 76 */ 77 public static function getResults($surveyID) { 78 79 } 81 80 82 81 } 82 83 83 ?> -
Dev/trunk/classes/SurveyTool.php
r59 r95 70 70 71 71 private function displayDescription() { 72 if ($this->survey->description != Survey::DEFAULT_DESCRIPTION) 73 $description = $this->survey->description; 74 else 75 $description = ""; 72 76 ?> 73 <p class='centerBoxed'><?php echo $ this->survey->description; ?></p>77 <p class='centerBoxed'><?php echo $description; ?></p> 74 78 <?php 75 79 } … … 97 101 98 102 private function displayQuestionDescription($question) { 103 if ($question->description != "Write a question description here.") 104 $description = $question->description; 105 else 106 $description = ""; 99 107 ?> 100 <p><?php echo "<div class='questionDescription noPadding'>" . $ question->description . "</div>"; ?></p>108 <p><?php echo "<div class='questionDescription noPadding'>" . $description . "</div>"; ?></p> 101 109 <?php 102 110 }
Note: See TracChangeset
for help on using the changeset viewer.