MDL-27631 question bank Show question text in the question list when top level category is used
This commit is contained in:
@@ -1181,13 +1181,13 @@ class question_bank_view {
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
protected function display_options($recurse = 1, $showhidden = false, $showquestiontext = false) {
|
||||
protected function display_options($recurse, $showhidden, $showquestiontext) {
|
||||
echo '<form method="get" action="edit.php" id="displayoptions">';
|
||||
echo "<fieldset class='invisiblefieldset'>";
|
||||
echo html_writer::input_hidden_params($this->baseurl, array('recurse', 'showhidden', 'showquestiontext'));
|
||||
$this->display_category_form_checkbox('recurse', get_string('recurse', 'quiz'));
|
||||
$this->display_category_form_checkbox('showhidden', get_string('showhidden', 'quiz'));
|
||||
$this->display_category_form_checkbox('qbshowtext', get_string('showquestiontext', 'quiz'));
|
||||
echo html_writer::input_hidden_params($this->baseurl, array('recurse', 'showhidden', 'qbshowtext'));
|
||||
$this->display_category_form_checkbox('recurse', $recurse, get_string('recurse', 'quiz'));
|
||||
$this->display_category_form_checkbox('showhidden', $showhidden, get_string('showhidden', 'quiz'));
|
||||
$this->display_category_form_checkbox('qbshowtext', $showquestiontext, get_string('showquestiontext', 'quiz'));
|
||||
echo '<noscript><div class="centerpara"><input type="submit" value="'. get_string('go') .'" />';
|
||||
echo '</div></noscript></fieldset></form>';
|
||||
}
|
||||
@@ -1195,10 +1195,10 @@ class question_bank_view {
|
||||
/**
|
||||
* Print a single option checkbox. Used by the preceeding.
|
||||
*/
|
||||
protected function display_category_form_checkbox($name, $label) {
|
||||
protected function display_category_form_checkbox($name, $value, $label) {
|
||||
echo '<div><input type="hidden" id="' . $name . '_off" name="' . $name . '" value="0" />';
|
||||
echo '<input type="checkbox" id="' . $name . '_on" name="' . $name . '" value="1"';
|
||||
if (optional_param($name, false, PARAM_BOOL)) {
|
||||
if ($value) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
echo ' onchange="getElementById(\'displayoptions\').submit(); return true;" />';
|
||||
|
||||
Reference in New Issue
Block a user