surveyUID; $answers = array(); if($handle = opendir('$answerPath')) { while (false !== ($file = readdir($handle))) { if(strstr($file, 'answer_')) $answers[] = substr($file,0,strlen($file)-4); } } foreach($answers as $answer) { $this->model->load($answerPath.'/'.$answer); } } public function getAnswer($questionID) { $querystring = ' PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> SELECT ?answered WHERE { _question predicates:resource_type resources:question ; predicates:uid "'.$questionID.'" ; predicates:answered ?answered }'; $result = $this->model->sparqlQuery($querystring); return $result; } } ?>