(options)
| 19 | } |
| 20 | |
| 21 | fetchReleased (options) { |
| 22 | if (options == null) { options = {} } |
| 23 | if (options.data == null) { options.data = {} } |
| 24 | if (me.isInternal()) { |
| 25 | options.data.fetchInternal = true // will fetch 'released', 'beta', and 'internalRelease' courses |
| 26 | } else { |
| 27 | options.data.releasePhase = 'released' |
| 28 | if (me.isBetaTester() || me.isStudent() || me.isAdmin()) { |
| 29 | // Teacher beta testers, or any students (since students might be in teacher beta tester's classrooms) will get beta courses |
| 30 | options.data.fetchBeta = true // will fetch 'released' and 'beta' courses |
| 31 | } |
| 32 | } |
| 33 | options.data.cacheEdge = true |
| 34 | return this.fetch(options) |
| 35 | } |
| 36 | } |
| 37 | Courses.initClass() |
| 38 | return Courses |
no test coverage detected