WeBWorK Problems

Changing the student answer to upper case when using MultiAnswer

Re: Changing the student answer to upper case when using MultiAnswer

by Cindy Loten -
Number of replies: 0

I was trying to make the question so that students could enter their answers in lower case or upper case, but still have the preview show upper case -- more to learn how to do this than anything.  As shown in the screenshot, when I entered lower case letters, lower case letters were shown in the Entered and Answer Preview columns (we have webwork 2.15 if it matters??).  I noticed in some graph theory questions that students could use lower case or upper case letters when entering vertices or edges for their answers, but that everything displayed as upper case in the the preview table.  MultiAnswer wasn't used for these questions.  The authors made their own custom answer checkers.


I noticed that in your code the student gets an error message for using lower case letters -- I think I like this approach better.  Thanks for sharing your code with the improvements, especially the code that avoids using NchooseK for randomly selecting letters from an array.  I"ll get a lot of use out of that!