MDL-46163 question/quiz: fix elements ids and their labels

This commit is contained in:
Marina Glancy 2014-07-03 14:00:40 +08:00 committed by Dan Poltawski
parent 84deaaf8bb
commit 9422f6ee42
3 changed files with 11 additions and 11 deletions

View File

@ -1045,8 +1045,8 @@ function question_category_select_menu($contexts, $top = false, $currentcat = 0,
foreach ($categoriesarray as $group => $opts) {
$options[] = array($group => $opts);
}
echo html_writer::label($selected, 'menucategory', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'category', $selected, $choose);
echo html_writer::label(get_string('questioncategory', 'core_question'), 'id_movetocategory', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'category', $selected, $choose, array('id' => 'id_movetocategory'));
}
/**

View File

@ -134,8 +134,8 @@ class category_condition extends condition {
echo \html_writer::start_div('choosecategory');
$catmenu = question_category_options($contexts, false, 0, true);
echo \html_writer::label(get_string('selectacategory', 'question'), 'category');
echo \html_writer::select($catmenu, 'category', $current, array(), array('class' => 'searchoptions'));
echo \html_writer::label(get_string('selectacategory', 'question'), 'id_selectacategory');
echo \html_writer::select($catmenu, 'category', $current, array(), array('class' => 'searchoptions', 'id' => 'id_selectacategory'));
echo \html_writer::end_div() . "\n";
}

View File

@ -35,14 +35,14 @@ Feature: A teacher can put questions in categories in the question bank
@javascript
Scenario: Move a question between categories via the question page
When I set the field "category" to "New Category 1 (1)"
When I set the field "Select a category" to "New Category 1 (1)"
And I click on "my test question" "checkbox" in the "my test question" "table_row"
And I set the field "menucategory" to "New Category 2"
And I set the field "Question category" to "New Category 2"
And I press "Move to >>"
Then I should see "my test question"
And the "category" select box should contain "New Category 2 (1)"
And the "category" select box should contain "New Category 1"
And the "category" select box should not contain "New Category 1 (1)"
And the "Select a category" select box should contain "New Category 2 (1)"
And the "Select a category" select box should contain "New Category 1"
And the "Select a category" select box should not contain "New Category 1 (1)"
@javascript
Scenario: Move a question between categories via the question settings page
@ -51,8 +51,8 @@ Feature: A teacher can put questions in categories in the question bank
And I set the field "Save in category" to "New Category 2"
And I press "id_submitbutton"
Then I should see "my test question"
And the "category" select box should contain "New Category 2 (1)"
And the "category" select box should not contain "New Category 1 (1)"
And the "Select a category" select box should contain "New Category 2 (1)"
And the "Select a category" select box should not contain "New Category 1 (1)"
@javascript
Scenario: Delete a question category