This hotfix patches the functionality of the GridFS PR
by dismissing the error msg when the user uploads a large
file and fails, then uploads a regular file. This
includes a Jasmine test to cover this case.
This commit puts a limit on the size of files that
course staff can upload to MongoDB. The limit is
enforced on the frontend in javascript as well
as backend via the /upload endpoint.
The limit is hard-coded in cms/envs/common.py and
may be changed according to the user's custom
needs.
If the user tries to upload a file that's too
large, an error message will pop up, with a
customizable url that pointing the user to an
external page with an alternate upload procedure.
This url is specified im cms/envs/common.py.
If not set, this url will not be displayed.
These changes implement STUD-813. The commit consists of the
following logical changes:
- a REST API has been implemented for a course's assets
- the page itself now fetches the assets client-side
- the Backbone.Paginator library is used to support pagination
- the AssetCollection has been refactored to extend
Backbone.Paginator.requestPager so that it can be paged
- an abstract PagingView class has been added to generalize
the communication with a paging REST API
- the AssetsView has been reimplemented to extend PagingView
- two new child views have been added:
- PagingHeader: the paging controls above the list of assets
- PagingFooter: the paging controls below the assets