Closed eriq-augustine closed 6 months ago
This also extends to when a quiz variant is written out (usually during GradeScope generation).
The variant includes serialized questions which include base_dir
s.
It is not as much a problem in this case, since using compiled variants is not a task that normal users,
but it would still be great if we could make more portable serialized variants.
Making this issue more general for any non-embedded formats, e.g., GIFT, Markdown, TeX.
We have made great progress on this in 8a58282984beb7da56b5623b2f615f5d60b037ad. Different formats can now direct how images should be handled, including copying them over.
Right now, the image handling for TeX generation is a bit awkward. We take the absolute path of images (which is a fine thing to do), and use those in the TeX.
Of course, this means that the TeX is not portable, which is not necessarily wrong (other people can generate the TeX on their side). But, of course, we would like to be more portable.
We could use relative paths and copy the images over, but we may not actually know where the text is being generated. If we output to stdout, the TeX could be anywhere.
Perhaps use a --output option on parse-quiz and if that is supplied copy the images over. Otherwise, use an absolute path.