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

feat: short answer reset button #4

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

ArturGaspar
Copy link
Member

@ArturGaspar ArturGaspar commented Oct 16, 2024

Description

Adds a reset button to the short answer XBlock.

image

Testing instructions

  1. Enable the option
  2. Use the XBlock as a learner
  3. Test that you are able to reset the chat
  4. Disable the option
  5. Use the XBlock as a learner
  6. See that the reset button is gone

Other information

Private-ref: https://tasks.opencraft.com/browse/BB-9298

@ArturGaspar ArturGaspar force-pushed the artur/shortanswer-reset branch 4 times, most recently from 5c2def4 to 857688e Compare October 30, 2024 23:06
@@ -19,6 +19,9 @@
</div>
</div>
<div class="submit-row">
{% if self.allow_reset %}
<span id="reset-button">Reset</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think we should name this Reset Chat or Clear chat instead of just Reset so the operation is clearer.

@pkulkark
Copy link
Member

@ArturGaspar Would it be possible to activate the button only when there is an answer submitted (or chat exists). In other words, after the first submit?

@ArturGaspar ArturGaspar force-pushed the artur/shortanswer-reset branch from 857688e to 9b0babd Compare October 31, 2024 17:24
@ArturGaspar ArturGaspar force-pushed the artur/shortanswer-reset branch from 9b0babd to 9422b27 Compare October 31, 2024 17:35
Copy link
Member

@pkulkark pkulkark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

  • I tested this: verified the reset button works as expected.
  • I read through the code
  • [ ] I checked for accessibility issues
  • [ ] Includes documentation

@ArturGaspar ArturGaspar merged commit 9fa5d57 into main Nov 4, 2024
7 checks passed
@ArturGaspar ArturGaspar deleted the artur/shortanswer-reset branch November 4, 2024 11:30
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.

2 participants