Westmont-CS130 / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
1 stars 0 forks source link

Spelled out Units are not counted as correct #5

Open ProfessorLassonde opened 10 years ago

ProfessorLassonde commented 10 years ago

If an Homework Set problem requires units, then it will accept the abbreviation (such as ft) but not the spelled out word (such as feet)

SonicSnapshot commented 10 years ago

Investigating this one

SonicSnapshot commented 10 years ago

Found some stuff on how Webwork works with Units. Led me to the function num_cmp. Which I cannot for the life of me find the root of. It doesnt seem to be a perl funciton, but something that is made in webwork. Found this article about it http://webwork.maa.org/wiki/Num_cmp#.VGVZ29Ys2lE The more I read about it the more it seems like this isnt going to be fixable. We will see. The files that my search led me too were /opt/webwork/webwork2/conf/defaults.config and /opt/webwork/webwork2/bin/convert-functions.pl I'll keep digging, but I feel like I'm at a dead end right now. Any help would be appreciated.

ProfessorLassonde commented 10 years ago

Nice digging. Looks like it's not in /opt/webwork/webwork2, but rather check out /opt/webwork/pg/macros/PGnumericevaluators.pl for "sub num_cmp"

-Nick

On Nov 13, 2014, at 9:44 PM, SonicSnapshot notifications@github.com wrote:

Found some stuff on how Webwork works with Units. Led me to the function num_cmp. Which I cannot for the life of me find the root of. It doesnt seem to be a perl funciton, but something that is made in webwork. Found this article about it http://webwork.maa.org/wiki/Num_cmp#.VGVZ29Ys2lE The more I read about it the more it seems like this isnt going to be fixable. We will see. The files that my search led me too were /opt/webwork/webwork2/conf/defaults.config and /opt/webwork/webwork2/bin/convert-functions.pl I'll keep digging, but I feel like I'm at a dead end right now. Any help would be appreciated.

— Reply to this email directly or view it on GitHub.

SonicSnapshot commented 10 years ago

Thank you! Sweet. For some reason I forgot that there were other folders in webwork other than webwork2, probably because we have almost exclusively been working from the webwork2 folder. I'll check out that file. Thanks again.

SonicSnapshot commented 10 years ago

I have found it. /opt/webwork/pg/lib/units.pm Huzzah. After looking at it more, this probably wouldnt be the most optimal place to make this change, because this is where it stores all of the converstions between units, so it seems like I would have to add "new" units (which would really just be the unabbreviated units). I'll keep looking.