Changeset 114 for Dev/trunk/classes/QuestionCreationTool.php
- Timestamp:
- 09/19/11 18:04:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/QuestionCreationTool.php
r112 r114 7 7 */ 8 8 class QuestionCreationTool { 9 10 private $list; 9 private $questions; 11 10 private $questionEditPanel; 12 11 13 public function __construct() { 12 public function __construct($questions) { 13 $this->questions = $questions; 14 14 $this->javascript(); 15 15 $this->displayList(); … … 295 295 var typeSelect = document.getElementById("questionTypeSelect"); 296 296 typeSelect.selectedIndex = 0; 297 clearSpecifications(); 297 298 } 298 299 … … 305 306 <div id="questionListWrapper"> 306 307 <select id="questionsList" size="9999"> 308 <?php $this->populateList(); ?> 307 309 </select> 308 310 </div> … … 326 328 <td id="categoryBox"><!-- Select should be filled with existing categories--> 327 329 <select id="questionCategorySelect" name="questionCategory"> 328 <option value=' Test Category'>Test Category</option>330 <option value='Uncategorized' selected='selected'>Uncategorized</option> 329 331 </select> 330 332 <!-- New category button --> … … 363 365 <?php 364 366 } 367 368 private function populateList() 369 { 370 foreach ($this->questions as $question) 371 { 372 ?> 373 <option value="<?php echo $question->code; ?>"> 374 <?php echo $question->code . " - " . $question->title; ?> 375 </option> 376 <?php 377 } 378 } 365 379 366 380 }
Note: See TracChangeset
for help on using the changeset viewer.