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

Images from exercise descriptions are not exported under certain conditions #9823

Open
chrisknedl opened this issue Nov 19, 2024 · 1 comment · May be fixed by #10070
Open

Images from exercise descriptions are not exported under certain conditions #9823

chrisknedl opened this issue Nov 19, 2024 · 1 comment · May be fixed by #10070
Labels
bug exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module

Comments

@chrisknedl
Copy link
Contributor

chrisknedl commented Nov 19, 2024

Describe the bug

In an exercise description, images can be included in the markdown text, for example
![some_image](/api/files/markdown/Markdown_2023-05-08T09-19-43-656_7ec9f47f.png).
When downloading this exercise, the image file is included in the files/ subdirectory of the exercise folder.

The issue arises when an additional tooltip-text is provided in the markdown, like this:
![some_image](/api/files/markdown/Markdown_2023-05-08T09-19-43-656_7ec9f47f.png "ShownOnHover").
In this case, the image is not part of the exercise export.

This is most likely an issue with the related regular expression.

To Reproduce

  1. Create an exercise
  2. Add an image to the exercise description (e.g. by dragging and dropping an image into the text area)
  3. Add a tooltip text as described above, e.g. "ShownOnHover"
  4. Save the exercise, and download it using the 'Download Exercise' button in the exercise's overview page
  5. Unzip it, and look inside the files/ directory. It shouldn't contain the image

Expected behavior

The image should be included in the downloaded directory.

Screenshots

n/a

Which version of Artemis are you seeing the problem on?

7.2.2

What browsers are you seeing the problem on?

Chrome, Safari

Additional context

No response

Relevant log output

No response

@chrisknedl chrisknedl added bug exercise Pull requests that affect the corresponding module labels Nov 19, 2024
@github-actions github-actions bot added exam Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module labels Nov 19, 2024
@badkeyy
Copy link
Contributor

badkeyy commented Nov 27, 2024

Can reproduce. I will have a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module
Projects
None yet
2 participants