custom_sync_xblock_info.js 419 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
define(["js/models/xblock_info"],
    function(XBlockInfo) {
        var CustomSyncXBlockInfo = XBlockInfo.extend({
            sync: function(method, model, options) {
                options.url = (this.urlRoots[method] || this.urlRoot) + '/' + this.get('id');
                return XBlockInfo.prototype.sync.call(this, method, model, options);
            }
        });
        return CustomSyncXBlockInfo;
    });