Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown Syntax to create a quiz within a scenario #195

Merged
merged 48 commits into from
Apr 15, 2024

Conversation

PhilipAB
Copy link
Contributor

@PhilipAB PhilipAB commented Feb 7, 2024

What this PR does / why we need it:
This PR serves as an early draft aimed at introducing a quiz component within the Hobbyfarm platform. The primary motivation behind this addition is to enrich the interactive learning experience by incorporating quiz-based assessments into the Hobbyfarm scenarios. However, there is still a pending decision, whether to integrate the quiz component directly into the existing Hobbyfarm syntax for scenarios or to develop it as a standalone component.

Current Limitations
The current implementation focuses solely on the UI aspect of the quiz component, without any backend support for data persistence. As a result, while the interface for quiz interactions is operational, responses and results are not saved or tracked at this stage.

Fixes hobbyfarm/hobbyfarm#192

Here is an example on how to define a quiz in hobbyfarm markdown syntax:

~~~quiz:quiz title:3
-$title-: Question
-$type-: radio
-$validation-: detailed
-$successMsg-: correct (optional)
-$errorMsg-: wrong (optional)
- I am the first option!:()
- second!:(x)
- A third option:()
- And even a fourth (and last) one:()
---
-$title-: Second question
-$info-: helper text (optional)
-$type-: (questiontype -> radio/checkbox ... default: checkbox)
-$validation-: (default standard, options: standard, detailed or none)
- I am the first option!:()
- second!:(x)
- A third option:()
- And even a fourth (and last) one:()
---
-$title-: Third question - multiple correct answers
-$info-: helper text (optional)
-$type-: (questiontype -> radio/checkbox ... default: checkbox)
-$validation-: detailed
-$successMsg-: (success message, optional)
-$errorMsg-: (error message, optional)
- I am the first option!:(x)
- second!:(x)
- A third option:()
- And even a fourth (and last) one:()
~~~

ToDos:

  • Add another optional parameter to specify if a retry button is displayed or not
  • Change the default error/success message to something more informative
  • After validation provide an option to mark the correct answer(s) green and the wrong answer(s) red or something similar
  • Potentionally refactor code, so that quiz-radio/-checkbox component do not implement the same functionality

@PhilipAB PhilipAB marked this pull request as ready for review April 9, 2024 15:58
@jggoebel jggoebel merged commit edb8665 into hobbyfarm:master Apr 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Quizboxes markdown extension
2 participants