Forum archive 2000-2006

Nandor Sieben - java applet to produce student answers

Nandor Sieben - java applet to produce student answers

by Arnold Pizer -
Number of replies: 0
inactiveTopicjava applet to produce student answers topic started 5/24/2005; 7:09:54 PM
last post 5/26/2005; 11:17:34 PM
userNandor Sieben - java applet to produce student answers  blueArrow
5/24/2005; 7:09:54 PM (reads: 1381, responses: 5)
Have anybody created java applets that can be called with paramaters and can pass parameters back to webwork? Students could use these to input their answers which are then transformed into text form and passed to the webwork system for evaluation.

For example an applet could be used to draw the vertices and edges of a simple graph. Then the applet would pass the list of edges to webwork and an evaluator could check if the graph is an Euler graph.

Another very desirable applet could be used to draw the graph of a function (a few movable points and splines). The applet could pass the coordinates of these points to an evaluator that checks if the graph has the right local extrema and inflection points.

<| Post or View Comments |>


userMichael Gage - Re: java applet to produce student answers  blueArrow
5/24/2005; 9:25:21 PM (reads: 1603, responses: 0)
Hi Nandor,

This idea has been attempted from time to time, but using javaScript in this way has not been very reliable -- particularly on Mac browsers. In general we've been very cautious about using either java applets or javaScript unless it is absolutely needed since it can be difficult to insure that the features will work for a large percentage of the browsers in use. When an application fails in a significant number of cases many instructors and students will simply avoid using it.

Having said that, it was my understanding that LiveConnect was supposed to be functional on Firefox even on Macs so perhaps its time to try again. Here is a link to a "proof of concept" applet that David Eck crafted for us a few years ago and which is pretty similar to the second applet you describe. (It's a variation on his java applet xFunctions which I use frequently.)

SketchGraph

Here is what I see -- perhaps others can report their results. I am using a Blue&White G3 (upgraded to a G4 processor) Mac running 10.3.9. (new, but not the newest, equipment and operating system). On all of the browsers the java applet itself loads and performs as it should, on most of them the interaction -- particularly "Get points" -- fails.

Safari: 1.3 interaction fails Firefox: 1.0.4 interaction fails (I guess Live Connect is not working?) Opera 8.0: interaction works fine YEAHH! iCab: interaction fails. OmniWeb 4.5: interaction fails. IE 5.2 : interaction fails.

Using google with liveconnect and firefox I find several recent articles that seem to indicate that live connect is not currently working with firefox, but there is still interest in making it work. Similar problems are holding up more widespread use of MathML. None of the browsers above will work on the mathML at http://pear.math.pitt.edu/mathzilla/itex2mmlFrag.html

It's possible that, since we are pretty close on a couple of browsers, that tweaking the javaScript for David Eck's sketch applet would make it work on more browsers. As the success of Davide Cervone's jsMath shows it is possible to use javaScript effectively now-a-days if you are careful enough.

I'm curious about the experience of other users. Which browser/platform combinations work for you? Does anyone have experience with using javaScript/java applet interactions for other applications?

-- Mike

<| Post or View Comments |>


userDavide P. Cervone - Re: java applet to produce student answers  blueArrow
5/25/2005; 10:15:30 PM (reads: 1566, responses: 0)
Mike:

The situation is not as bad as you make it out to be with the Mac browsers. There is an opensource plugin that makes LiveConnect work with Mozilla, FireFox, Camino and Netscape. It is called JavaEmbeddingPlugin, is available at

 

       http://javaplugin.sourceforge.net/

is easy to install, and it actually works. I tested your sketch page and it works with all four of the browsers listed above. You need fairly recent versions of the browsers. I used Mozilla 1.7.8, Firefox 1.0.4, Camino .8.4, and Netscape 7.2. I gave up on iCab long ago, so I don't know whether the JEP plugin works with is. Your test page also works with OmniWeb 5.1 (and I don't think it's the JEP that is doing it, but I haven't removed it to see). So the only holdouts are IE (which is never going to support it) and Safari. I think Safari should work with it, as I have been able to get LiveConnect to work with other applets, so I think there may be something wrong with this particular demo.

For example, all the browsers mentioned here (other than IE and iCab) work with the sample I have set up at

 

    http://www.math.union.edu/locate/Cervone/javascript/slider/

which was a test I worked on last year to make a slider control the LiveGraphics3D applet that I use in some of my Calc III problems. (Trying to make the slider on this page was actually the project that gave me the idea to develop jsMath.)

Anyway, things are not so bleak as they may at first seem.

Davide

<| Post or View Comments |>


userMichael Gage - Re: java applet to produce student answers  blueArrow
5/25/2005; 10:56:10 PM (reads: 1586, responses: 0)
That's good news Davide. I had found the plugin after I made the posting, but I didn't get around to installing it until I read your post. As you say, it's not very hard, so I think one could ask students to make the installation without much problem. Your applet now works in all the browsers. I suspect that I need to recompile the SketchGraph applet to make it work in Safari. At least that is my hope. I have the source code but I'll have to figure out how to use Xcode. It may take me a couple of days. All reports on the web seem to say that Safari 1.2 (and I'm pretty sure 1.3 and 2.0 as well) will handle liveconnect.

Sounds like the way is open to start desiging applets that interact with WeBWorK problems!

-- Mike

<| Post or View Comments |>


userDavide P. Cervone - Re: java applet to produce student answers  blueArrow
5/26/2005; 9:31:16 PM (reads: 1587, responses: 0)
If you decide you are going to write some JavaScript or Java applets for use with problems, don't forget that the student can view the JavaScript code and the parameters passed to the applet. You need to be sure not to include anything that would give away the answer to the student.

<| Post or View Comments |>


userMichael Gage - Re: java applet to produce student answers  blueArrow
5/26/2005; 11:17:34 PM (reads: 1623, responses: 0)
I had this in mind when I wrote the javaScript_cubic_spline routine in PGnumericalmacros.pl. The code is several years old now and not extremely well tested, but it works on at least some examples. If you wanted to use the function sin(x) in a javaScript but didn't want students to be able to figure the function out from the javaScript, you would feed points from sin(x) into the javaScript_cubic_spline macro which would give you back the javaScript code for a cubic spline approximating sin(x). Students who can deduce the original function from the code for the approximating cubic spline have probably earned any points they get. :-)

An example of this is MAAtutorial/problem13 which uses straight functions in javaScript vs. MAAtutorial/problem14 which uses the approximating cubic spline. (use profa as password)

<| Post or View Comments |>