## Forum archive 2000-2006

### Zbigniew Fiedorowicz - WeBWorK/WIMS integration

by Arnold Pizer -
Number of replies: 0
 WeBWorK/WIMS integration topic started 2/6/2003; 2:54:59 PMlast post 2/11/2003; 12:10:27 PM
 Zbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  2/6/2003; 2:58:53 PM (reads: 2077, responses: 0) Sorry about the formatting of the last message. I hope this versioncomes out better.Perhaps some of the participants of this forum might be interestedin a small project I and Steve have been working on, namelyintegrating WeBWorK with another electronic mathematicsproblem generating software platform called WIMS. WIMS isbeing developed by Xiao Gang of the University of Nice, France.WIMS has some nice features not currently available in WeBWorK,such as efficient and secure interfaces to Maxima (the freecomputer algebra system),gnuplot, ImageMagick, and more. Inparticular its graphics capabilities are appreciably superiorto those currently built into WeBWorK.Steve and I have developed some WeBWorK scripts which enableWIMS problems to be embedded into WeBWorK problems. In sucha problem, instead of a "Submit" button, there is a "Begin WIMS"button. When you click on this button, WIMS takes over controlof the page, displays its problem and grades it. When you clickon the "Return to WeBWorK" button on the page, WIMS automaticallyreports the score to WeBWorK and the WeBWorK database is updated.I have written such a problem you can try out for yourself.The problem asks the student to compute the first 4 Taylor coefficientsfor an unknown function whose graph is displayed. You can zoom inon the graph at various magnifications. Every time you enter valuesfor the coefficients, WIMS draws the graph of the correspondingpolynomial against the given graph. You are scored on the number ofattempts it takes you to find the right coefficients (which areconstrained to be integers in a given range).You can try the any of the followings URLs to try it out for yourself: Note that you will be asked for a password, but you can enter anynonempty string. (You will be logged into one of the practice accountsand then taken directly to the problem.)For some background information, you can visit the WIMS home site:http://wims.unice.fr/wims/wims.cgior our local mirrorhttp://webwork.math.ohio-state.edu/wims/wims.cgiYou might also take a look at some preliminary discussions I hadwith the WIMS developer at the following URLhttp://wims.unice.fr/wims/wims.cgi?lang=en&+module=adm%2Fforum%2Fmboard.en&+forum=1002Zig Fiedorowicz <| Post or View Comments |>
 Zbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  2/9/2003; 9:17:51 PM (reads: 2048, responses: 0) Here's another simpler example of a WIMS exercise embedded within WeBWorK. It isa problem on inverse functions and the Newton-Raphson approximation algorithm.I don't believe even this simpler example could be written as a purely WeBWorKproblem. (I'd be glad to be corected on this point, if I'm wrong.)The essence of this problem is that the student is told how close (s)he iscoming to the correct solution with each attempt (rather than just whetherthey are right or wrong). However the student's score is based on the numberof attempts it takes to get the correct solution. But the student is alsoallowed to improve their score by asking for a new version of the problem.I think that WeBWorK's design, which was constrained by the need to pregenerateall the parameters to a problem (due to slowness of Latex2Html) at the time theinstructor creates the assignment, does not allow for this type of flexibility ingrading problems.You can access the problem via any of the following URLs. You will be asked for a password, but you can use any nonempty string.Zig Fiedorowicz <| Post or View Comments |>
 Michael Gage - Re: WeBWorK/WIMS integration  2/11/2003; 8:55:09 AM (reads: 1997, responses: 0) Hi Zig, I like the examples you have put up. It wasn't clear to me from the examples whether or not the score from WIMS was being correctly transmitted back to the webwork problem (the webwork problem still read "problem not attempted") but this seems a minor glitch -- possibly due to my browser cache.As to whether you could do this in webwork. One likely approach would be to use javaScript as in example:http://webhost.math.rochester.edu/webworkdocs/ww/pgView/setMAAtutorial/javascriptexample2.pgOther problems for Newton's method are at:http://webhost.math.rochester.edu/webworkdocs/ww/listLib?command=listSet&set=setDerivatives11NewtonThese latter examples are not particularly interactive, but it would be possible to modify the answer evaluators and the grading mechanism to make it (1) give clues as to how close you are and (2) make the grade depend on the number of attempts. Both of these mechanisms are available to the instructor, one doesn't need to modify any core WeBWorK code, however, some assembly is required to program these evaluators and graders -- and the instructions, such as they are, are in some foreign language (probably PERL) :-) Documenting the construction of new answer evaluators is still an important lump on my TODO list.You correctly point out that using Latex2HTML and caching the"gif" images prevents certain types of interactive problems.In the past I've avoided this problem by using the"formatted text" mode which does not use caching atthe price that some formulas, particularly inline formulas, did not display as nicely. In version 1.8 I don't think you have to choose between interactiveness and readability. The new typeset 2 display mode uses dvipng which is lighter weight, designed for interactive use (unlike Latex2HTML) and much faster. Typeset 2 has not had lots of use so there may still be some difficulties with caching at the browser end to be worked out. I'd appreciate any feedback from anyone who runs into this kind of problem.In any case, regardless of whether one _could_ implement the problems within WeBWorK, I think it is particularly important to improve the interoperability of WeBWorK with other systems, starting with WIMS, but including many other homework generators & course management systems. If the technology is already working in one system, one should think twice before rushing to reinvent it in another system. (Sometimes there is good reason to do this, but not always.) Even if this problem can be implemented easily in WeBWorK, I'm completely convinced that there are some examples of problems which cannot easily be implemented in WeBWorK, but which require a symbolic powerhouse like Maxima or Mathematica, and technology that enables WeBWorK to interact with such a system will be invaluable. Thanks for all of the hard work.Take care,Mike <| Post or View Comments |>
 Zbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  2/11/2003; 11:16:39 AM (reads: 1997, responses: 0) Hi Mike,I sent the relevant scripts and WeBWorK modifications to you viaemail. I'd like you to add them to the CVS.Briefly here's how everything works:1) When WeBWorK needs to call WIMS, it invokes a URL handled by a short shell script wwk2wims. The appropriate WIMS parameters are attached to this URL as well as appropriate WeBWorK parameters which indicate where in WeBWorK to return to. 2) The wwk2wims shell script then passes execution to a hidden (nonpublic) installation of WIMS on the server, and redirects the output of WIMS to a Perl script wims2wwk.pl The wwk2wims script also passes some information to the wims2wwk.pl script in the environment. 3) The wims2wwk.pl script processes the output of WIMS as follows: (i) All WIMS links and forms are rewritten so that they refer to the wwk2wims script (ii) WeBWorK parameters are read from the environment and added to all the URLs and forms. (iii) All WIMS links not directly relevant to the given problem are deleted. (iv) An additional form is added, which provides a "Return to WeBWorK" button on the page. (v) If the page contains the line "Your score: ?/10", the line is rewritten as "Your score: ??%" and the WeBWorK database for the WeBWorK problem which invoked the wwk2wims script is updated with the score. 4) An additional routine connect2Wims() is added to PGbasicmacros.pl This routine, when invoked from a WeBWorK problem, adds a form to the WeBWorK problem with a "Begin WIMS" button. When this button is clicked, the wwk2wims script is invoked with the appropriate parameters. 5) Some additional global variables are defined in Global.pm. The WeBWorK script processProblem8.pl is slightly modified as follows. First of all these new global variables are exported to the environment of all WeBWorK problems. A WeBWorK problem which invokes WIMS uses these global variables to tell processProblem8.pl not to display certain information which is irrelevant and confusing in such a problem, e.g. the Submit and Preview buttons.Zig <| Post or View Comments |>
 Zbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  2/11/2003; 12:10:27 PM (reads: 2045, responses: 0) >I like the examples you have put up. It wasn't clear to me from the>examples whether or not the score from WIMS was being correctly>transmitted back to the webwork problem (the webwork problem still>read "problem not attempted") but this seems a minor glitch -->possibly due to my browser cache.In the current version of the interface, I do not have WIMS reportingback to the WeBWorK DB unless the problem is completely finished andWIMS reports a numerical score.>As to whether you could do this in webwork. >One likely approach would be to use javaScript as in example: I think the disadvantage of this would be that a student could cheatby looking at the javaScript source. Of course this would require anunusual level of computer savvy on the part of the student (or somefriend).>These latter examples are not particularly interactive, but it would be >possible to modify the answer evaluators and the grading mechanism to make >it (1) give clues as to how close you are and (2) make the grade depend on >the number of attempts. Both of these mechanisms are available to the >instructor, one doesn't need to modify any core WeBWorK code, however, some >assembly is required to program these evaluators and graders -- and the >instructions, such as they are, are in some foreign language (probably PERL) Actually I don't think it would be possible in the current version of WeBWorKto give the student the option to get a new version of the problem (with adifferent random number seed), if the student were dissatisfied with theirscore on the previous sequence of attempts. [I mean automatically withoutthe instructor's intervention.] I think this would require hacking into theWeBWorK source.>In any case, regardless of whether one _could_ implement the problems within >WeBWorK, I think it is particularly important to improve the >interoperability of WeBWorK with other systems, starting with WIMS, but >including many other homework generators & course management systems. If the >technology is already working in one system, one should think twice before >rushing to reinvent it in another system. (Sometimes there is good reason to >do this, but not always.) I agree wholeheartedly. I would also like to add that although I like theinteractive style problems which are more typical of WIMS, I intend touse them sparingly. In the setting of our large calculus classes atOSU, with limited to nonexistent computer labs, it is difficult to providestudents with adequate help on such problems.>Even if this problem can be implemented easily in WeBWorK, I'm completely >convinced that there are some examples of problems which cannot easily be >implemented in WeBWorK, but which require a symbolic powerhouse like Maxima >or Mathematica, and technology that enables WeBWorK to interact with such a >system will be invaluable.Another point that must be considered in this regard is that giving unfetteredaccess to computer algebra systems directly via WeBWorK is likely tohave undesirable security implications. Malicious hackers logging inas anonymous practice users could enter some damaging commandsinto such a system. So in the spirit of not reinventing the wheel, Iprefer to go through a system like WIMS, whose author has given considerablethought to preventing such misuse.Zig <| Post or View Comments |>