-
Notifications
You must be signed in to change notification settings - Fork 68
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
Can parts of the grader.check() output be hidden without hiding the entire test? #616
Comments
I think this would be very useful as well and I started this work in #536, but won't have time to pick that up in another few months unfortunately. Help welcome! |
Thanks @aaronsmoore, that looks great! I would definitely be interested in seeing the details. |
All credit to the D102 team for this method. You'll use the following function to hash students' answers. import hashlib
def get_hash(num):
"""Helper function for assessing correctness"""
return hashlib.md5(str(num).encode()).hexdigest() The general workflow looks something like this. There are some other considerations for multiple-answer questions such as sorting the student answer list/numpy array so it lines up with the hashed answer. Let me know if you have any questions about this. |
Hi @aaronsmoore, Thanks so much for the suggestion. It was really helpful and easy to implement. Here's an example use from our first-year physics course: |
I hope the hashing solution temporarily helps with this issue @jake-bobowski. Since this seems like the same ask as #419, I'm going to de-dupe it in favor of that one. |
Is it possible to hide parts of the output from grader.check() and display only a custom failure_message?
Here is screenshot of an example configuration notebook:
There is a single multiple-choice question and students should enter 'a' as the answer. Here's what students see in their notebooks when entering a valid, but incorrect response.
I've set a custom failure_message that, in this case, says "Please try again". The output of grader.check() reveals the correct answer by displaying "a1_1.lower() == 'a'". Is it possible to hide parts of this output while displaying only the custom failure_message? I'd like students to know that they've entered an incorrect response without revealing the correct answer. In this toy example, the failure_message is not useful, but it could be setup to provide valuable feedback/hints in a real-life example.
Thanks!
Jake
@Jaymes92 @jake-bobowski
The text was updated successfully, but these errors were encountered: