Changeset 113 for Dev/trunk/classes/QuestionCreationDatabaseInterface.php
- Timestamp:
- 09/19/11 16:52:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/QuestionCreationDatabaseInterface.php
r112 r113 56 56 $questionInfo = array(); 57 57 58 $questionTitleObject = $this->questionRDFReader->readQuestionTitle($qCode); 59 $questionInfo['questionTitle'] = $questionTitleObject[0]['?questionTitle']->label; 60 61 $questionDescriptionObject = $this->questionRDFReader->readQuestionDescription($qCode); 62 $questionInfo['questionDescription'] = $questionDescriptionObject[0]['?questionDescription']->label; 63 64 $questionTypeObject = $this->questionRDFReader->readQuestionType($qCode); 65 $questionInfo['questionType'] = $questionTypeObject[0]['?questionType']->label; 58 $question = $this->questionRDFReader->readQuestionByCode($qCode); 66 59 67 $questionCategoryObject = $this->questionRDFReader->readQuestionCategory($qCode); 68 $questionInfo['questionCategory'] = $questionTypeObject[0]['?questionCategory']->label; 69 70 $resultAnswers = $this->questionRDFReader->readQuestionAnswers($qCode); 71 72 if ($resultAnswers != null) 60 $questionInfo['questionTitle'] = $question['title'][0]['?questionTitle']->label; 61 $questionInfo['questionDescription'] = $question['description'][0]['?questionDescription']->label; 62 $questionInfo['questionType'] = $question['type'][0]['?questionType']->label; 63 $questionInfo['questionCategory'] = $question['category'][0]['?questionCategory']->label; 64 if ($question['answers'] != null) 73 65 { 74 for($aNumber = 1;$aNumber<=sizeof($ resultAnswers);$aNumber++)66 for($aNumber = 1;$aNumber<=sizeof($question['answers']);$aNumber++) 75 67 { 76 $questionInfo['ans'.$aNumber] = $ resultAnswers[$aNumber-1]['?answerDescription']->label;68 $questionInfo['ans'.$aNumber] = $question['answers'][$aNumber-1]['?answerDescription']->label; 77 69 } 78 70 }
Note: See TracChangeset
for help on using the changeset viewer.