Forum archive 2000-2006

Zbigniew Fiedorowicz - WeBWorK/WIMS integration

Zbigniew Fiedorowicz - WeBWorK/WIMS integration

by Arnold Pizer -
Number of replies: 0
inactiveTopicWeBWorK/WIMS integration topic started 2/6/2003; 2:54:59 PM
last post 2/11/2003; 12:10:27 PM
userZbigniew Fiedorowicz - WeBWorK/WIMS integration  blueArrow
2/6/2003; 2:54:59 PM (reads: 1798, responses: 6)
Perhaps some of the participants of this forum might be interested in a small project I and Steve have been working on, namely integrating WeBWorK with another electronic mathematics problem generating software platform called WIMS. WIMS is being 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 free computer algebra system),gnuplot, ImageMagick, and more. In particular its graphics capabilities are appreciably superior to those currently built into WeBWorK.

Steve and I have developed some WeBWorK scripts which enable WIMS problems to be embedded into WeBWorK problems. In such a problem, instead of a "Submit" button, there is a "Begin WIMS" button. When you click on this button, WIMS takes over control of the page, displays its problem and grades it. When you click on the "Return to WeBWorK" button on the page, WIMS automatically reports 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 coefficients for an unknown function whose graph is displayed. You can zoom in on the graph at various magnifications. Every time you enter values for the coefficients, WIMS draws the graph of the corresponding polynomial against the given graph. You are scored on the number of attempts it takes you to find the right coefficients (which are constrained to be integers in a given range). You can try the any of the followings URLs to try it out for yourself:

https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=54455&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice2&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=85522&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice3&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=34113&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice4&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=72692&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice5&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=47758&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice6&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=89138&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice7&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX Note that you will be asked for a password, but you can enter any nonempty string. (You will be logged into one of the practice accounts and then taken directly to the problem.)

For some background information, you can visit the WIMS home site: http://wims.unice.fr/wims/wims.cgi or our local mirror http://webwork.math.ohio-state.edu/wims/wims.cgi

You might also take a look at some preliminary discussions I had with the WIMS developer at the following URL http://wims.unice.fr/wims/wims.cgi?lang=en&+module=adm%2Fforum%2Fmboard.en&+forum=1002

Zig Fiedorowicz

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  blueArrow
2/6/2003; 2:58:53 PM (reads: 2077, responses: 0)
Sorry about the formatting of the last message.  I hope this version
comes out better.



Perhaps some of the participants of this forum might be interested
in a small project I and Steve have been working on, namely
integrating WeBWorK with another electronic mathematics
problem generating software platform called WIMS. WIMS is
being 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 free
computer algebra system),gnuplot, ImageMagick, and more. In
particular its graphics capabilities are appreciably superior
to those currently built into WeBWorK.



Steve and I have developed some WeBWorK scripts which enable
WIMS problems to be embedded into WeBWorK problems. In such
a problem, instead of a "Submit" button, there is a "Begin WIMS"
button. When you click on this button, WIMS takes over control
of the page, displays its problem and grades it. When you click
on the "Return to WeBWorK" button on the page, WIMS automatically
reports 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 coefficients
for an unknown function whose graph is displayed. You can zoom in
on the graph at various magnifications. Every time you enter values
for the coefficients, WIMS draws the graph of the corresponding
polynomial against the given graph. You are scored on the number of
attempts it takes you to find the right coefficients (which are
constrained to be integers in a given range).

You can try the any of the followings URLs to try it out for yourself:

https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=54455&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice2&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=85522&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice3&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=34113&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice4&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=72692&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice5&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=47758&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice6&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=89138&probNum=1&Mode=HTML_dpng&show_old_answers=1&course=math153demo&user=practice7&key=Urkd^9w09kbKtLkzTqkJGXm5IV5PD0LBDNA6FBOX

 

Note that you will be asked for a password, but you can enter any
nonempty string. (You will be logged into one of the practice accounts
and then taken directly to the problem.)




For some background information, you can visit the WIMS home site:
http://wims.unice.fr/wims/wims.cgi
or our local mirror
http://webwork.math.ohio-state.edu/wims/wims.cgi



You might also take a look at some preliminary discussions I had
with the WIMS developer at the following URL
http://wims.unice.fr/wims/wims.cgi?lang=en&+module=adm%2Fforum%2Fmboard.en&+forum=1002



Zig Fiedorowicz

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  blueArrow
2/9/2003; 9:17:51 PM (reads: 2048, responses: 0)
Here's another simpler example of a WIMS exercise embedded within WeBWorK.  It is
a problem on inverse functions and the Newton-Raphson approximation algorithm.



I don't believe even this simpler example could be written as a purely WeBWorK
problem. (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 is
coming to the correct solution with each attempt (rather than just whether
they are right or wrong). However the student's score is based on the number
of attempts it takes to get the correct solution. But the student is also
allowed 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 pregenerate
all the parameters to a problem (due to slowness of Latex2Html) at the time the
instructor creates the assignment, does not allow for this type of flexibility in
grading problems.



You can access the problem via any of the following URLs.

https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=12041&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice2 https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=95202&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice3 https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=87733&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice4 https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=35026&probNum=3&ModeHTML_dpng=&show_old_answers=1&course=math152demo&user=practice5 https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=23445&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice6&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=63510&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice7&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=69277&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice8&key=Ukrd

 

You will be asked for a password, but you can use any nonempty string.




Zig Fiedorowicz

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  blueArrow
2/9/2003; 9:48:20 PM (reads: 2046, responses: 0)
Sorry, here are the corrected URLS

https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=12041&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice2&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=95202&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice3&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=87733&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice4&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=35026&probNum=3&ModeHTML_dpng=&show_old_answers=1&course=math152demo&user=practice5&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=23445&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice6&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=63510&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice7&key=Ukrd https://webwork.math.ohio-state.edu/cgi-bin/webwork/system/cgi-scripts/processProblem8.pl?probSetKey=69277&probNum=3&Mode=HTML_dpng&show_old_answers=1&course=math152demo&user=practice8&key=Ukrd

<| Post or View Comments |>


userMichael Gage - Re: WeBWorK/WIMS integration  blueArrow
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.pg



Other problems for Newton's method are at:
http://webhost.math.rochester.edu/webworkdocs/ww/listLib?command=listSet&set=setDerivatives11Newton



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)
:-)



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 at
the 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 |>


userZbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  blueArrow
2/11/2003; 11:16:39 AM (reads: 1997, responses: 0)
Hi Mike,



I sent the relevant scripts and WeBWorK modifications to you via
email. 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 |>


userZbigniew Fiedorowicz - Re: WeBWorK/WIMS integration  blueArrow
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 reporting
back to the WeBWorK DB unless the problem is completely finished and
WIMS 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 cheat
by looking at the javaScript source. Of course this would require an
unusual level of computer savvy on the part of the student (or some
friend).



>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 WeBWorK
to give the student the option to get a new version of the problem (with a
different random number seed), if the student were dissatisfied with their
score on the previous sequence of attempts. [I mean automatically without
the instructor's intervention.] I think this would require hacking into the
WeBWorK 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 the
interactive style problems which are more typical of WIMS, I intend to
use them sparingly. In the setting of our large calculus classes at
OSU, with limited to nonexistent computer labs, it is difficult to provide
students 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 unfettered
access to computer algebra systems directly via WeBWorK is likely to
have undesirable security implications. Malicious hackers logging in
as anonymous practice users could enter some damaging commands
into such a system. So in the spirit of not reinventing the wheel, I
prefer to go through a system like WIMS, whose author has given considerable
thought to preventing such misuse.



Zig

<| Post or View Comments |>