Ignore:
Timestamp:
02/19/12 11:31:11 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Merged changes from jos-branch:268,269 to rest-dojo-ui.

Location:
Dev/branches/rest-dojo-ui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui

  • Dev/branches/rest-dojo-ui/server

    • Property svn:ignore set to
      .testpage.php.swp
      .rdfConstants.php.swp
  • Dev/branches/rest-dojo-ui/server/classes/models

    • Property svn:ignore set to
      .SurveyInstance.php.swp
      .ApplicationInstance.php.swp
      .AnswerSet.php.swp
      .Answer.php.swp
      .Question.php.swp
  • Dev/branches/rest-dojo-ui/server/classes/models/Answer.php

    r263 r271  
    1111 */
    1212class Answer extends ResearchToolObject {
     13
     14        /**
     15         * static function create()
     16         * @param type $obj : The object which should be converted to an Answer
     17         */
     18        public static function create($obj)
     19        {
     20                return new Answer($obj->uid, $obj->question, $obj->values)
     21        }
     22
    1323        public static $filename = 'data/results/answers.rdf';
    1424
     
    4050                if(is_string($this->question))
    4151                {
    42                         $result = Question::get(array("code" => $this->question));
     52                        $result = Question::get(array("uid" => $this->question));
    4353                        if(!isset($result[0]))
    4454                                return false;
     
    7383                //Query the model
    7484                $results = $model->sparqlQuery($querystring);   
    75                 //An answer can have multiple values, get all these values for the answer instances found.
     85        //An answer can have multiple values, get all these values for the answer instances found.
    7686                $answers = array();
    7787                if(!empty($results))
Note: See TracChangeset for help on using the changeset viewer.