agricolamz / checkdown

R package for Rmarkdown for creating autocheck questions and hints
https://agricolamz.github.io/checkdown/
GNU General Public License v2.0
31 stars 2 forks source link

Rendering to PDF #12

Open elenlefoll opened 2 months ago

elenlefoll commented 2 months ago

I am a big fan of this package and have been using in an open textbook project written in Quarto. There are just a couple of issues that it would be fantastic to fix.

2) Currently, question options do not render to PDF. Would it be possible to expand the package so that the options are printed with the corresponding radio/checkbox symbols? Of course, to get feedback on their answers, students would still have to use the HTML version, but it would make for a much better reading experience if the options were printed in PDF.

Many thanks for considering these two issues. I really like all the options of your package and have made use of most of them in my textbook draft so far!

agricolamz commented 2 months ago

Hi! Thank you for the reporting! This is a known issue, and my lazy strategy around it would be to render html and Ctrl/Cmnd + P and print it to pdf. However, in order to render it beautifully to pdf, I need to write more or less the same package but using LaTeX... And I'm not sure, whether I want to... I wonder, whether author of webexercises created a trick for it...

elenlefoll commented 2 months ago

Hi! I'm aware that webexercises renders to PDF and I had thought of migrating all my quizzes to this package in order to solve this PDF issue, but I prefer your package for a two important pedagogical reasons:

  1. Possibility to have questions for which multiple answers are correct.
  2. Possibility to give both positive and negative feedback for each question.

I have tried to look at the source code of webexercises to understand how they did it and it seems that each question-type function has an ifelse function to check whether the document is being rendered to PDF or HTML to then adapt the code as necessary: https://github.com/PsyTeachR/webexercises/blob/main/R/webexercises_fns.R.