including restart lesson fix for lesson overview
This commit is contained in:
parent
daaf361dd2
commit
2e4e4ea716
@ -192,6 +192,7 @@ define(['jquery',
|
||||
}).done(function(lessonLink) {
|
||||
self.loadLesson(self.name);
|
||||
self.updateMenu();
|
||||
self.callPaginationUpdate();
|
||||
});
|
||||
};
|
||||
|
||||
@ -200,9 +201,14 @@ define(['jquery',
|
||||
this.lessonContentView.showTestParam(param);
|
||||
};
|
||||
|
||||
this.callPaginationUpdate = function () {
|
||||
this.lessonContentView.updatePagination();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
return Controller;
|
||||
});
|
||||
|
@ -60,6 +60,9 @@ define(['jquery',
|
||||
this.paginationControlView = new PaginationControlView(this.$contentPages,this.model.get('lessonUrl'));
|
||||
},
|
||||
|
||||
updatePagination: function() {
|
||||
this.paginationControlView.updateCollection();
|
||||
},
|
||||
|
||||
getCurrentPage: function () {
|
||||
return this.currentPage;
|
||||
@ -121,7 +124,7 @@ define(['jquery',
|
||||
markAssignmentComplete: function () {
|
||||
this.curForm.reset();
|
||||
$(this.curForm).siblings('.assignment-success').find('i').removeClass('hidden');
|
||||
this.paginationControlView.updateModel();
|
||||
this.paginationControlView.updateCollection();
|
||||
},
|
||||
|
||||
markAssignmentIncomplete: function () {
|
||||
|
@ -15,13 +15,12 @@ define(['jquery',
|
||||
initialize: function ($contentPages,baseLessonUrl) {
|
||||
this.$contentPages = $contentPages;
|
||||
this.collection = new LessonOverviewCollection();
|
||||
this.listenTo(this.collection, 'change add reset delete update', this.render);
|
||||
this.listenTo(this.collection, 'reset', this.render);
|
||||
this.numPages = this.$contentPages.length;
|
||||
this.baseUrl = baseLessonUrl;
|
||||
|
||||
this.collection.fetch();
|
||||
this.collection.fetch({reset:true});
|
||||
this.initPagination();
|
||||
this.render();
|
||||
//this.render();
|
||||
},
|
||||
|
||||
render: function (e) {
|
||||
@ -32,8 +31,8 @@ define(['jquery',
|
||||
this.hideShowNavButtons();
|
||||
},
|
||||
|
||||
updateModel: function() {
|
||||
this.collection.fetch();
|
||||
updateCollection: function() {
|
||||
this.collection.fetch({reset:true});
|
||||
},
|
||||
|
||||
bindNavButtons: function() {
|
||||
@ -142,7 +141,7 @@ define(['jquery',
|
||||
this.hideNextPageButton();
|
||||
this.showPrevPageButton;
|
||||
}
|
||||
this.model.fetch();
|
||||
this.collection.fetch({reset:true});
|
||||
},
|
||||
|
||||
decrementPageView: function() {
|
||||
@ -159,7 +158,7 @@ define(['jquery',
|
||||
this.hidePrevPageButton();
|
||||
this.showNextPageButton()
|
||||
}
|
||||
this.model.fetch();
|
||||
this.collection.fetch({reset:true});
|
||||
},
|
||||
|
||||
hideShowNavButtons: function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user