Open MartinKies opened 4 years ago
Wow thanks for the info and your many changes! I already manually incorporated the bug fixes, i.e.
I also like the new functionality for the quizzes. Your examples look cool. Still I will take some time to implement them and perhaps not implement them all. (I also made some changes to the quizzes to make them usable in RStudio here https://github.com/skranz/RTutor/commit/0ea201aebf31f2363f6953128b995a52a91cdac4)
I am particularly not sure about the following of your changes:
It is now possible to use a colon (":") in quizzes (question, success/failure message, choices, commentary [see below]) without destroying the yaml structure or having to use any escape characters.
You could also do this with regular YAML using a | after defining your string, e.g.
question: |
Here I can now ad arbitrary strings:
they can be multiline and contain :
For numbering in Rmd, you could just write 3\.
instead of 3.
to remove auto numbering. In the end there is a cost of having a customized parser in terms of compilation speed (probably not too high) and maintainability. Also it might be good to teach problem set developers how to mitigate these problems in regular YAML and regular markdown. On the other hand your custom parser makes the quiz code easier to read.
Also you probably can get rid of the rmdtools dependence, I just put it into RTutor by accident but removed it again in my commit here: https://github.com/skranz/RTutor/commit/73ba30f509b258d7a6705f2320794bf9209bff00
Using fewer packages makes everything load quicker.
Overall our forks seem to be drifting apart and it may be easier just to incorporate good changes from each other than keeping them identical. You can take a look at my changes here:
https://github.com/LeverageData/RTutor/compare/master...skranz:master
In partiuclar the improvement in the hints for dplyr chains may be quite useful to incorporate in you fork.
Thank you for your feedback! I have incorporated most of your changes into our fork and got rid of the rmdtools dependency. Especially given a possible drifting apart of the forks I find the following view a tad better: https://github.com/skranz/RTutor/compare/master..LeverageData:master Note the .. instead of the … (https://stackoverflow.com/questions/31671585/github-comparing-across-forks) which I just learned about. This way the forks are compared to as-is instead of the difference given the last branching point.
Yes both YAML and the markdown autonumbering are certainly design choices. As I expect my quizzes to be written by several persons which have to learn the syntax for the first time (think interns and short-time working students) I would much rather have them spend time on the actual quality and content of the courses themselves. My goal is therefore to have the RTutor Syntax as easy to learn and use as possible. From a general didactic point of view (say for an instructor ;) ) being as close as possible to standard syntax absolutely has its merits, I see that. This is one of the reasons why I didn't opt for a pull request.
There are two considerations however I want to highlight if you decide not to incorporate those two particular changes:
:
. Disallowing :
within the text of questions is one issue, but the commentary systems allows to write a :
as a condition (e.g. "If question is in 2:6"). There are of course ways around this (e.g. using seq) but not beinig able to write sequences with the :
operator might be confusing for the problem set developers and makes the system somewhat clunkier to use.Note my newest commit.
I have changed the structure to the yaml processing, so that the pre and post processing are separated. In this context it is now possible to use negative shorthand commentary (i.e. "Display commentary if a certain answer has not been checken"). I have further disabled yaml functionalities which I didn't know about before and made the expression !any(...) not possible as the ! got interpreted by yaml.
I just uploaded a major update to the LeverageData Fork.
The direct effects of the changes can be seen here: https://leveragedata.shinyapps.io/QuizExamples/
In particular I made the following improvements:
All changes are as backwards compatible as possible. All current problem sets should compile as previously and all additional options are stricly optional. The following caveats apply however:
Additionally I changed the commentary in deployapps so that the dataset should be in ./app instead of ./app/work. I am quite confused about this one. ./app./work worked fine until it didn't anymore for newly uploaded problem sets. I am not sure whether this was a change made by myself or by shinyapps. You might want to consider whats happening here seperately from the other changes.