# Macro Library geogebra

Geogebra integration functions, Version 3.0, Oct 4, 2014

- addGeogebra
- addGeogebraJava

### addGeogebra

addGeogebra(url,[width,height,commands,params,callbacks,qn,part])
place a geogebra HTML5 applet. Either include the base64ggb (grab by pressing
Ctrl+Shift+B), or include the "Material ID" after uploading to Geogebra
, or use "graphing" or "geometry" to use a blank "App" mode.
If using a Material ID, include in the question "Other Attribution" something like "Geogebra applet created by ____" with the creator's name.
if commands array is provided, execute these javascript commands
(see http://wiki.geogebra.org/en/Reference:JavaScript
for available commands)
params should be key=>value array of parameters, like
array('framePossible'=>'true','showToolBar'=>'true')
(see http://wiki.geogebra.org/en/Reference:Applet_Parameters for options)
if you want to pull values from Geogebra on submit, provide an array of
geogebra commands to callback with and provide question number
(1-indexed - usually use $thisq) and if multipart, part number (0-indexed)

### addGeogebraJava

addGeogebraJava(url,[width,height,commands,params,callbacks,qn,part])
place a geogebra Java applet, calling .ggb file specified in URL
if commands array is provided, execute these javascript commands
(see http://www.geogebra.org/en/wiki/index.php/GeoGebra_JavaScript_Methods
for available commands)
params should be key=>value array of parameters, like array('framePossible'=>'true','showToolBar'=>'true')
(see http://www.geogebra.org/en/wiki/index.php/GeoGebra_Applet_Parameters for options)
if you want to pull values from Geogebra on submit, provide an array of geogebra commands to callback with
and provide question number (1-indexed - usually use $thisq) and if multipart, part number (0-indexed)