index.php or file.php codebase references - need definitive documentation

index.php or file.php codebase references - need definitive documentation

by Marc Grober -
Number of replies: 1
I have spent some time now running down a few dozen threads regarding where applet archives can live and how they can be referenced in codebase and have to conclude (I am apparently not the first one to go down this path) that there seems to be no authoritative answer.

To quckly review, yes, if one places the applet code in an externally accesible locatio then it is easy enough to reference the codebase, as in the case of the java sketchpad jsp directory getting installed at fqdn/jsp. Others have noted that one an use relative paths, but that is going to be very problematic fro someone who is not the actual administrator.... The obvious answer is to be able to place the applet files in a directory created by Moodle and use the Moodle reference to access it in the html, which makes the files easily accessible to the teacher with a minimum of confusion as well as unavailable to everyone else on earth (see my prior note on the use of the /jsp install of the sketchpad files.)

I have now tried a variety of things to accomplish this. By way of example, the java sketchpad files are installed here: http://fqdn/files/index.php?id=12&wdir=//jsp
If you go to here:
http://www.moodle.alaskapolicy.net/files/index.php?id=12
jsp is the first directory listed, and is listed as above

And use slash args is tagged.

While moodle will let me reference a file using file.php, as in:
http://fqdn/file.php/12/jsp/jsp4.jar
or
http://fqdn/file.php/12/jsp/GSP.class
from:
<applet
width="706" 
height="437" 
align="middle"
code="GSP.class"
archive="jsp4.jar"
codebase="/jsp">
<param name="etc=1" />
</applet>
It will seem to throw an error when one references a codebase that is a directory as is the case with the java sketchpad....

http://www.moodle.alaskapolicy.net/file.php/12/jsp/

and as yet I have not been able to test just using the the above as the codebase reference as now the html source editor no longer responds ;=}

So, is anyone using php to identify the codebase, and if so, how have you done this. If no one has been able to make this work, why, and is this something that needs to be brought to developers attention prior to Moodle 2. Lastly, if there is a simple work around (i.e. a way to proviee a simple installation location that will limit access to the users of that moodle trhough a simple URL, does some have something that can serve as a kernel for a HOW To so that this issue can be viewed as done and done?

Average of ratings: -
In reply to Marc Grober

Re: index.php or file.php codebase references - need definitive documentation

by Marc Grober -
I guess I ran out fo time to edit the above...

In any event, once I turned off java (the html source editor will apparently not run while the applet is inited) and inserted

http://fqdn/file.php/12/jsp the page produced the error message below inn th console, indicating that at least now, the codebase had been located......

So it looks like we are a bit closer, but still not there....

Comments/suggestions??

JavaSketchpad DR4.05(g1) Release March 2003 Copyright (C) 1996-2003 by KCP Technologies, Inc.
Exception in thread "Thread-7" java.lang.NullPointerException
at sun.plugin.util.AnimationPanel.createTranslucentImage(Unknown Source)
at sun.plugin.util.AnimationPanel.createGradientShapeImage(Unknown Source)
at sun.plugin.util.AnimationPanel.initBackground(Unknown Source)
at sun.plugin.util.AnimationPanel.preloadResources(Unknown Source)
at sun.plugin.util.AnimationPanel.doPaint(Unknown Source)
at sun.plugin.util.AnimationPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file GSP
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)