MDL-46891 core_grade: Steps are not valid as element is disabled
authorRajesh Taneja <rajesh@moodle.com>
Wed, 2 Mar 2016 07:22:56 +0000 (15:22 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Fri, 11 Mar 2016 02:51:16 +0000 (10:51 +0800)
grade/edit/tree/index.php
lib/form/tests/behat/modgrade_validation.feature

index 49ab967..8384259 100644 (file)
@@ -263,7 +263,7 @@ if (!$moving) {
 if (!$moving && count($grade_edit_tree->categories) > 1) {
     echo '<br /><br />';
     echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
-    $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');
index d680313..8218293 100644 (file)
@@ -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"