- Timestamp:
- 01/13/12 13:57:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php
r230 r233 13 13 14 14 private $loadedSurvey; 15 private $dbi;16 15 17 16 public function __construct() { 18 // Set basic variables 19 // Should probably include a default empty survey for the sake of safety 20 $dbi = new DatabaseInterface(); 17 21 18 } 22 19 23 20 public function handlePost() { 24 21 // Get POSTed data and store variables to class instance properties 25 $dbi = new DatabaseInterface();22 26 23 if (isset($_POST['objectUid']) && !empty($_POST['objectUid'])) { 27 $surveyResults = $dbi->get("Survey",array("uid" => $_POST['objectUid']));24 $surveyResults = Survey::get(array("uid" => $_POST['objectUid'])); 28 25 if (!empty($surveyResults)) { 29 26 $this->loadedSurvey = $surveyResults[0]; … … 39 36 $questionString = ""; 40 37 foreach ($this->loadedSurvey->questions as $question) { 41 $questionString .= $question-> code. ",";38 $questionString .= $question->uid . ","; 42 39 } 43 40 // echo the HTML markup to display the editor on the screen
Note: See TracChangeset
for help on using the changeset viewer.