Skip to content
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

feat: allow for quiz exports to handle images #357

Closed
wants to merge 3 commits into from

Conversation

tomwisecodes
Copy link
Contributor

Description

This allows for all of our doc exports to be able to handle export images. This work precedes the maths quiz questions work which will call on oak maths questions where the questions and answers are often in image form. The logic may also be reused in the future for adding images to slides.

How to test:
In order to test this run through the download process for a quiz and it should work with no changes

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oak-ai-lesson-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 1:41pm

Copy link

github-actions bot commented Nov 11, 2024

Playwright test results

failed  1 failed
passed  14 passed
skipped  1 skipped

Details

report  Open report ↗︎
stats  16 tests across 15 suites
duration  3 minutes
commit  ff47f35

Failed tests

Common persona › tests/aila-chat/downloads.test.ts › Downloading a completed lesson plan

Skipped tests

No persona › tests/auth.test.ts › authenticate through Clerk UI

Copy link
Collaborator

@mikeritson-oak mikeritson-oak left a comment

Choose a reason for hiding this comment

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

I've done some initial tests in Chrome and getting varying results when trying to export the resources.

  • First lesson, new, failed to export warnings on all
  • Second lesson, old, selected items downloaded
  • First lesson (retry), some downloaded then warnings again

The warnings/failures seem sporadic, some generate/download, others fail. No errors or warnings seen in the console at time of download.

SCR-20241113-klqj
SCR-20241113-kgzb

@mantagen
Copy link
Collaborator

mantagen commented Nov 18, 2024

@tomwisecodes I think importantly for this work to go in, we need it to be able to handle markdown images inline in questions or answers/distractors:

{
  question:  "Complete the statement. Triangle ABC and triangle XYZ are ____________. ![image](http://oaknationalacademy-res.cloudinary.com/image/upload/v1706110974/fukcqeavzcevgjhmm1n4.png)",
  answers: ["similar as the three interior angles are the same."],
  distractors: [
    "congruent as the three interior angles are all the same.",
    "neither similar nor congruent.",
  ],
}

Copy link
Collaborator

@mantagen mantagen left a comment

Choose a reason for hiding this comment

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

Works well!

documentId: string;
data: Data;
}) {
// The method here is too locate the placeholder in the documents, delete it, and insert the image.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// The method here is too locate the placeholder in the documents, delete it, and insert the image.
// The method here is to locate the placeholder in the documents, delete it, and insert the image.

@mantagen
Copy link
Collaborator

Closing in favour of #400

@mantagen mantagen closed this Nov 27, 2024
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.

3 participants