MCPcopy Create free account
hub / github.com/adaptlearning/adapt_framework / generateCourseGlobals

Method generateCourseGlobals

grunt/helpers/Schemas.js:113–123  ·  view source on GitHub ↗

* Copy globals schema extensions from model/extension plugins to the course._globals * schema. * @returns {Schemas} * @example * courseModelSchema.properties._globals.properties._components.properties._accordion

()

Source from the content-addressed store, hash-verified

111 * courseModelSchema.properties._globals.properties._components.properties._accordion
112 */
113 generateCourseGlobals() {
114 const courseSchema = this.getCourseSchema();
115 this.schemas.forEach(schema => {
116 const globalsPart = schema.getCourseGlobalsPart();
117 if (!globalsPart) {
118 return;
119 }
120 _.merge(courseSchema.json.properties._globals.properties, globalsPart);
121 });
122 return this;
123 }
124
125 /**
126 * Copy pluginLocations schema extensions from the extension plugins to the appropriate model schemas

Callers 1

loadMethod · 0.95

Calls 2

getCourseSchemaMethod · 0.95
getCourseGlobalsPartMethod · 0.80

Tested by

no test coverage detected