Changeset 83 for Dev/trunk/classes/SurveyAnswerRDFReader.php
- Timestamp:
- 08/25/11 17:52:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SurveyAnswerRDFReader.php
r62 r83 4 4 { 5 5 protected $model; 6 protected $respondentID; 7 6 8 protected $filePath; 7 9 8 public function __construct($surveyUID,$sessionID )10 public function __construct($surveyUID,$sessionID,$respondentID) 9 11 { 10 12 … … 12 14 $factory = new ModelFactory(); 13 15 $this->model = $factory->getDefaultModel(); 14 $this->filePath = 'data/surveys/survey_'.$surveyUID . '.rdf';15 16 16 $this->model->load($this->filePath); 17 $this->respondentID = $respondentID; 18 19 $this->filePath = 'data/sessions/' . $sessionID . '/survey_'.$surveyUID . '/'; 17 20 } 18 21 19 public function loadAnsers( $userID)22 public function loadAnsers() 20 23 { 21 $this->model->load($this->filePath.'/answer_'.$this->userUID.'.rdf'); 24 if(file_exists($this->filePath.'questions.rdf')) 25 { 26 $this->model->load($this->filePath.'/answer_'.$this->respondentID.'.rdf'); 27 return true; 28 } 29 else 30 { 31 return false; 32 } 22 33 } 23 34 … … 56 67 } 57 68 58 public function getAnswer ByRespondent($respondentID)69 public function getAnswersByRespondent($respondentID) 59 70 { 60 71 $this->tempModel->loadModel($this->model);
Note: See TracChangeset
for help on using the changeset viewer.