diff --git a/book/_toc.yml b/book/_toc.yml index f04c1ac..6fe2561 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -22,6 +22,7 @@ parts: - caption: Cookbook chapters: - file: cookbook/recipes.md + - file: cookbook/grasple.md - file: cookbook/jupyterlite/jupyterlite sections: - file: cookbook/jupyterlite/configuration diff --git a/book/cookbook/grasple.md b/book/cookbook/grasple.md new file mode 100644 index 0000000..19d27ae --- /dev/null +++ b/book/cookbook/grasple.md @@ -0,0 +1,55 @@ +# Embedding Grasple question + +[Grasple](https://app.grasple.com/) gives you an embed code for each exercise which looks like this, which can be added cirectly to your markdown-file. +```html + +``` + +The embed link is created for an exercise under 'More'- 'Embed Exercise' + +This iframe can be embedded into your Jupyter book. Remark: it doesn't display locally in VScode or in the build file, only on the hosted version. The code shown above gives: + + +More information on Grasple and the support of TU Delft can be found on: [Teaching Support - Educational Tools - Grasple](https://www.tudelft.nl/en/teaching-support/educational-tools/grasple) + +## Replace iframe by QR code for printed version +Dani Balague Guardia created an [extension](https://github.com/dbalague/sphinx-grasple) which allows you to easily add Grasple question with some formatting and, more importantly, the creation of QR codes in the PDF version of the page. This leads to the source link of the iframe. + +The grasple exercise as shown above can now be added as follows in your markdown file: +```markdown +::::{grasple} +:url: https://embed.grasple.com/exercises/767782d5-023a-4b49-a1f3-874fca626c8e?id=79907 +:label: grasple_exercise_1 +:dropdown: +:description: Example of exercise which goes along + +:::: +``` + +This leads to the following html in the Jupyter book. Remark: again, the iframe doesn't locally in VScode or in the build file, only on the hosted version. +
Grasple Exercise 1
+Example of exercise which goes along
+ +