Spaces in units?

Spaces in units?

by Joshua Bragg -
Number of replies: 5
I've just set up a few questions with some of the following units.

mol
moles
mol NO2
moles NO2

The first two units are graded fine but students who put in the last two units are having their answers marked incorrect. Is the space in the unit causing the problem?

Of course I've been emphasizing to my students to label their units with what compound they are dealing with so that they don't get as easily confused later... Oh the fun.

Josh

EDIT: Sorry, we're running 1.9.3
Average of ratings: -
In reply to Joshua Bragg

Re: Spaces in units?

by Jeff Forssell -
Hi

I don't have time to check now, but I can at least write what I would test to see if it would help. Maybe quotes around the units:
"mol NO2"
"moles NO2"
would help when they include spaces.

If we aren't lucky then the students will have to write the quotes too sad

Good luck
Jeff
In reply to Jeff Forssell

Re: Spaces in units?

by Joshua Bragg -
I modified the question to include units like "mol NO2." I tried entering the answers with and without quotation marks and it still marked the answer as incorrect.

Thanks for the suggestions but no luck.
In reply to Joshua Bragg

Re: Spaces in units?

by Jeff Forssell -
Hi Josh

Since I really want to develop the numerical questions, (Be aware that the num. question gives full points if NO unit is specified but the default numerical value is correct!) I had to take a look at this.

I was rather discouraged when the "mole NO2" variant didn't help. I continued playing around and found a strange behavior that you might be able to use:

When I put in the unit as moleNO2 (with NO space) it accepted (I had 2 as the numerical answer):

2moleNO2 AND
2mole NO2
2 mole NO2

Try it out!
Jeff
In reply to Jeff Forssell

Re: Spaces in units?

by Joshua Bragg -
Thanks. That works great. That behavior will actually save me some time putting in possible variations.

I knew that if students didn't put the units in that it would count it correct. However, I want to train my students to always put in units. So I'm doing the trick to force this where you make the answer be in some unit that students would not think of but then put the units you're looking for in with the correct multiplier.


In reply to Jeff Forssell

Re: Spaces in units?

by Pierre Pichet -
The actual eliminate the spaces before testing the values.
So if you set unit as mole NO2 and the student answered mole NO2 this will be converted to mole02 and compare to mole 02 and give false result.

So don't put spaces in your units and everything will be OK as you found.

Pierre

P.S. I have created a bug on the tracker MDL-20765