Exam Builder

OmR's picture

When creating short-answer (mathematic's) questions in a quiz we use 2 lines of code

*to get an input field in the generated quiz* 
*to apply the mupad/maple procedure to test the response obtained in the previous input field*
GradeProc: givecredit(response= ...)

For Maple, the givecredit function is defined in two files: gradeprocs.def (wich contains the definitions) and gradeprocs.m (compiled definitions in maple binary format).  In the file gradeprocs.def we can find other grading procedures. I tried the comparestr procedure in maple, it detects if a specified word (1rst argument) belongs to a list of given words (next arguments).  Could we obtain an example of such a use in a quiz?.
We could then grade vocabulary questions.

Thank you in advance,



The Exam Builder help

The Exam Builder help includes the sample quiz ebinputfield.tex (and .qiz) that is located just after the example in Chapter 4 of the Exam Builder help.  There is also an example in the Quizzes directory in the quiz NewFeatures.tex (and .qiz).

OmR's picture

Thank you George for trying

Thank you George for trying to help me,

I already saw this example (the one in the Newfeatures.qiz is the same as in the chapter 4).  My english is maybe not clear but this useful procedure (givecredit) is not the one I required help for.  My problem is the "comparestr" procedure located in the gradeproc.def. This maple code return true or false if a word belongs to a list. I didn't succeed to use it.

If anyone has already used this procedure, let me know.
In other words, can we grade an open vocabulary question?






Post a sample of what you are

Post a sample of what you are trying to do.  Also, it would be helpful to post a sample question you want to ask and an expected valid response.

Stid-Grenoble's picture

Hi George, Ok, let's have an

Hi George, Ok, let's have an example: I want to test the simple computation: how much is  2x2? If the student responds 2x2 in the inputfield, the student will get his point by the "givecredit" procedure, with no effort of calculation. Maple/ Mupad tests the equality of two mathematical expressions, no matter if the expressions are the same. To prevent this, I want to verify if the multiply character "x" is present in the student's response. Am I right? In the file gradeproc.def  there is another procedure, instead of "givecredit", named "comparestr" to compare strings. This clearly indicates, and the code really does it in Maple,  that this procedure is built to test if a string is present in a list of strings. (I have successfully tested this procedure in Maple and converted it to Mupad) Despite all my efforts, I didn't succeed to use it through SWP, neither with Maple nor Mupad kernel. I don't understand how the parameters are transmited to Maple/Mupad. Thank you in advance for your interest, Olivier