Changeset 109


Ignore:
Timestamp:
09/19/11 15:15:22 (14 years ago)
Author:
basvannuland
Message:

existingquestions fixed

Location:
Dev/trunk/classes
Files:
2 edited

Legend:

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

    r107 r109  
    8080
    8181        $resultQuestions = $this->questionRDFReader->readQuestionCodes();
     82        $this->questionRDFReader->reloadQuestions();
    8283        if ($resultQuestions != null)
    8384        {
    8485            foreach ($resultQuestions as $questionCodeObject)
    8586            {
    86                 $questionCode = $questionCodeObject[0]['?questionCode']->label;
     87                $questionCode = $questionCodeObject['?questionCode']->label;
    8788                $questionTitle = $this->questionRDFReader->readQuestionTitle($questionCode);
    8889                $questions[$questionCode] = $questionTitle[0]['?questionTitle']->label;
  • Dev/trunk/classes/QuestionRDFReader.php

    r105 r109  
    1616        if (!is_dir($this->filePath))
    1717            mkdir($this->filePath);     
     18       
    1819    }
    1920   
     
    2829        {
    2930            return false;
     31        }
     32    }
     33   
     34    public function reloadQuestions()
     35    {
     36        // Create empty MemModel   
     37        $factory = new ModelFactory();
     38        $this->model = $factory->getDefaultModel();
     39       
     40         if(file_exists($this->filePath.'questions.rdf'))
     41        {
     42            $this->model->load($this->filePath.'questions.rdf');
    3043        }
    3144    }
Note: See TracChangeset for help on using the changeset viewer.