humanmade / humanmade/quiz-block
Implement a Score block
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Once a quiz finishes, this plugin shows a completion screen but doesn't give you a clean way to say "you got 6 out of 10" in the layout.
To foreground that number on the results slide, we need a small block whose whole job is to render the final score. A `gfo/quiz-score` block could live inside `hmquiz/quiz-complete` and show a score label with an X/Y figure that fills in after the quiz is done.
We could ship this as an empty shell in the markup and a bit of frontend JS counts the correct answers once the completion screen appears, so authors just drop it onto the results slide and it wires itself up. Keeping it as a dedicated block means the score is placeable and styleable like any other content (as opposed to forcing a consistent position for the score).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing hmquiz/quiz-complete block and the frontend JavaScript that runs when the completion screen appears. Trace how correct answers and the final score are available, then add the gfo/quiz-score block as a placeable score label with an X/Y result. Done means the block renders on the results slide and fills in the final score after the quiz finishes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100