CLASSROOMIO-T-193: Exercise Templates for HTML
CLASSROOMIO-T-193: Convert to single quotes CLASSROOMIO-T-193: Resolved Feedbacks landing page improvement add spacing on mobile for notes in lms little bug fixes in lms CLASSROOMIO-T-193: return the array Simplify template generation CLASSROOMIO-T-193: Styling improvement CLASSROOMIO-T-193: Exercise Templates for HTML Co-authored-by: Rotimi Best <[email protected]> Co-authored-by: Tunji Adeyemi <[email protected]> Merge-request: CLASSROOMIO-MR-88 Merged-by: Best Admin <[email protected]>
This commit is contained in:
committed by
Space Cloud
co-authored by
Rotimi Best
parent
e57bd4a4bf
commit
849154711b
@@ -1,4 +1,5 @@
|
||||
import type { CustomQuestionType } from '$lib/utils/types';
|
||||
import type { ExerciseTemplate } from '$lib/utils/types';
|
||||
|
||||
export const QuestionTypes: CustomQuestionType[] = [
|
||||
{
|
||||
@@ -14,3 +15,13 @@ export const QuestionTypes: CustomQuestionType[] = [
|
||||
label: 'TEXTAREA'
|
||||
}
|
||||
];
|
||||
|
||||
export function calculateTotalPoints(template: ExerciseTemplate): number {
|
||||
let totalPoints = 0;
|
||||
|
||||
template.questionnaire.questions.forEach((question) => {
|
||||
totalPoints += question.points;
|
||||
});
|
||||
|
||||
return totalPoints;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user