Changeset 157 for Dev/trunk/classes


Ignore:
Timestamp:
11/18/11 09:33:18 (13 years ago)
Author:
jkraaijeveld
Message:

Edited the pipelineeditor slightly so it does not error when adding a Survey.

Location:
Dev/trunk/classes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/Answer.php

    r149 r157  
    1212    /**
    1313     * Constructor for an Answer object
    14      * @param type $uid
    15      * @param type $question
    16      * @param type $values
     14     * @param type $uid : The uid of the Answer object.
     15     * @param type $question : The Question object this Answer answers.
     16     * @param type $values : An array of strings, containing the answers.
    1717     */
    1818    public function __construct($uid = null, $question = null, $values = null) {
  • Dev/trunk/classes/AnswerConnector.php

    r149 r157  
    5555                $this->load();
    5656                $keys = array_keys($arguments);
    57                 $uid = "?uid"; $question = "?question_code"; $value     = "";
     57                $uid = ""; $question = ""; $value = "";
    5858                if(in_array("uid", $keys))
    59                         $uid = '\''.$arguments["uid"].'\'';
     59                        $uid = 'predicates:uid \''.$arguments["uid"].'\'';
    6060                if(in_array("question", $keys))
    61                         $question = '\''.$arguments["question"].'\'';
     61                        $question = 'predicates:question_code \''.$arguments["question"].'\'';
    6262                if(in_array("values", $keys))
    6363                {
     
    7777
    7878                                predicates:uid ?uid ;
    79                                 predicates:question_code ?question_code;
    80 
    81                                 predicates:uid ' . $uid . '
    82                                 predicates:question_code ' . $question . '     
    83                                 ' . $value . '
     79                                predicates:question_code ?question_code ;
     80                                ' . $uid . $question . $value . '
    8481                        }';
    8582
  • Dev/trunk/classes/SessionConnector.php

    r152 r157  
    186186                $this->model->add(new Statement($resourceSession, $predicateTitle, $sessionTitle));
    187187
    188                 //$sessionTimestamp = new Literal($rToolObject->datetime->getTimestamp());
    189                 $sessionTimestamp = new Literal($rToolObject->datetime);    // Edit of above function, allows for creation of session, but still results in errors...
     188                $sessionTimestamp = new Literal($rToolObject->datetime->getTimestamp());
     189        //      $sessionTimestamp = new Literal($rToolObject->datetime);    // Edit of above function, allows for creation of session, but still results in errors...
    190190                $predicateTimestamp = new Resource(DATETIME);
    191191                $this->model->add(new Statement($resourceSession, $predicateTimestamp, $sessionTimestamp));
Note: See TracChangeset for help on using the changeset viewer.