Changeset 186 for Dev/trunk/classes/SurveyConnector.php
- Timestamp:
- 12/16/11 11:19:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SurveyConnector.php
r171 r186 57 57 { 58 58 $questions = $this->getQuestions($result['?uid']->label); 59 $creator = $ this->db->get("user", array("uid" => $result['?creator']->label));59 $creator = $result['?creator']->label; 60 60 $surveys[] = new Survey($result['?uid']->label, $result['?title']->label, $result['?description']->label, $creator[0], $questions); 61 61 } … … 76 76 { 77 77 $element = $iterator->next(); 78 $result = $this->db->get("question", array("code" => $element->getLabelObject())); 79 $questions[] = $result[0]; 78 $questions[] = $element->getLabelObject(); 80 79 } 81 80 return $questions; … … 90 89 $this->load(); 91 90 91 //If evaluation fails, some references are incorrect. 92 //We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed. 93 //TODO: Decide how to fix invalid references graciously. 94 if(!$rToolObject->evaluate()) 95 return false; 96 92 97 $resourceSurvey = new Resource(SURVEY.'/'.$rToolObject->uid); 93 98 //Remove the old value stored with the given id … … 122 127 $this->model->add(new Statement($resourceSurvey,$predicateQuid,$questionUid)); 123 128 } 124 } 125 $this->save(); 129 } 130 $this->save(); 131 return true; 126 132 } 127 133 }
Note: See TracChangeset
for help on using the changeset viewer.