Geo Sketchpad

Geo Sketchpad

by Matt Vernon -
Number of replies: 4
I have teachers that want to use Geo sketchpad files in moodle. There is an .jsp zip application that you download from the key curriculum press site to keep in the same folder as the .html image files published from the teachers desktop App. It runs on my desktop fine but if i upload to courses files section the graphics do not come up.
I have java enabled at the admin level and have uploaded in the same config as what works on desktop (same browser) any ideas how to get the java applets to work within moodle?
Average of ratings: -
In reply to Matt Vernon

Re: Geo Sketchpad

by Marc Grober -
I don;t have a great deal of time at the moment but if you search in the docs and the forums under java sketchpad you will find a good deal of prior discussion.

There are several issues involved, including the fact that you have to use a work around to reference the applet if placed in moodledata (one reason many place the applet outside moodledata, which allows you much easier referencing - much the same situation facing one in the use of dragmath), confusion about applet parameters and their usage engendered in part by misinformation on the download site (the resource in which you want to reference the applet does not have to live in the same directory as the applet), and the fact that usage is not consistent across all moodle activities.

So, I would suggest to make it easier on yourself that you place a java directory in your moodle file structure and reference that in your parameter. If you can tell me what type of activity you are trying to insert an applet reference in I can provide some examples as well.
In reply to Marc Grober

Almost there

by Matt Vernon -
Thanks Marc for your detailed explanation and time. I placed them all in the site files and it works. Please excuse my lack of knowledge. Do i have to load these files for every teacher and send them the link, or can i streamline for them so they can just point to the jsp folder on the site files ( I am assuming in a parameter) Is that involve modifying the html. Attached is what the teachers sent me, here is the code for the html.
<!--This file created by The Geometer's Sketchpad 4.07-->
<HTML>
<TITLE>180triangle</TITLE></HEAD><BODY>
<P><HR SIZE="4">This page uses <B><A HREF="http://www.keypress.com/sketchpad/java_gsp/index.html">JavaSketchpad</A></B>, a World-Wide-Web component of <I><A HREF="http://www.keypress.com/sketchpad/index.html">The Geometer's Sketchpad</A>.</I> Copyright &copy; 1990-2001 by KCP Technologies, Inc. Licensed only for non-commercial use.<HR SIZE="4"></P>
<H4 ALIGN=CENTER><APPLET CODE="GSP.class" ARCHIVE="jsp4.jar" CODEBASE="jsp" WIDTH=760 HEIGHT=518 ALIGN=CENTER><PARAM NAME=MeasureInDegrees VALUE=1><PARAM NAME=DirectedAngles VALUE=0>
<PARAM NAME=BackRed VALUE=255>
<PARAM NAME=BackGreen VALUE=255>
<PARAM NAME=BackBlue VALUE=255>
<PARAM NAME=Construction VALUE="
{1} Point(316.632,127.198)[label('A')];
{2} Point(303.198,316.223)[label('B')];
{3} Segment(2,1)[color(0,0,128)];
{4} Point(559.601,318.495)[label('C')];
{5} Segment(4,2)[color(0,0,128)];
{6} Segment(1,4)[color(0,0,128)];
{7} Length(3,12,20,'m AB = ')[black];
{8} Length(6,12,40,'m CA = ')[black];
{9} Length(3,12,60,'m AB = ')[black];
{10} Angle(2,1,4,12,78,'mAngle BAC = ')[black];
{11} Angle(2,4,1,12,96,'mAngle BCA = ')[black];
{12} Angle(4,2,1,12,114,'mAngle CBA = ')[black];
{13} Calculate(12,132,'mAngle BAC+mAngle BCA+mAngle CBA = ','AB+C+')(10,11,12)[black];
">
Sorry, this page requires a Java-compatible web browser.</APPLET>
<P ALIGN=CENTER>180triangle</P></H4>
</BODY>
</HTML>

In reply to Matt Vernon

Re: Almost there

by Marc Grober -
Once you have a world accessible jsp folder all you need to do is reference that location properly inside the applet tag. Compare what I sent you and what you appended.... Note the diff in the applet tag

yes, you have to edit the HTML to fix the applet tag. There is another app compass and ruler, that may make that less obscure for less techy teachers.... But I think there is no excuse today for teachers to be technologically illiterate ;)

caution teachers that gsp constructions will not always work in jsp (there are docs on the vendors web site about workarounds)

There also similar applets, such as CaR mentioned above, Descartes and of course geogebra, as well some othe Linux focused applets

also asciisvg has some interesting options as well as WA (though the failure of wolfram to respond to inquiries is troubling)

good luck and have fun
In reply to Matt Vernon

Re: Geo Sketchpad

