Difference between revisions of "Applets"

From WeBWorK_wiki
Jump to navigation Jump to search
(New page: == WeBWorK Applet interface == This page describes a common interface between WeBWorK questions and Java, Flash and Geogebra applets. Preliminary documentation at: http://webwork.maa....)
 
 
(25 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
Java, Flash and Geogebra applets.
 
Java, Flash and Geogebra applets.
   
  +
Applets should respond when called by these functions
   
Preliminary documentation at:
 
  +
# <code>getXML()</code> - 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 <code>setXML</code>
  +
# <code>setXML(state)</code> - the applet receives an XML description string to reset the applet's state. The description is text -- it is not base64 encoded.
  +
# <code>setConfig(configuration)</code> - the WeBWorK is sending an initial configuration for the applet. The description is text -- it is not base64 encoded.
  +
# <code>getAnswer()</code> -- the applet responds with a string simulating an answer entered by the student. This is typically called when the submit button is pressed.
  +
# <code>isActive()</code> - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
  +
# 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.
   
http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html
 
  +
=== Demos ===
  +
Demos of applets can be found at
   
and
 
  +
http://hosted2.webwork.rochester.edu/webwork2/wikiExamples/PointAndGraph_AppletDemos (login as guest)
   
http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html
 
  +
<hr>
  +
Demos of bleeding edge development of applets can be observed at
   
The interface is still being developed and so expect minor changes to continue along
 
  +
http://hosted2.webwork.rochester.edu/webwork2/applet_dev (login as guest)
   
with significant new features.
 
  +
Not all of these applets will be functional
   
Request additional features from the FlashObject working group:
 
  +
<hr>
   
http://webwork.maa.org/wiki/AIM07/Working_Groups
 
  +
A comprehensive example of how to construct a GeoGebra applet, include it in a WeBWorK PG file, and have WeBWorK set parameters in the GeoGebra applet is now available in the WeBWorK Problem Techniques authoring section [http://webwork.maa.org/wiki/GeoGebraApplets "GeoGebra Applets in WeBWorK"] (as of Nov. 7, 2010)
   
Applets should respond when called by these functions
 
  +
<hr>
   
1. getXML - the applet is asking for an XML description of the applet's state
 
  +
A tutorial of how to construct a WeBWork problem containing a Flash applet is now available: [http://webwork.maa.org/wiki/FlashAppletsTutorial Flash Applets Tutorial] (as of July 28, 2011)
2. setXML - the applet is sending an XML description to reset the applet's state
 
3. config - the applet is sending an initial configuration for the applet (should we use initialConfiguation or reset?)
 
4. isActive - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
 
5. 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.
 
   
  +
=== Additional documentation ===
   
Demos of applets can be found at
 
  +
More specialized pages about applets
  +
can be found at at [[JavaApplets]], [[FlashApplets]] and [[GeogebraApplets]]
  +
  +
'''POD documentation''' can be found
  +
at: http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html,
  +
  +
at http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html
  +
  +
and the javaScript glue can be found 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]]
   
http://hosted2.webwork.rochester.edu/webwork2/applets_dev
 
  +
[[Category:Problem_Techniques]]

Latest revision as of 11:49, 29 June 2011

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 receives an XML description string to reset the applet's state. The description is text -- it is not base64 encoded.
  3. setConfig(configuration) - the WeBWorK is sending an initial configuration for the applet. 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

Demos of applets can be found at

http://hosted2.webwork.rochester.edu/webwork2/wikiExamples/PointAndGraph_AppletDemos (login as guest)


Demos of bleeding edge development of applets can be observed at

http://hosted2.webwork.rochester.edu/webwork2/applet_dev (login as guest)

Not all of these applets will be functional


A comprehensive example of how to construct a GeoGebra applet, include it in a WeBWorK PG file, and have WeBWorK set parameters in the GeoGebra applet is now available in the WeBWorK Problem Techniques authoring section "GeoGebra Applets in WeBWorK" (as of Nov. 7, 2010)


A tutorial of how to construct a WeBWork problem containing a Flash applet is now available: Flash Applets Tutorial (as of July 28, 2011)

Additional documentation

More specialized pages about applets can be found at at JavaApplets, FlashApplets and GeogebraApplets

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

at http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html

and the javaScript glue can be found 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