|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00011 global $CFG; 00012 require_once("$CFG->libdir/form/selectgroups.php"); 00013 require_once("$CFG->libdir/questionlib.php"); 00014 00019 class MoodleQuickForm_questioncategory extends MoodleQuickForm_selectgroups { 00020 var $_options = array('top'=>false, 'currentcat'=>0, 'nochildrenof' => -1); 00021 00033 function MoodleQuickForm_questioncategory($elementName = null, $elementLabel = null, $options = null, $attributes = null) { 00034 MoodleQuickForm_selectgroups::MoodleQuickForm_selectgroups($elementName, $elementLabel, array(), $attributes); 00035 $this->_type = 'questioncategory'; 00036 if (is_array($options)) { 00037 $this->_options = $options + $this->_options; 00038 $this->loadArrayOptGroups( 00039 question_category_options($this->_options['contexts'], $this->_options['top'], $this->_options['currentcat'], 00040 false, $this->_options['nochildrenof'])); 00041 } 00042 } 00043 00044 }