[LON-CAPA-cvs] cvs: modules /gerd/geogebra rawdraft.problem
www
www@source.lon-capa.org
Mon, 04 Oct 2010 14:01:04 -0000
This is a MIME encoded message
--www1286200864
Content-Type: text/plain
www Mon Oct 4 14:01:04 2010 EDT
Added files:
/modules/gerd/geogebra rawdraft.problem
Log:
Raw HTML code for GeoGebra window and splines
--www1286200864
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20101004140104.txt"
Index: modules/gerd/geogebra/rawdraft.problem
+++ modules/gerd/geogebra/rawdraft.problem
<problem>
<script type="loncapa/perl">
$m=&random(.5,1.5,.1);
$b=&random(-2,2,.5);
</script>
<startouttext />
<p> blah </p>
<endouttext />
<script type="text/javascript">
// variable that will eventually be passed back to the server
var coordinateMap1 = [];
// initializing variable
coordinateMap1["AP1.x"] = -1;
coordinateMap1["AP1.y"] = 2;
coordinateMap1["AS1.x"] = 0;
coordinateMap1["AS1.y"] = 3;
coordinateMap1["AP2.x"] = 1;
coordinateMap1["AP2.y"] = 2;
coordinateMap1["AS2.x"] = 2;
coordinateMap1["AS2.y"] = 3;
coordinateMap1["AP3.x"] = 3;
coordinateMap1["AP3.y"] = 2;
coordinateMap1["AS3.x"] = 4;
coordinateMap1["AS3.y"] = 3;
coordinateMap1["AP4.x"] = 5;
coordinateMap1["AP4.y"] = 2;
coordinateMap1["AS4.x"] = 6;
coordinateMap1["AS4.y"] = 3;
coordinateMap1["BP1.x"] = -1;
coordinateMap1["BP1.y"] = 0;
coordinateMap1["BS1.x"] = 0;
coordinateMap1["BS1.y"] = 1;
coordinateMap1["BP2.x"] = 1;
coordinateMap1["BP2.y"] = 0;
coordinateMap1["BS2.x"] = 2;
coordinateMap1["BS2.y"] = 1;
coordinateMap1["BP3.x"] = 3;
coordinateMap1["BP3.y"] = 0;
coordinateMap1["BS3.x"] = 4;
coordinateMap1["BS3.y"] = 1;
function updatePointCoordinates1(coordinateName) {
var x = document.ggbApplet1.getXcoord(coordinateName);
var y = document.ggbApplet1.getYcoord(coordinateName);
coordinateMap1[coordinateName + ".x"] = x;
coordinateMap1[coordinateName + ".y"] = y;
}
function ggbOnInit(param) {
if (param == "applet1") {
document.ggbApplet1.evalCommand("m=" + $m);
document.ggbApplet1.setVisible("m",false);
document.ggbApplet1.evalCommand("b=" + $b);
document.ggbApplet1.setVisible("b",false);
// This MUST be a DEPENDENT OBJECT in order to be locked down:
document.ggbApplet1.evalCommand("y=m*x-b");
// changes (xmin, xmax, ymin, ymax)
document.ggbApplet1.setCoordSystem(-10,10,-8,8);
// makes the (x,y) axis (in)visible
document.ggbApplet1.setAxesVisible(true, true);
// makes the grid (in)visible
document.ggbApplet1.setGridVisible(true);
document.ggbApplet1.evalCommand("AP1=(" + coordinateMap1["AP1.x"] + "," + coordinateMap1["AP1.y"] + ")");
document.ggbApplet1.evalCommand("AS1=(" + coordinateMap1["AS1.x"] + "," + coordinateMap1["AS1.y"] + ")");
document.ggbApplet1.evalCommand("AP2=(" + coordinateMap1["AP2.x"] + "," + coordinateMap1["AP2.y"] + ")");
document.ggbApplet1.evalCommand("AS2=(" + coordinateMap1["AS2.x"] + "," + coordinateMap1["AS2.y"] + ")");
document.ggbApplet1.evalCommand("AP3=(" + coordinateMap1["AP3.x"] + "," + coordinateMap1["AP3.y"] + ")");
document.ggbApplet1.evalCommand("AS3=(" + coordinateMap1["AS3.x"] + "," + coordinateMap1["AS3.y"] + ")");
document.ggbApplet1.evalCommand("AP4=(" + coordinateMap1["AP4.x"] + "," + coordinateMap1["AP4.y"] + ")");
document.ggbApplet1.evalCommand("AS4=(" + coordinateMap1["AS4.x"] + "," + coordinateMap1["AS4.y"] + ")");
document.ggbApplet1.evalCommand("BP1=(" + coordinateMap1["BP1.x"] + "," + coordinateMap1["BP1.y"] + ")");
document.ggbApplet1.evalCommand("BS1=(" + coordinateMap1["BS1.x"] + "," + coordinateMap1["BS1.y"] + ")");
document.ggbApplet1.evalCommand("BP2=(" + coordinateMap1["BP2.x"] + "," + coordinateMap1["BP2.y"] + ")");
document.ggbApplet1.evalCommand("BS2=(" + coordinateMap1["BS2.x"] + "," + coordinateMap1["BS2.y"] + ")");
document.ggbApplet1.evalCommand("BP3=(" + coordinateMap1["BP3.x"] + "," + coordinateMap1["BP3.y"] + ")");
document.ggbApplet1.evalCommand("BS3=(" + coordinateMap1["BS3.x"] + "," + coordinateMap1["BS3.y"] + ")");
// This seems to need to be near the end of this function to avoid problems
document.ggbApplet1.evalCommand("Spline4[AP1,AS1,AP2,AS2,AP3,AS3,AP4,AS4]");
document.ggbApplet1.evalCommand("Spline3[BP1,BS1,BP2,BS2,BP3,BS3]");
document.ggbApplet1.registerObjectUpdateListener("AP1", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AS1", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AP2", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AS2", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AP3", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AS3", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AP4", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("AS4", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BP1", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BS1", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BP2", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BS2", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BP3", "updatePointCoordinates");
document.ggbApplet1.registerObjectUpdateListener("BS3", "updatePointCoordinates");
}
}
function successResponse(data) {
// need submit button to call -> jQuery.post( url, [ data ], [ successResponse(data, textStatus, XMLHttpRequest) ], [ dataType ] )
// submit button should call this function
// http://api.jquery.com/jQuery.post/
// ??????
}
function showPoint1(coordinateName) {
alert("x: " + coordinateMap1[coordinateName + ".x"] + ", y: " + coordinateMap1[coordinateName + ".y"]);
//Should be part of submit button
//jQuery.post('result.problem', coordinateMap1);
}
</script>
<applet name="ggbApplet1" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
codebase="http://www.geogebra.org/webstart/3.2/unsigned/"
width="752" height="512" mayscript="true">
<param name="ggbBase64" value="UEsDBBQACAAIADhQET0AAAAAAAAAAAAAAAASAAAAZ2VvZ2VicmFfbWFjcm8ueG1s7Z1bb+PGGYavk19BMDfexkvP+QCsEqzOuWi7gIveBG1By7RXrSwJsqyY+fWdGZLS2pQtzdqWSPoDApOSqCH5vSTnmdH7bj79en8zCVbJ4nY8m7ZCHKEwSKaj2eV4et0K75ZXH1X46y8/frpOZtfJxSIOrmaLm3jZCmlEQvP+TTxazILRzeXf4pukFZ7PJ+NpQsJgOZtNtrw1TCbz9Vu/f8Gn5/j0Czk9J/8Kg/FoNu2PJ+YrYXD7dfbHb9N/mG+040UrXC7ukvXefpvO75ZBjFrh5zCIsVnEZklaYdssqFnE4Vmx7d/vluuNV9nW7VW29ee228zs9NY0P1qa8w+W42W2//hu+XW2sGuX8dK+Y7ZMJslNMl0Gy3Ru3pnPxtNlGEzii2Rij+SXH3/4ZI86mF38Nxkt82MuPr+KJ7eJ3d8Pn8znndlktghM86bY1+7vhfsbT+ZfY7NmRHCbTuI0WQSreGI/zd8xzf11dpk8eDeejo0m9gRul8ncNoBNCedJcpkrmh2yWZmbJp2y3xzQaDZbXN4G962QRBwhKpEginGFJA2DtBWyiDPNJOVYEiwFEmHwZ9au+7orxPn4z/yQqKvqWV6sHWVrN6JsLMIIESqJ4EIiJiXP6yYoUoQIoYggFPHXq5u54l9cOML58UtHIkW4FJJQIqhQQrrK8UhizqRCmHPCNCeveMU1pXIsYlIrIYS57jBhiOWV4+ZdLZCWGEtMsGfl7ueL5NZ2BUU54ov/3Jse4X6erZ7cfwhawQmJUPCX4P7fJzRCH4KPAS1eE/v65wDbhXnj5LN9xd2nJ5vNyaPN7/ONY/OZ+8bJx4d7+PnhHrLN21vbfriJbbH9IQzOSpfF1d3UPfPDB2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esBlVDoTnZKd1wm9N4wqjDe7F++JSZvToRLr3Lq4BTTndcGqDEdBp4ZfYA9gPO+7OQguvLz+IPlNbcDIHkue16vMXqHrGyqTbCjNupv7CTwn4TR1GBJlKVOV0kKB2/XkFbUXKZ0/ksICyn7M6IUOyse6XFm2qtc7+R7xAhxIg3wIwwh2VTH2gGfSlFJXjrgvE60ImQk6jsPqfLhCEliHqPWpNoFthKpXS1vRgLDTn/Bq3w7iWbLJaLmMX4wz88dgkWlqSTZJGweTRny9UqWWIKUS8KYYtJzFJkZctZki5SluChf9v81XDcgrVYSkP4GcyYz1qL6ppwt3k2X5W8QZ0SrX3ine21b4N4gLb24m7DvGkX45e2ljBgEVZpD+WhUOdtyFscqF8unT/i9RT1k5JKE+0CRf31sBZh9T5O6NVr5n1m3mPgcKRXe7Ri3sOvRVi9lxRtkDYEHo1Rj1XhZ2GIA5Dcde+YG8kLwGagpG+F3YwbbJrDLVLn/6NvCpya921zpYz+E2U2veu37AC6BRm6qsXC9qo35Oi6N5TO66igFA1ug2FICHfF+oUCAlpBrWHUHUYupMtbP3TuHZxNRxFOg0GtpcW3A+OxLpZt51Kfugm3OF05/c4bMGTD8Y2xF0oqbtHLPR3T98f9iA1vzPovUEsHCEyILqxEAgAAlQQAAFBLAQIUABQACAAIADhQET1gj4YNdwsAAFgqAQASAAAAAAAAAAAAAAAAAAAAAABnZW9nZWJyYV9tYWNyby54bWxQSwECFAAUAAgACAA4UBE9TIgurEQCAACVBAAADAAAAAAAAAAAAAAAAAC3CwAAZ2VvZ2VicmEueG1sUEsFBgAAAAACAAIAegAAADUOAAAAAA=="/>
<param name="image" value="http://www.geogebra.org/webstart/loading.gif" />
<param name="boxborder" value="false" />
<param name="centerimage" value="true" />
<param name="java_arguments" value="-Xmx512m" />
<param name="cache_archive" value="geogebra.jar, geogebra_main.jar, geogebra_gui.jar, geogebra_cas.jar, geogebra_export.jar, geogebra_properties.jar" />
<param name="cache_version" value="3.2.44.0, 3.2.44.0, 3.2.44.0, 3.2.44.0, 3.2.44.0, 3.2.44.0" />
<param name="framePossible" value="false" />
<param name="showResetIcon" value="false" />
<param name="showAnimationButton" value="false" />
<param name="enableRightClick" value="false" />
<param name="errorDialogsActive" value="true" />
<param name="enableLabelDrags" value="false" />
<param name="showMenuBar" value="false" />
<param name="showToolBar" value="false" />
<param name="showToolBarHelp" value="false" />
<param name="showAlgebraInput" value="false" />
<param name="enableShiftDragZoom" value="false" />
<param name="allowRescaling" value="false" />
<param name="enableLabelDrags" value="false" />
<param name="ggbOnInitParam" value="applet1" />
Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (<a href="http://java.sun.com/getjava">Click here to install Java now</a>)
</applet>
<startouttext />
<p> blah blah </p>
<endouttext />
<numericalresponse answer="$b">
<responseparam type="tolerance" default="5%" name="tol" description="Numerical Tolerance" />
<textline />
</numericalresponse>
</problem>
--www1286200864--