From b73e5047af90397d81ac236958795c9be1c1ebd4 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Wed, 2 Mar 2016 15:22:56 +0800 Subject: [PATCH] MDL-46891 core_grade: Steps are not valid as element is disabled --- grade/edit/tree/index.php | 2 +- .../tests/behat/modgrade_validation.feature | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/grade/edit/tree/index.php b/grade/edit/tree/index.php index 49ab967ecac..838425934d0 100644 --- a/grade/edit/tree/index.php +++ b/grade/edit/tree/index.php @@ -263,7 +263,7 @@ if (!$moving) { if (!$moving && count($grade_edit_tree->categories) > 1) { echo '

'; echo ''; - $attributes = array('id'=>'menumoveafter', 'class' => 'ignoredirty'); + $attributes = array('id'=>'menumoveafter', 'class' => 'ignoredirty singleselect'); echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter'); echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes); $OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter'); diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index d680313a7b8..8218293be30 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -64,26 +64,6 @@ Feature: Using the activity grade form element And I press "Save and display" And I should not see "You must choose whether to rescale existing grades or not" - Scenario: Attempting to change the grade type when grades already exist - Given I log in as "teacher1" - And I follow "Course 1" - And I turn editing mode on - And I add a "Assignment" to section "1" and I fill the form with: - | Assignment name | Test assignment name | - | Description | Test assignment description | - And I follow "Test assignment name" - And I follow "View/grade all submissions" - And I click on "Grade Student 1" "link" in the "Student 1" "table_row" - And I set the field "Grade out of 100" to "50" - And I press "Save changes" - And I press "Continue" - And I click on "Edit settings" "link" in the "Administration" "block" - When I expand all fieldsets - Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." - And I set the field "grade[modgrade_type]" to "Scale" - And I press "Save and display" - And I should see "You cannot change the type, as grades already exist for this item" - Scenario: Attempting to change the scale when grades already exist Given I log in as "admin" And I navigate to "Scales" node in "Site administration > Grades" @@ -116,9 +96,6 @@ Feature: Using the activity grade form element And I click on "Edit settings" "link" in the "Administration" "block" When I expand all fieldsets Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" - And I set the field "grade[modgrade_scale]" to "Letter scale" - And I press "Save and display" - And I should see "You cannot change the scale, as grades already exist for this item" Scenario: Attempting to change the maximum grade when ratings exist Given I log in as "teacher1"