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

WIP: add options hideScoreBeforeSubmit, showSolutionsAfterSubmit #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwibus
Copy link

@kwibus kwibus commented Aug 28, 2023

My goal is that you only can view you score after you have submitted your answers.
see also #133

I have made a options hideScoreBeforeSubmit that enables this.

Also add option showSolutionsAfterSubmit that will make interactive book will show Solutions of all question after submit answers.

TODO

  • clean up
  • I don't like how score in written now after submit. now is:
    - chapter is redrawn.
    - then .h5p-interactive-book-summary-buttons is found and styled/focused
  • save and restore that you have submitted you answers

@otacke
Copy link

otacke commented Aug 28, 2023

@kwibus You will at least need to:

  • update the translation files to reflect the new structure of semantics.json, otherwise the editor may break in other languages than English.
  • adhere to the H5P coding style: for instance there should not be a space between a negating ! and the following expression, one should not use != but !==, use singe quotes for strings (not double quotes and not ` unless you're using a template literal, etc.
  • remove TODOs or implement them.
  • use const instead of let when a variable is not going to change (wrapper).
  • proof-read your translatable strings in semantics.json
  • add the new translatable strings to the sanitizeConfig function.

maybe you'd also want to ...

  • not use query selectors, but use variables instead - in particular if the wrapper variable is available (and automatically remove potentially confusing re-use of the same variable name in nested variable scopes) - yes, that may require rewriting something else, but you have a "TODO" attached to that part anyway.
  • ensure that the "don't show score" state is reset as well when the user resets the exercise.
  • wait for someone of the H5P core team to confirm that this feature is desired, otherwise you may waste your time (except for having some coding exercise).

@kwibus
Copy link
Author

kwibus commented Sep 8, 2023

Thanks for you fast feedback,

I think wont be hard to fix those issues.
Als I think you right in that it might be better to wait until someone of the H5P Core team confirms this is a desired feature. So I will wait on that.

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.

None yet

2 participants