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

new message_for_blank_answer setting #496

Merged

Conversation

taniwallach
Copy link
Member

I was asked to trigger a answer feedback message on blank input boxes is some cases (ex. where DNE is needed, but a student may leave the box blank). I could not get that to work using AnswerHints as the blank_postfilter runs before AnswerHints.

A workaround was to remove all post filters and the install a modified version of the blank_postfilter which sets a message.

I am proposing adding a new setting message_for_blank_answer which can be used to provide a specific message for a blank (empty or all white-space) input box, which is a much simpler approach and easily reused.

After this PR the cmp() call can include message_for_blank_answer => "Do not leave this box empty" to set one possible message.

be used to provide a specific message for a blank (empty or all
white-space) input box, as the blank_postfilter runs before
AnswerHints so AnswerHints cannot handle this. The cmp() call
can now include
	message_for_blank_answer => "Do not leave this box empty"
to set one possible message.
@taniwallach taniwallach requested review from dpvc and drgrice1 August 18, 2020 15:33
@drgrice1
Copy link
Member

This looks good, and is not a bad idea.

@taniwallach taniwallach added this to the PG-2.16 milestone Aug 24, 2020
@Alex-Jordan Alex-Jordan merged commit 240659c into openwebwork:develop Dec 17, 2020
@taniwallach taniwallach deleted the message-for-blank-input branch February 17, 2021 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants