diff --git a/cypress/e2e/course_creation.cy.js b/cypress/e2e/course_creation.cy.js index e8120051..06a851df 100644 --- a/cypress/e2e/course_creation.cy.js +++ b/cypress/e2e/course_creation.cy.js @@ -107,7 +107,7 @@ describe("Course Creation", () => { cy.get("div").contains( "Test Course Short Introduction to test the UI" ); - cy.get(".course-image") + cy.get(".bg-cover") .invoke("css", "background-image") .should("include", "/files/profile"); }); diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 3de0da5d..faa1b726 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -40,6 +40,7 @@ declare module 'vue' { Code: typeof import('./src/components/Controls/Code.vue')['default'] CodeEditor: typeof import('./src/components/Controls/CodeEditor.vue')['default'] CollapseSidebar: typeof import('./src/components/Icons/CollapseSidebar.vue')['default'] + ColorSwatches: typeof import('./src/components/Controls/ColorSwatches.vue')['default'] CourseCard: typeof import('./src/components/CourseCard.vue')['default'] CourseCardOverlay: typeof import('./src/components/CourseCardOverlay.vue')['default'] CourseInstructors: typeof import('./src/components/CourseInstructors.vue')['default'] diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue index 3d7ce6f2..f1421537 100644 --- a/frontend/src/components/AppSidebar.vue +++ b/frontend/src/components/AppSidebar.vue @@ -344,6 +344,22 @@ const addAssignments = () => { } } +const addProgrammingExercises = () => { + if (isInstructor.value || isModerator.value) { + sidebarLinks.value.splice(3, 0, { + label: 'Programming Exercises', + icon: 'Code', + to: 'ProgrammingExercises', + activeFor: [ + 'ProgrammingExercises', + 'ProgrammingExerciseForm', + 'ProgrammingExerciseSubmissions', + 'ProgrammingExerciseSubmission', + ], + }) + } +} + const addPrograms = () => { let activeFor = ['Programs', 'ProgramForm'] let index = 1 @@ -627,6 +643,7 @@ watch(userResource, () => { isModerator.value = userResource.data.is_moderator isInstructor.value = userResource.data.is_instructor addPrograms() + addProgrammingExercises() addQuizzes() addAssignments() setUpOnboarding() diff --git a/frontend/src/components/Controls/ColorSwatches.vue b/frontend/src/components/Controls/ColorSwatches.vue new file mode 100644 index 00000000..60e21d2c --- /dev/null +++ b/frontend/src/components/Controls/ColorSwatches.vue @@ -0,0 +1,108 @@ + + diff --git a/frontend/src/components/CourseCard.vue b/frontend/src/components/CourseCard.vue index 98093808..5f086f21 100644 --- a/frontend/src/components/CourseCard.vue +++ b/frontend/src/components/CourseCard.vue @@ -1,41 +1,51 @@