Skip to content

Modify reported quizzes #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Lauritz-Tieste
Copy link
Contributor

@Lauritz-Tieste Lauritz-Tieste commented Oct 28, 2024

@Lauritz-Tieste Lauritz-Tieste force-pushed the modify-reported-quizzes branch from 8dc3c42 to d8f8027 Compare February 13, 2025 15:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request modifies how reported quizzes are handled and displayed while adding new functionality for editing quiz tasks.

  • Introduces a new Quiz type and related composables.
  • Refactors the reported tasks dashboard and updates the Quiz form and dialog components.
  • Updates locales and package scripts to support new UI elements and linting functionality.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
types/courseTypes.ts Adds a new Quiz class with properties to standardize quiz data.
pages/dashboard/reported-tasks/[id].vue Refactors layout and component usage for displaying reported tasks.
package.json Adds a lint:fix script and a new dependency for Headless UI.
locales/en-US.json & locales/de.json Adds new keys for UI text related to quiz reporting.
composables/quizzes.ts Introduces functions for retrieving and updating quiz subtasks.
composables/dialogSlot.ts Provides state handling for dialogs.
components/form/Quiz.vue Implements a new quiz editing form with option management and validation.
components/DialogSlot.vue Updates dialog component using Headless UI with close functionality.
Comments suppressed due to low confidence (3)

components/form/Quiz.vue:153

  • Using pop() inside a forEach to clear the options array may lead to unpredictable behavior. It is recommended to directly assign 'options.value = arr' or use a clear method for better reliability.
arr.forEach((o: any) => { options.value.pop(); });

composables/quizzes.ts:29

  • The PATCH function is used but not imported. Ensure that PATCH is properly imported or defined to avoid runtime errors.
const res = await PATCH(`/challenges/tasks/${taskId}/multiple_choice/${subTaskId}`, body);

components/DialogSlot.vue:30

  • The @close event handler calls 'closeDialog()', but no such function is defined; it appears the intended function is 'close()'. Please update the event handler accordingly.
<Dialog as="div" class="relative z-10" @close="closeDialog()">

Copy link

Preview deployed to https://8fc5353f.academy-admin-preview.pages.dev (total size: 4.2M)

@Lauritz-Tieste Lauritz-Tieste requested a review from Defelo May 25, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifying reported quizzes
2 participants