|
| 1 | +import { Course, Format, LearningModule, Material } from "@/types/course"; |
| 2 | +import { mockTrailer } from "./bounty"; |
| 3 | +import { RatingCriteria } from "@/types/challenge"; |
| 4 | + |
| 5 | + |
| 6 | +export const Introduction = { |
| 7 | + text: "course intro", |
| 8 | +}; |
| 9 | + |
| 10 | +export const mockCertificateData = { |
| 11 | + narrative: "course certificate", |
| 12 | + icon: "certificate icon", |
| 13 | +}; |
| 14 | + |
| 15 | +export const Rubric = { |
| 16 | + id: "id", |
| 17 | + ref: "rubric references", |
| 18 | + created_at: new Date("2022-05-01T12:00:00Z"), |
| 19 | + updated_at: new Date("2022-05-01T12:00:00Z"), |
| 20 | + challenge: "Challenge", |
| 21 | + text: "Challenge text", |
| 22 | + type: "challenge type", |
| 23 | + order: 89, |
| 24 | + points: 90, |
| 25 | + timestamp: 73, |
| 26 | + typeSlug: "slug", |
| 27 | +}; |
| 28 | + |
| 29 | +export const mockRatingCriteria: RatingCriteria = { |
| 30 | + name: "rating criteria", |
| 31 | + order: 4, |
| 32 | + rubric: [Rubric], |
| 33 | + maxPoints: 78, |
| 34 | +}; |
| 35 | + |
| 36 | +enum MaterialType { |
| 37 | + ADDITIONAL = "ADDITIONAL", |
| 38 | + MARKDOWN = "MARKDOWN", |
| 39 | + TEXT = "TEXT", |
| 40 | + ARTICLE = "ARTICLE", |
| 41 | + "EMBEDDED-VIDEO" = "EMBEDDED-VIDEO", |
| 42 | +} |
| 43 | +export const mockMaterial: Material = { |
| 44 | + duration: 3, |
| 45 | + subtitle: "material subtitle", |
| 46 | + link: "material link", |
| 47 | + description: "material description", |
| 48 | + title: "material title", |
| 49 | + type: MaterialType.ADDITIONAL, |
| 50 | + list: [{ link: "Link 1" }], |
| 51 | +}; |
| 52 | + |
| 53 | +export const InteractiveModule = { |
| 54 | + ref: "interactive module ref", |
| 55 | + title: "interactive module title", |
| 56 | + text: "interative text", |
| 57 | + closing: { |
| 58 | + text: "closing", |
| 59 | + title: "title", |
| 60 | + }, |
| 61 | + items: [ |
| 62 | + { |
| 63 | + text: "text", |
| 64 | + title: "title", |
| 65 | + options: { |
| 66 | + text: "text", |
| 67 | + isCorrect: true, |
| 68 | + }, |
| 69 | + question: { |
| 70 | + title: "question title", |
| 71 | + answers: ["answer 1", "answer 2"], |
| 72 | + correct: 2, |
| 73 | + }, |
| 74 | + }, |
| 75 | + ], |
| 76 | +}; |
| 77 | + |
| 78 | +export const mockLearningModule: LearningModule = { |
| 79 | + id: "learningModule id", |
| 80 | + ref: "learning module reference", |
| 81 | + created_at: new Date("2022-05-01T12:00:00Z"), |
| 82 | + updated_at: new Date("2022-05-01T12:00:00Z"), |
| 83 | + duration: 4, |
| 84 | + description: "learning module description", |
| 85 | + objectives: ["objective 1, objective 2"], |
| 86 | + title: "learning module title", |
| 87 | + community: "learning module community", |
| 88 | + materials: [mockMaterial], |
| 89 | + timestamp: 3, |
| 90 | + order: 4, |
| 91 | + course: "Learning module course", |
| 92 | + interactiveModules: [InteractiveModule], |
| 93 | +}; |
| 94 | + |
| 95 | +export const mockCourse: Course = { |
| 96 | + id: "course", |
| 97 | + ref: "course ref", |
| 98 | + created_at: new Date("2022-05-01T12:00:00Z"), |
| 99 | + updated_at: new Date("2022-05-01T12:00:00Z"), |
| 100 | + duration: 3, |
| 101 | + summary: "Course description", |
| 102 | + level: 3, |
| 103 | + name: "course name", |
| 104 | + description: "Course description", |
| 105 | + objectives: ["course description", "course objectives"], |
| 106 | + locale: "English", |
| 107 | + community: "community", |
| 108 | + slug: "course description slug", |
| 109 | + introduction: Introduction, |
| 110 | + active: true, |
| 111 | + certificateIcon: "certificate", |
| 112 | + certificateData: mockCertificateData, |
| 113 | + timestamp: 0, |
| 114 | + learningModules: [mockLearningModule], |
| 115 | + trailer: mockTrailer, |
| 116 | + disclaimer: "Course", |
| 117 | + items: ["item 1", "item 2"], |
| 118 | + faq: [ |
| 119 | + { |
| 120 | + description: "faq description", |
| 121 | + title: "faq title", |
| 122 | + }, |
| 123 | + ], |
| 124 | + prerequisite: { |
| 125 | + items: ["item 1", "item 2"], |
| 126 | + hint: "prerequisite hint", |
| 127 | + }, |
| 128 | + translations: ["course translations"] |
| 129 | +}; |
| 130 | + |
| 131 | +export const mockFormat: Format = { |
| 132 | + githubLink: true, |
| 133 | + text: true, |
| 134 | + disclaimer: true, |
| 135 | +}; |
| 136 | + |
0 commit comments