Changeset 143 for Dev/branches/jos-branch/classes/QuestionConnector.php
- Timestamp:
- 10/31/11 17:12:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/classes/QuestionConnector.php
r138 r143 59 59 $keys = array_keys($arguments); 60 60 //Set default values for arguments 61 $uid = "?uid"; $title = "?title"; $type = "?type"; $description = "?description"; $category = "?category"; 61 $uid = "?uid"; $title = "?title"; $type = "?type"; $description = "?description"; $category = "?category"; $has_answer = ""; 62 62 //Set the arguments if they are supplied 63 63 if(in_array("uid", $keys)) … … 70 70 $description = "\"".$arguments["description"]."\""; 71 71 if(in_array("category", $keys)) 72 $style = "\"".$arguments["category"]."\""; 72 $style = "\"".$arguments["category"]."\""; 73 if(in_array("answers", $keys)) 74 { 75 foreach($arguments["answers"] as $answer) 76 { 77 $has_answer = $has_answer . 'predicates:has_answer \'' . $answer . '\' '; 78 } 79 } 73 80 74 81 $querystring = ' … … 89 96 predicates:question_type ' . $type . ' 90 97 predicates:description ' . $description . ' 91 predicates:question_category ' . $category . ' 98 predicates:question_category ' . $category . ' 99 ' . $has_answer . ' 92 100 }'; 93 101 //Create the querystring
Note: See TracChangeset
for help on using the changeset viewer.