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

Function makeCourse

test/app/factories.ozar.js:35–47  ·  view source on GitHub ↗
(attrs, sources)

Source from the content-addressed store, hash-verified

33module.exports = {
34
35 makeCourse(attrs, sources) {
36 if (sources == null) { sources = {}; }
37 const _id = _.uniqueId('course_');
38 attrs = _.extend({}, {
39 _id,
40 name: _.string.humanize(_id),
41 releasePhase: 'released',
42 concepts: []
43 }, attrs);
44
45 if (attrs.campaignID == null) { attrs.campaignID = (sources.campaign != null ? sources.campaign.id : undefined) || _.uniqueId('campaign_'); }
46 return new Course(attrs);
47 },
48
49 makeCourseObject(attrs, sources) {
50 if (sources == null) { sources = {}; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected