2016-03-30 16:57:19 -04:00
|
|
|
CocoCollection = require 'collections/CocoCollection'
|
|
|
|
Level = require 'models/Level'
|
|
|
|
|
|
|
|
module.exports = class LevelCollection extends CocoCollection
|
|
|
|
url: '/db/level'
|
|
|
|
model: Level
|
2016-04-13 12:54:24 -04:00
|
|
|
|
|
|
|
fetchForClassroom: (classroomID, options={}) ->
|
2016-05-18 16:25:00 -04:00
|
|
|
options.url = "/db/classroom/#{classroomID}/levels"
|
2016-04-13 12:54:24 -04:00
|
|
|
@fetch(options)
|
|
|
|
|
|
|
|
fetchForClassroomAndCourse: (classroomID, courseID, options={}) ->
|
2016-05-18 16:25:00 -04:00
|
|
|
options.url = "/db/classroom/#{classroomID}/courses/#{courseID}/levels"
|
2016-05-13 18:32:59 -04:00
|
|
|
@fetch(options)
|
|
|
|
|
|
|
|
fetchForCampaign: (campaignSlug, options={}) ->
|
2016-05-18 16:25:00 -04:00
|
|
|
options.url = "/db/campaign/#{campaignSlug}/levels"
|
2016-04-13 12:54:24 -04:00
|
|
|
@fetch(options)
|