Files
edx-platform/cms/static/js/models/assignment_grade.js
2023-05-09 13:53:54 +05:00

16 lines
633 B
JavaScript

define(['backbone', 'underscore'], function(Backbone, _) {
var AssignmentGrade = Backbone.Model.extend({
defaults: {
graderType: null, // the type label (string). May be "notgraded" which implies None.
locator: null // locator for the block
},
idAttribute: 'locator',
urlRoot: '/xblock/',
url: function() {
// add ?fields=graderType to the request url (only needed for fetch, but innocuous for others)
return Backbone.Model.prototype.url.apply(this) + '?' + $.param({fields: 'graderType'});
}
});
return AssignmentGrade;
});