skranz / RTutor

Creating interactive R Problem Sets. Automatic hints and solution checks. (Shiny or RStudio)
https://skranz.github.io/RTutor/
200 stars 57 forks source link

Duplicated exercise names cause errors #16

Closed nnpok closed 6 years ago

nnpok commented 6 years ago

Hello,

I ran into an issue you might want to be addressed more gracefully: if you have an exercise with a certain name and another exercise later in the document with the same name, the first exercise will show up with just text and no code chunks, and the second exercise won't show up at all. For example, if I do:

Exercise 1 - Labelling graphs
text1
code-chunk1

Exercise 1 - Changing axes
code-chunk2

The "Labelling graphs" exercise will show up as a tab and have text1, but won't have code-chunk1 and the "Changing axes" exercise just won't show up entirely.

Just wanted to let you know! You can replicate it here if you change "Exercise 3" to "Exercise 2" on line 126.

skranz commented 6 years ago

Thanks for the info. I updated the RTutor version and an explicit error is now thrown if two exercise names are identical before the --.