MCPcopy Index your code
hub / github.com/codecombat/codecombat / fetchReleased

Method fetchReleased

app/collections/Courses.js:21–35  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

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

Callers 2

constructorMethod · 0.80
constructorMethod · 0.80

Calls 5

isInternalMethod · 0.80
isBetaTesterMethod · 0.80
isStudentMethod · 0.80
isAdminMethod · 0.80
fetchMethod · 0.45

Tested by

no test coverage detected