assignment_grade.js 637 Bytes
Newer Older
Don Mitchell committed
1
define(["backbone", "underscore"], function(Backbone, _) {
2 3
    var AssignmentGrade = Backbone.Model.extend({
        defaults : {
4
            graderType : null, // the type label (string). May be "notgraded" which implies None.
Don Mitchell committed
5
            locator : null // locator for the block
6
        },
Don Mitchell committed
7 8 9 10 11
        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'});
12 13 14 15
        }
    });
    return AssignmentGrade;
});