WeBWorK Problems

retry problem with hint and different parameters

retry problem with hint and different parameters

by Andras Balogh -
Number of replies: 3

Faculty requested the following type of problems (for remedial math classes):

If answer is incorrect, students have the option to receive hint and try the problem again several times, but with changed parameters each time.

Both the quiz feature and the Union College multipart problem seem to be close to what we want, but not close enough.

If nobody knows a better approach, then I will probably try to rewrite the Union College multipart grader.

Andras


In reply to Andras Balogh

Re: retry problem with hint and different parameters

by Davide Cervone -
You are right that the current macros are not sufficient for this. At our recent conference at AIM in August, we worked out a specification for compound problems that include the functionality that you request, but I haven't had the chance to implement it yet.

If by "multipart grader" you mean the compoundProblem macros at

http://cvs.webwork.rochester.edu/viewcvs.cgi/union_problib/examples/compoundProblem/?cvsroot=Union+College

then I think you are looking at the right code (though it is pretty complicated, and there are a number of subtleties relating to how it maintains the state of the problem across invocations). I want to be sure that you are not confusing this with the MultiPart answer evaluator (which has been renamed to MultiAnswer evaluator to avoid just this confusion).

You will need to change the random seed, and maintain that as part of the data that is passed from one invocation to the next as well, so that the student will have the same version of the problem the next time they view it.

A limitation of the current system is that the hardcopy will always produce the original version of the file, not the one the student is currently working on. That is something that needs to be changed before a completely satisfactory solution to the problem is possible.

Davide
In reply to Davide Cervone

Re: retry problem with hint and different parameters

by Andras Balogh -
Thanks Davide,

Yes, I meant the compoundProblem macros,
although I was also looking at the multiProblem.pl.

Andras

In reply to Andras Balogh

Re: retry problem with hint and different parameters

by Davide Cervone -
I just remembered that there is a macro file that is pretty close to what you want. It is in pg/macros/problemRandomize.pl, and it implements a re-randomize feature. The condition for re-randomizing isn't the one you are looking for, but you should be able to modify it for that. (I'm not sure I'll get to it for a while.)

This macro file was new at the end of the summer, so you might not have it in your copy of pg/macros. If so, you can get it from the CVS repository:

http://cvs.webwork.rochester.edu/viewcvs.cgi/pg/macros/problemRandomize.pl?cvsroot=UR+WeBWorK+System

This file is probably a better starting place than the compoundProblem macros.

Davide