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

student answers get spaces normalized #1026

Open
Alex-Jordan opened this issue Feb 29, 2024 · 0 comments
Open

student answers get spaces normalized #1026

Alex-Jordan opened this issue Feb 29, 2024 · 0 comments

Comments

@Alex-Jordan
Copy link
Contributor

In main:

$answer_value =~ s/\s+/ /g; ## remove excessive whitespace from student answer

(and at roughly the same line number in develop)

successive spaces from a student input are condensed to a single space. It might be undesirable to actually change the student's input in any way. In an exercise where this was discovered, an answer was an encrypted string using an alphabet that included the space character. With a particular seed, the answer happened to have two adjacent space characters. But because of this collapsing behavior, there was no way for the student to get it right.

I confess I cannot think of other situations where consecutive spaces would be desired, but in principle it just seems wrong to change the student's input like this.

A related issue is that even if you comment out the referenced line the "entered" string in feedback still collapses it down to one string.

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

No branches or pull requests

1 participant