Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cms/djangoapps/contentstore/features/grading.feature
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,12 @@ Feature: Course Grading
And I am viewing the grading settings
When I change assignment type "Homework" to ""
Then the save button is disabled

Scenario: User can edit grading range names
Given I have opened a new course in Studio
And I have populated the course
And I am viewing the grading settings
When I change the highest grade range to "Good"
And I press the "Save" notification button
And I reload the page
Then I see the highest grade range is "Good"
13 changes: 13 additions & 0 deletions cms/djangoapps/contentstore/features/grading.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ def i_see_the_assignment_type(_step, name):
assert name in types


@step(u'I change the highest grade range to "(.*)"$')
def change_grade_range(_step, range_name):
range_css = 'span.letter-grade'
grade = world.css_find(range_css).first
grade.value = range_name


@step(u'I see the highest grade range is "(.*)"$')
def i_see_highest_grade_range(_step, range_name):
range_css = 'span.letter-grade'
grade = world.css_find(range_css).first
assert grade.value == range_name

def get_type_index(name):
name_id = '#course-grading-assignment-name'
all_types = world.css_find(name_id)
Expand Down
2 changes: 1 addition & 1 deletion cms/static/js/views/settings/settings_grading_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CMS.Views.Settings.Grading = CMS.Views.ValidatingView.extend({
// Leaving change in as fallback for older browsers
"change input" : "updateModel",
"change textarea" : "updateModel",
"change span[contenteditable=true]" : "updateDesignation",
"input span[contenteditable]" : "updateDesignation",
"click .settings-extra header" : "showSettingsExtras",
"click .new-grade-button" : "addNewGrade",
"click .remove-button" : "removeGrade",
Expand Down