Control of object displays for an embedded applet upon submission

tsp1 shared this question 3 years ago
Needs Answer

Does anyone know how to control for the display of objects for embedded GeoGebra applets within WeBWorK problems? We would like to be able to submit to a random function without displaying the answer (that of the derivative and accuracy score for the sketch of f '). Hitting a reset button within the ggb file returns the behavior we want. But if this same file is embedded within a WeBWorK, what is the problem?

How can we control the display of these objects until the student has made a submission?

Thanks for any feedback, Tim

Comments (3)


Please explain further (sorry, I don't understand what the problem you are having is exactly)


We have a GeoGebra applet embedded within a WebWork Homework platform (

Javascript can pull values from the GeoGebra applet and pass them on to WeBWorK for scoring of a problem but we have not found a way to communicate information back to the GeoGebra applet after it has started.

For Example, we would like GeoGebra to know that the student has submitted an answer in WeBWorK so that if the student wants to re-use the embedded applet and improve their score we know what state to bring the applet up in. In the above ggb file we can show the solution but if the student submits their answer we cant turn the solution (a derivative sketch) off because the applet doesn't know that an answer has been submitted in WeBWorK.

Is there a way to communicate to the GeoGebra applet beyond the initialization?

Tim Payer


Yes, for example if you have a boolean "display" that you want to set false:

ggbApplet.setValue("display", 0)

© 2022 International GeoGebra Institute