MCPcopy Create free account
hub / github.com/codecombat/codecombat / fetchForClassroom

Method fetchForClassroom

app/collections/Prepaids.js:57–71  ·  view source on GitHub ↗
(classroom)

Source from the content-addressed store, hash-verified

55 }
56
57 fetchForClassroom (classroom) {
58 if (classroom.isOwner()) {
59 return this.fetchMineAndShared()
60 } else if (classroom.hasReadPermission()) {
61 const options = {
62 data: {
63 includeShared: true,
64 sharedClassroomId: classroom.id
65 }
66 }
67 return this.fetchByCreator(classroom.get('ownerID'), options)
68 } else {
69 return this.fetchMineAndShared()
70 }
71 }
72 }
73 Prepaids.initClass()
74 return Prepaids

Callers

nothing calls this directly

Calls 5

fetchMineAndSharedMethod · 0.95
fetchByCreatorMethod · 0.95
isOwnerMethod · 0.80
hasReadPermissionMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected