Changeset 233 for Dev/branches/jos-branch/classes/widgets
- Timestamp:
- 01/13/12 13:57:41 (13 years ago)
- Location:
- Dev/branches/jos-branch/classes/widgets
- Files:
-
- 2 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 -
Dev/branches/jos-branch/classes/widgets/Toolbox.php
r230 r233 25 25 <div class="bigButton toolbox" onclick="ddMenu.Open('toolbox_m1')"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p> 26 26 <div id="toolbox_m1" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()"> 27 <a href="#" >+ Add new</a>27 <a href="#" onclick="submitToolbox('Survey')">+ Add new</a> 28 28 <a href="#">> Add existing</a> 29 29 </div> … … 34 34 <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m2')"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p> 35 35 <div id="toolbox_m2" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()"> 36 <a href="#" >+ Add new</a>36 <a href="#" onclick="submitToolbox('Application')">+ Add new</a> 37 37 <a href="#">> Add existing</a> 38 38 </div>
Note: See TracChangeset
for help on using the changeset viewer.