daveagp / websheets

Online version of coding handouts with blanks
GNU Affero General Public License v3.0
9 stars 8 forks source link

Why non ASCII characters are not allowed in student submissions? #6

Closed dz0 closed 8 years ago

dz0 commented 9 years ago

Some examples in our uni use Lithuanian letters (non-ASCII), but websheets filters for them..

What is the reason behind this?

daveagp commented 9 years ago

You are right that the given check is not a great idea.

The main reason for the check is that students would sometimes submit code with smart quotes or non-printing blank characters and they'd get confused when it does not compile.

I'll think about doing it a better way.

daveagp commented 9 years ago

I've tried to make it only single out smart quotes and unprintable characters in the 0..255 range. take a look: https://github.com/daveagp/websheets/commit/3ca4607ae8a98674dc7b69f2f95d27ad3ecb9a9e

dz0 commented 8 years ago

"C++ call functions directly" mode still has issues (even thouhg nonascii chars are in comments) see example, http://cscircles.cemc.uwaterloo.ca/websheets/editor.php?edit=cpp/ktu/2/kelione

ps.: not urgent :)

daveagp commented 8 years ago

Thanks! Fixed by: https://github.com/daveagp/websheets/commit/3ce2a2edf16f549690f992fb611c1ba312c6262f

BTW I also tried turning on -fextended-identifiers and even upgrading to gcc 4.7 which seems as far as I can easily get on our centos 5 machine, but it still didn't seem to be possible to use accents in variable names.

dz0 commented 8 years ago

TAB's are still not allowed :/

Syntax error: Your code contains character number 9:
…() {

}

When in http://cscircles.cemc.uwaterloo.ca/websheets/?folder=cpp&start=scratch just copied TAB inside..

ps.: This usually happens when students develop programs in IDE's (for debugging purposes), and copy results back.

daveagp commented 8 years ago

Should now be fixed, e53d738868f9cb861771bfcce4910188e8b82172

dz0 commented 8 years ago

That's what could be called a quick-fix :)

daveagp commented 8 years ago

I happen to be in Waterloo for the day so I didn't have to wait for the light to travel very far :speedboat: