Changeset 268
- Timestamp:
- 02/17/12 13:21:55 (13 years ago)
- Location:
- Dev/branches/jos-branch/server
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/server
-
Property
svn:ignore
set to
.testpage.php.swp
.rdfConstants.php.swp
-
Property
svn:ignore
set to
-
Dev/branches/jos-branch/server/classes/models
-
Property
svn:ignore
set to
.SurveyInstance.php.swp
.ApplicationInstance.php.swp
.AnswerSet.php.swp
.Answer.php.swp
.Question.php.swp
-
Property
svn:ignore
set to
-
Dev/branches/jos-branch/server/classes/models/Answer.php
r263 r268 40 40 if(is_string($this->question)) 41 41 { 42 $result = Question::get(array(" code" => $this->question));42 $result = Question::get(array("uid" => $this->question)); 43 43 if(!isset($result[0])) 44 44 return false; … … 73 73 //Query the model 74 74 $results = $model->sparqlQuery($querystring); 75 75 //An answer can have multiple values, get all these values for the answer instances found. 76 76 $answers = array(); 77 77 if(!empty($results)) -
Dev/branches/jos-branch/server/classes/models/AnswerSet.php
r263 r268 80 80 public function save() 81 81 { 82 //If evaluation fails, some references are incorrect. 83 //We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed. 82 //If evaluation fails, some references are incorrect. We shouldn't save in this case. 84 83 //TODO: Decide how to fix invalid references graciously. 85 84 if(!$this->evaluate()) -
Dev/branches/jos-branch/server/classes/models/Question.php
r256 r268 68 68 $model->add(new Statement($resourceQuestion,$predicateUid,$questionUid)); 69 69 70 $questionQCode = new Literal($this-> uid);70 $questionQCode = new Literal($this->code); 71 71 $predicateQCode = new Resource(QCODE); 72 72 $model->add(new Statement($resourceQuestion,$predicateQCode,$questionQCode)); … … 124 124 predicates:question_category ?category ; 125 125 '. ResearchToolObject::createArguments($arguments) . ' 126 }';126 }'; 127 127 128 128 129 129 //Create the querystring 130 130 $results = $model->sparqlQuery($querystring); 131 132 131 133 132 $questions = array(); … … 144 143 145 144 /** 146 * Gets the answers belonging to the given uid.145 * Gets the preset answers belonging to the given uid. 147 146 * @param type $uid : The uid of the Question in question (haha, pun). 148 147 */ -
Dev/branches/jos-branch/server/rdfConstants.php
r256 r268 25 25 define('RESULTSET', SURVEYTOOL_RESOURCES_NAMESPACE . 'resultset'); 26 26 define('APPLICATIONINSTANCE', SURVEYTOOL_RESOURCES_NAMESPACE . 'applicationinstance'); 27 define('SURVEYINSTANCE', SURVEYTOOL_RESOURCES_NAMESPACE . 'surveyinstance'); 27 28 28 29 // Predicates used for RDF triples … … 65 66 define('CREATIONDATE', SURVEYTOOL_PREDICATES_NAMESPACE . 'creationdate'); 66 67 define('OPEN', SURVEYTOOL_PREDICATES_NAMESPACE . 'open'); 68 define('OF_SURVEY', SURVEYTOOL_PREDICATES_NAMESPACE . 'of_survey'); 69 define('PRESET_ANSWER', SURVEYTOOL_PREDICATES_NAMESPACE . 'preset_answer'); 67 70 ?>
Note: See TracChangeset
for help on using the changeset viewer.