by Marc Grober -
OK Matt,

Here's an example of a web resource taken from a moodle where the applet as been placed in a web accessible directory http://yourmoodle.yourdomain.tld/jsp

Another way around this is to use php tags to use CFG values to point to the correct location much as we do with the current dragmath plugin (see attached plugin, which remember is a php file....) , but that takes a bit more ingenuity

If you want, you can do a number of things so that you don't service the whole world with your jsp directory, but then, are there so many people using java sketchpad that it is worth worrying about? Your decision....



<hr size="4" />This page uses <b><a href="http://www.keypress.com/sketchpad/java_gsp/index.html">JavaSketchpad</a></b>, a World-Wide-Web component of <i><a href="http://www.keypress.com/sketchpad/index.html">The Geometer's Sketchpad</a>.</i> Copyright © 1990-2001 by KCP Technologies, Inc. Licensed only for non-commercial use.<hr size="4" />
<p></p>
<h4 align="center"><applet width="706" height="437" align="middle" codebase="http://yourmoodle.yourdomain.tld/jsp" archive="jsp4.jar" code="GSP.class"><param value="1" name="MeasureInDegrees" /><param value="0" name="DirectedAngles" /> <param value="255" name="BackRed" /> <param value="255" name="BackGreen" /> <param value="255" name="BackBlue" /> <param value="{1} FixedText(15,27,'VOLUME')[black]; {2} FixedText(238,27,'What size corner should be removed from a piece of paper')[black]; {3} Point(15,46)[hidden]; {4} Point(250,46)[hidden]; {5} Line(4,3)[hidden]; {6} Point on object(5,0.0468085)[hidden]; {7} Point on object(5,0.608511)[color(156,32,32),label('Y')]; {8} Segment(7,6)[black]; {9} Length(8,266,75,'')[black,hidden]; {10} FixedText(136,126,'The piece of paper is ')[black,hidden]; {11} FixedText(339,131,' cm on a side (Y).')[black,hidden]; {12} FixedText(35,64,'Original paper size')[black]; {13} Point(10,83)[hidden]; {14} Point(355,83)[hidden]; {15} Line(14,13)[hidden]; {16} Perpendicular(15,6)[hidden]; {17} Intersect(15,16)[hidden]; {18} Midpoint(8)[hidden]; {19} Perpendicular(15,18)[hidden]; {20} Intersect(15,19)[hidden]; {21} Segment(20,17)[hidden]; {22} Point on object(21,0.297353)[label('X'),color(156,32,32)]; {23} Segment(22,17)[black]; {24} FixedText(21,105,'Size of corner to cut')[black]; {25} Point(24,152)[hidden]; {26} VectorTranslation(25,6,7)[hidden]; {27} Rotation(25,26,1.5708)[hidden]; {28} Rotation(26,27,1.5708)[hidden]; {29} VectorTranslation(25,17,22)[hidden]; {30} Rotation(29,25,-1.5708)[hidden]; {31} VectorTranslation(26,29,25)[hidden]; {32} Segment(31,29)[black,thick]; {33} VectorTranslation(28,30,25)[hidden]; {34} VectorTranslation(30,25,29)[hidden]; {35} VectorTranslation(33,25,29)[hidden]; {36} Segment(34,29)[black,thick]; {37} Segment(30,34)[black,thick]; {38} Segment(33,30)[black,thick]; {39} Segment(35,33)[black,thick]; {40} VectorTranslation(28,25,29)[hidden]; {41} VectorTranslation(27,29,25)[hidden]; {42} VectorTranslation(41,28,33)[hidden]; {43} Segment(40,35)[black,thick]; {44} Segment(41,40)[black,thick]; {45} Segment(42,41)[black,thick]; {46} VectorTranslation(31,25,30)[hidden]; {47} VectorTranslation(26,25,30)[hidden]; {48} VectorTranslation(27,30,25)[hidden]; {49} Segment(46,31)[black,thick]; {50} Segment(47,46)[black,thick]; {51} Segment(48,47)[black,thick]; {52} Segment(42,48)[black,thick]; {53} Polygon(29,34,30,33,35,40,41,42,48,47,46,31)[color(240,97,87)]; {54} Point(323,321)[hidden]; {55} Point(580,321)[hidden]; {56} Line(55,54)[hidden]; {57} Circle by radius(54,23)[hidden]; {58} Perpendicular(56,54)[hidden]; {59} Intersect1(58,57)[hidden]; {60} Perpendicular(8,22)[hidden]; {61} Intersect(60,8)[hidden]; {62} Rotation(61,18,-3.14159)[hidden]; {63} VectorTranslation(54,61,62)[hidden]; {64} Circle(54,63)[hidden]; {65} Point on object(64,-2.40972)[hidden]; {66} Segment(65,54)[black]; {67} Parallel(66,59)[hidden]; {68} Parallel(58,65)[hidden]; {69} Intersect(67,68)[hidden]; {70} Parallel(56,69)[hidden]; {71} Segment(59,69)[black,thick]; {72} Intersect2(56,64)[hidden]; {73} Perpendicular(56,72)[hidden]; {74} Parallel(56,59)[hidden]; {75} Intersect(73,74)[hidden]; {76} Parallel(71,75)[hidden]; {77} Parallel(74,69)[hidden]; {78} Intersect(76,77)[hidden]; {79} Parallel(56,65)[hidden]; {80} Parallel(58,78)[hidden]; {81} Intersect(71,79)[hidden]; {82} Segment(78,69)[black,thick]; {83} Segment(75,78)[black,thick]; {84} Segment(59,75)[black,thick]; {85} Segment(65,69)[black]; {86} Segment(59,54)[black]; {87} Segment(72,75)[black]; {88} Segment(54,72)[black]; {89} Polygon(54,59,69,65)[yellow]; {90} Polygon(54,59,75,72)[yellow]; {91} Parallel(68,78)[hidden]; {92} Intersect(79,91)[hidden]; {93} Parallel(67,92)[hidden]; {94} Intersect(84,91)[hidden]; {95} Segment(75,94)[hidden]; {96} Intersect(95,93)[hidden]; {97} Segment(92,96)[black,thick]; {98} Segment(94,78)[hidden]; {99} Intersect(98,79)[hidden]; {100} Segment(78,99)[black,thick]; {101} Segment(78,92)[hidden]; {102} Intersect(101,84)[hidden]; {103} Segment(78,102)[black,thick]; {104} Segment(92,81)[black,thick]; {105} Polygon(81,69,78,92)[color(240,97,87)]; {106} Polygon(92,78,75,96)[color(240,97,87)]; {107} Polygon(59,81,92,96)[color(190,132,74)]; {108} Polygon(102,59,69,78)[color(240,97,87)]; {109} Polygon(102,78,75)[color(240,97,87)]; {110} Length(23,39,366,'Corner = ')[black, hidden]; {111} FixedText(191,131,'The corner (X) to cut is ')[black,hidden]; {112} FixedText(362,136,' on each side, or ')[black,hidden]; {113} Length(8,25,128,'')[hidden]; {114} Calculate(25,158,'','AB/100 *')(110,113)[black,hidden]; {115} FixedText(502,137,'% of Y.')[black,hidden]; {116} Length(23,21,165,'')[black,hidden]; {117} FixedText(171,144,'This ')[black,hidden]; {118} FixedText(255,149,' is also the box''s height (H).')[black,hidden]; {119} Length(23,26,145,'')[hidden]; {120} Distance(62,61,26,175,'GG'' = ')[black,hidden]; {121} FixedText(176,169,'The width (W) and length (L) of the box (Y - 2X) are both ')[black,hidden]; {122} Distance(62,61,22,161,'')[hidden]; {123} Calculate(306,365,'Volume = ','AA*B* 22776 /')(122,119)[black, hidden]; {124} FixedText(175,185,'The volume (L*W*H) is ')[black,hidden]; {125} FixedText(328,190,' cubic cm.')[black,hidden]; {126} Segment(25,30)[black]; {127} Segment(29,25)[black]; {128} Segment(47,26)[black]; {129} Segment(27,48)[black]; {130} Segment(41,27)[black]; {131} Segment(28,40)[black]; {132} Segment(33,28)[black]; {133} Segment(26,31)[black]; {134} FixedText(238,47,'to maximize the volume of that paper when it''s folded into a box?')[black]; {135} Calculate(2,2,'','A 28.346 / ')(9)[hidden]; {136} Calculate(39,366,'', 'A 28.346 /')(110)[hidden]; {137} FixedText(0,0,' cm')[hidden]; {138} ConcatText(39,366)(136, 137)[black, hidden]; {139} ConcatText(238,100)(111,136,137,112,114,115)[black]; {140} ConcatText(238,120)(117,136,137,118)[black]; {141} Calculate(2,2,'','A 28.346 /')(120)[hidden]; {142} ConcatText(238,160)(124,123,125)[black]; {143} ConcatText(238,80)(10,135,11)[black]; {144} ConcatText(238,140)(121,141,137)[black]; {145} ConcatText(306,365)(123,125)[black]; {146} FixedText(3,3,'Corner = ')[hidden]; {147} ConcatText(39,365)(146,136,137)[black];" name="Construction" /> Sorry, this page requires a Java-compatible web browser.</applet>
<p align="center">Box Volume</p></h4>