diff --git a/backend/src/interfaces/learning-content.ts b/backend/src/interfaces/learning-content.ts index a558dd9c..997865ef 100644 --- a/backend/src/interfaces/learning-content.ts +++ b/backend/src/interfaces/learning-content.ts @@ -26,7 +26,7 @@ export interface LearningObjectNode { transitions: Transition[]; created_at: string; updatedAt: string; - done?: boolean; // true if a submission exists for this node by the user for whom the learning path is customized. + done?: boolean; // True if a submission exists for this node by the user for whom the learning path is customized. } export interface LearningPath { diff --git a/backend/src/services/learning-paths/database-learning-path-provider.ts b/backend/src/services/learning-paths/database-learning-path-provider.ts index d804ad64..2a784daf 100644 --- a/backend/src/services/learning-paths/database-learning-path-provider.ts +++ b/backend/src/services/learning-paths/database-learning-path-provider.ts @@ -99,7 +99,7 @@ async function convertNodes(nodesToLearningObjects: Map !personalizedFor || isTransitionPossible(trans, lastSubmission)) // If we want a personalized learning path, remove all transitions that aren't possible. - .map((trans, i) => convertTransition(trans, i, nodesToLearningObjects)), // then convert all the transition + .map((trans, i) => convertTransition(trans, i, nodesToLearningObjects)), // Then convert all the transition }; }) .toArray(); diff --git a/backend/src/services/learning-paths/learning-path-personalization-util.ts b/backend/src/services/learning-paths/learning-path-personalization-util.ts index 9217fa34..df268735 100644 --- a/backend/src/services/learning-paths/learning-path-personalization-util.ts +++ b/backend/src/services/learning-paths/learning-path-personalization-util.ts @@ -20,9 +20,9 @@ export async function getLastSubmissionForCustomizationTarget(node: LearningPath }; if (pathFor.type === 'group') { return await submissionRepo.findMostRecentSubmissionForGroup(learningObjectId, pathFor.group); - } else { + } return await submissionRepo.findMostRecentSubmissionForStudent(learningObjectId, pathFor.student); - } + } diff --git a/backend/src/services/learning-paths/learning-path-service.ts b/backend/src/services/learning-paths/learning-path-service.ts index c204872c..f2372672 100644 --- a/backend/src/services/learning-paths/learning-path-service.ts +++ b/backend/src/services/learning-paths/learning-path-service.ts @@ -26,7 +26,7 @@ const learningPathService = { const userContentLearningPaths = await databaseLearningPathProvider.fetchLearningPaths(userContentHruids, language, source, personalizedFor); const nonUserContentLearningPaths = await dwengoApiLearningPathProvider.fetchLearningPaths(nonUserContentHruids, language, source, personalizedFor); - let result = (userContentLearningPaths.data || []).concat(nonUserContentLearningPaths.data || []); + const result = (userContentLearningPaths.data || []).concat(nonUserContentLearningPaths.data || []); return { data: result,