Ignore:
Timestamp:
12/23/11 16:37:26 (13 years ago)
Author:
jkraaijeveld
Message:

In Session: -datetime has been renamed to creationdate

Connector has been adjusted accordingly

  • Removed answersets

Added SessionInstance?: This class is for unique occurences of a session.

In SessionInstance? is a reference to the currently unimplemented ResultSet?. This class will contain all answersets and gameresults given the SessionInstance?.

File:
1 edited

Legend:

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

    r186 r195  
    2828         * function get()
    2929         * @param type $arguments : An array containing one or more of the following elements:
    30          * 'uid', 'title', 'datetime', 'applications', 'surveys', 'answersets'
     30         * 'uid', 'title', 'creationdate', 'applications', 'surveys'
    3131         */
    3232        public function get($arguments)
     
    3838                        PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
    3939                        PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
    40                         SELECT DISTINCT ?uid, ?title, ?creator, ?datetime
     40                        SELECT DISTINCT ?uid, ?title, ?creator, ?creationdate
    4141                        WHERE
    4242                        {
     
    4545                                predicates:title ?title ;
    4646                                predicates:creator ?creator ;
    47                                 predicates:datetime ?datetime ;
     47                                predicates:creationdate ?creationdate ;
    4848                                ' . $this->createArguments($arguments) . '
    4949                        }';
     
    5858                                //Create a session object out of every result, get all required fields as well.
    5959                                $pipeline = $this->getPipeline($result['?uid']->label);
    60                                 $answersets = $this->getAnswerSets($result['?uid']->label);
    6160                                $creator = $result['?creator']->label;
    6261                                $datetime = new DateTime();
    63                                 $datetime->setTimestamp(intval($result['?datetime']->label));
    64                                 $sessions[] = new Session($result['?uid']->label, $result['?title']->label, $creator, $datetime, $pipeline, $answersets);
     62                                $datetime->setTimestamp(intval($result['?creationdate']->label));
     63                                $sessions[] = new Session($result['?uid']->label, $result['?title']->label, $creator, $datetime, $pipeline);
    6564                        }
    6665                }
Note: See TracChangeset for help on using the changeset viewer.