// Numbas version: exam_results_page_options {"name": "Generic GeoGebra calculator", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Generic GeoGebra calculator", "tags": [], "metadata": {"description": "
The statement contains two blank geogebra applets: one with the computer algebra view, which can be used as a calculator, and the other with algebra and geometry views.
\nThere are custom functions which set the perspective of a geogebra applet and show the toolbar or algebra input line. These will probably be included in the geogebra extension eventually.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Just a calculator:
\n{calculator}
\nAlgebra view and 2d geometry:
\n{geometry}
", "advice": "", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"calculator": {"name": "calculator", "group": "Ungrouped variables", "definition": "geogebra_applet(500,300)\n|> set_perspective(\"C\")\n|> details(\"Calculator\")", "description": "", "templateType": "anything", "can_override": false}, "geometry": {"name": "geometry", "group": "Ungrouped variables", "definition": "geogebra_applet(600,600)\n|> set_perspective(\"AG\")\n|> show_toolbar()\n|> show_algebrainput()\n|> details(\"Geometry\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["calculator", "geometry"], "variable_groups": [], "functions": {"set_perspective": {"parameters": [["applet", "ggbapplet"], ["perspective", "string"]], "type": "ggbapplet", "language": "javascript", "definition": "applet.promise.then(() => {\n applet.app.setPerspective(perspective);\n});\nreturn new Numbas.jme.types.ggbapplet(applet);"}, "show_toolbar": {"parameters": [["applet", "ggbapplet"]], "type": "ggbapplet", "language": "javascript", "definition": "applet.promise.then(() => {\n applet.app.showToolBar(true);\n});\nreturn new Numbas.jme.types.ggbapplet(applet);"}, "show_algebrainput": {"parameters": [["applet", "ggbapplet"]], "type": "ggbapplet", "language": "javascript", "definition": "applet.promise.then(() => {\n applet.app.showAlgebraInput(true);\n});\nreturn new Numbas.jme.types.ggbapplet(applet);"}, "details": {"parameters": [["element", "html"], ["label", "string"]], "type": "html", "language": "javascript", "definition": "const details = document.createElement('details');\nconst summary = document.createElement('summary');\nsummary.innerHTML = label;\ndetails.append(summary);\nfor(let e of element) {\n details.append(e);\n}\nreturn details;"}}, "preamble": {"js": "", "css": "/* This is only needed until the default theme stops overriding the