@stackfactor/client-api 1.1.65 → 1.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/learningContent.js +8 -0
- package/package.json +1 -1
package/lib/learningContent.js
CHANGED
|
@@ -80,25 +80,33 @@ const discardLearningContentChanges = (id, token) => {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Generate the learning activity content
|
|
83
|
+
* @param {String} learningObjectives
|
|
83
84
|
* @param {String} skillId
|
|
84
85
|
* @param {String} microSkillId
|
|
85
86
|
* @param {Object} learningActivity
|
|
87
|
+
* @param {List<String>} otherLearningActivities
|
|
86
88
|
* @param {List<String>} sections
|
|
87
89
|
* @param {String} token
|
|
88
90
|
*/
|
|
89
91
|
const generateLearningActivityContent = (
|
|
92
|
+
learningObjectives,
|
|
90
93
|
skillId,
|
|
91
94
|
microSkillId,
|
|
92
95
|
learningActivity,
|
|
96
|
+
otherLearningActivities,
|
|
93
97
|
sections,
|
|
94
98
|
token
|
|
95
99
|
) => {
|
|
96
100
|
return new Promise(function (resolve, reject) {
|
|
97
101
|
const requestData = {
|
|
102
|
+
learningObjectives: learningObjectives,
|
|
98
103
|
learningActivity: learningActivity,
|
|
99
104
|
microSkillId: microSkillId,
|
|
100
105
|
sections: sections,
|
|
101
106
|
};
|
|
107
|
+
if (otherLearningActivities) {
|
|
108
|
+
requestData.otherLearningActivities = otherLearningActivities;
|
|
109
|
+
}
|
|
102
110
|
const request = client.post(
|
|
103
111
|
`api/v1/learningcontent/generatelearningactivitycontent/${skillId}`,
|
|
104
112
|
requestData,
|