Difference between revisions of "Applets"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
This page describes a common interface between WeBWorK questions and
 
This page describes a common interface between WeBWorK questions and
 
Java, Flash and Geogebra applets.
 
Java, Flash and Geogebra applets.
 
 
Preliminary documentation at:
 
 
http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html
 
 
and
 
 
http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html
 
 
The interface is still being developed and so expect minor changes to continue along
 
 
with significant new features.
 
 
Request additional features from the FlashObject working group:
 
 
http://webwork.maa.org/wiki/AIM07/Working_Groups
 
   
 
Applets should respond when called by these functions
 
Applets should respond when called by these functions
Line 36: Line 19:
   
 
More specialized info at [[JavaApplets]], [[FlashApplets]] and [[GeogebraApplets]]
 
More specialized info at [[JavaApplets]], [[FlashApplets]] and [[GeogebraApplets]]
  +
  +
POD documentation at:
  +
http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html
  +
  +
http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html
  +
and the javaScript glue at
  +
http://hosted2.webwork.rochester.edu/webwork2_files/js/ww_applet_support.js
  +
  +
The interface is still being tweaked and so expect minor changes to continue along with significant new features.
  +
  +
Request additional features from the FlashObject working group:
  +
  +
http://webwork.maa.org/wiki/AIM07/Working_Groups
   
 
[[Category:Applets]]
 
[[Category:Applets]]

Revision as of 15:51, 11 June 2009

WeBWorK Applet interface

This page describes a common interface between WeBWorK questions and Java, Flash and Geogebra applets.

Applets should respond when called by these functions

  1. getXML() - the WW question is asking for an XML description of the applet's state. The description is text -- it is not base64 encoded. The XML description of the applet state should be suitable for use in setXML
  2. setXML(state) - the applet is sending an XML description to reset the applet's state. The description is text -- it is not base64 encoded.
  3. setConfig(configuration) - the applet is sending an initial configuration for the applet (should we use initialConfiguation or reset?) The description is text -- it is not base64 encoded.
  4. getAnswer() -- the applet responds with a string simulating an answer entered by the student. This is typically called when the submit button is pressed.
  5. isActive() - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
  6. debug() - set when the applet is called from WW. If debug=1 the WW question is in debug mode and if the applet has the ability to issue extra error messages these should be turned on. If debug=0 then these error messages should be turned off.


Demos of applets can be found at

http://hosted2.webwork.rochester.edu/webwork2/applet_dev

More specialized info at JavaApplets, FlashApplets and GeogebraApplets

POD documentation at: http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html

http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html and the javaScript glue at http://hosted2.webwork.rochester.edu/webwork2_files/js/ww_applet_support.js

The interface is still being tweaked and so expect minor changes to continue along with significant new features.

Request additional features from the FlashObject working group:

http://webwork.maa.org/wiki/AIM07/Working_Groups