cocalc
cocalc copied to clipboard
generate student version of notebook should preserve images in markdown
- Create a notebook with images in markdown, which you copy/paste into the notebook
- Click "Generate Student Version".
- The images aren't visible.
WORKAROUND: I the notebook is a.ipynb, the images are all in a subdirectory .a.ipynb.upload
. Copy that directory into the student/ subdirectory, and then the images will appear and also get distributed. E.g., cp -rv .a.ipynb.upload student/
FIX IDEAS:
- Generate student version of a.ipynb should also copy .a.ipynb.upload
- Or, switch to instead placing images on an image server identified by a sha1 hash and then there are no image files; this is what github does -- it's pretty nice in some ways, but is also kind of horrible (e.g., abuse can be very bad, it's hard to "garbage collect", etc., i.e., you have to keep the images forever).
- Or, embed the images directly in the ipynb file using base64 encoding and the standard image attachment business. Probably this is the best solution since it works outside cocalc.
I would definitely prefer the last option.
I can confirm that this is still broken. And this is obviously a huge pain for instructors! Adding P-high, but also easy, since it's not a hard thing to fix. We just need to copy hidden directories to the student subfolder... or put images in a blob store like github and we do in sagews: https://github.com/sagemathinc/cocalc/issues/5895
I've decided to do #5895 , so this is blocked on that, and will be automatically solved by that.
fixed via implementing #5895