Skip to content
Snippets Groups Projects
Commit 46ea862f authored by Peter Fogg's avatar Peter Fogg
Browse files

Fix not being able to set course passing grades above 80%.

parent 36e31e10
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ var CourseGradingPolicy = Backbone.Model.extend({
}
}
}
if(_.has(attrs, 'minimum_grade_credit')) {
if(this.get('is_credit_course') && _.has(attrs, 'minimum_grade_credit')) {
var minimum_grade_cutoff = _.values(attrs.grade_cutoffs).pop();
if(isNaN(attrs.minimum_grade_credit) || attrs.minimum_grade_credit === null || attrs.minimum_grade_credit < minimum_grade_cutoff) {
return {
......
......@@ -5,6 +5,7 @@
<%namespace name='static' file='static_content.html'/>
<%!
import json
from contentstore import utils
from django.utils.translation import ugettext as _
%>
......@@ -22,7 +23,7 @@
</%block>
<%block name="requirejs">
require(["js/factories/settings_graders"], function(SettingsGradersFactory) {
SettingsGradersFactory(${course_details|n}, "${grading_url}");
SettingsGradersFactory(_.extend(${course_details|n}, {is_credit_course: ${json.dumps(is_credit_course)}}), "${grading_url}");
});
</%block>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment