WebRespond: Quiz Web Page
The quiz web page displays any HTML code explaining the quiz and calls
the applet WebRespond. You can specify the name of the master
file as well as how much space the applet occupies on your web page.
There are two approaches to implementing Java in a web page. The
first is the APPLET tag and the second is to invoke a JAVA PLUG-IN.
-
The Applet Tag Method - The first method uses the
default Java Virtual Machine (VM) of the web browser. WebRespond
should work with the Applet Tag for any web browser that supports Java
vs. 1.1 or higher. Some idiosyncracies in WebRespond do exist due
to the implementation of the Java VM in these browsers. See the Bug
Report for a current list of problems with WebRespond. See below
for more details on the Applet Tag method of implementing WebRespond.
-
The Plug-In Method - The second method uses a Java
VM provided by Sun Microsystems. The advange of this method is that
the most recent version of Java is used, which contains an efficient Just-In-Time
(JIT) compiler. WebRespond run under a plug-in will be more responsive.
The implementation of a plug-in in Netscape is different than in Internet
Explorer and, therefore, requires a more elaborate series of HTML calls.
See below for more details on the Plug-In method of implementing WebRespond.
Applet Tag method
The easiest way to set implement WebRespond using the Applet Tag is to
modify the provided
template file. If you are
familiar with writing HTML or you have a program which makes HTML writing
easy, you can use the following information to set up the applet correctly.
The following set of tags must be used to call WebRespond.
<APPLET ARCHIVE="wrespond.jar"
CODEBASE="http://www.cedarville.edu/employee/gollmers/wrespond"
CODE="WebRespond.class"
WIDTH=500
HEIGHT=350>
<PARAM NAME="name" VALUE="mstmplt.txt">
</APPLET>
-
ARCHIVE="wrespond.zip" - This part of the tag specifies that all
of the classes required for running WebRespond are included in the file
"wrespond.jar". This file could be downloaded and unzipped into its individual
class files. If this is done, then the ARCHIVE portion of the tag can be
omitted. This may be necessary if your web browser does not support ARCHIVE.
Warning:
If you download this archive to your local machine, make sure it comes
from the author's original web site. For a further explanation of the danger
please see the disclaimer page for WebRespond.
-
CODEBASE="http://www.cedarville.edu/employee/gollmers/wrespond"
- This part of the tag specifies that the classes required for running
WebRespond are located at the author's web site. If you download the archive
file "wrespond.zip" to the same directory as your quiz web page, then you
can remove this part of the tag. Downloading the archive file "wrespond.zip"
may be useful if you want to check your quiz before placing it on the network.
Warning:
If you download this archive to your local machine, make sure it comes
from the author's original web site. For a further explanation of the danger
please see the disclaimer page for WebRespond.
-
CODE="WebRespond.class" - This part of the tag specifies which applet
to call. This value must remain "WebRespond.class". The case of the text
is important.
-
WIDTH=500 - This part of the tag specifies the width of the applet.
Smaller and larger values can be specified without affecting the operation
of WebRespond. However, if the width is made too small, some of the buttons
necessary for operation may not be visible. Always check the applet for
appearance when you specify a new size. Also remember that most computer
screens operate within a width of 640 and 1024 and some of that width is
used by the web browser. If you make the width too large, users of your
quiz may not see the whole quiz without scrolling back and forth with the
browser.
-
HEIGHT=350 - This part of the tag specifies the height of the applet.
Smaller and larger values can be specified without affecting the operation
of WebRespond. However, if the height is made too small, some of the buttons
necessary for operation may not be visible. Always check the applet for
appearance when you specify a new size. Also remember that most computer
screens operate within a height of 480 and 768 and some of that height
is used by the web browser. If you make the height too large, users of
your quiz may not see the whole quiz without scrolling up and down with
the browser.
-
<PARAM NAME="name" VALUE="mstmplt.txt"> - This tag must appear
between the applet tag's opening and closing. This passes the name of the
master
file into WebRespond. Once you have written your own master file, replace
mstmplt.txt
with the name of that file. A warning must be given at this point.
Since the source code for a web page is available to anyone on the net,
it is possible for a student to obtain the name of your master file as
well as the content of your master file. This means that the question files
and the student passwords are not secure. Security of the master file and
question files will be addressed in version 2.0 of WebRespond.
Plug-In Method
The easiest way to implement WebRespond using the Plug-In Tag is to modify
the provided
template file. If you are familiar
with writing HTML or you have a program which makes HTML writing easy,
you can use the following information to set up the applet correctly.
You can also use Sun Microsystems, Inc. HTMLConverter
1.3 to change your web pages to implement the Java Plug-in.
The following code is used to call WebRespond with the Java Plug-in.
The portions highlighted indicate what parameters should be changed to
accurately implement your quiz using WebRespond.
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.3 -->
<SCRIPT LANGUAGE="JavaScript"><!--
var _info = navigator.userAgent; var _ns = false;
var _ie = (_info.indexOf("MSIE") > 0 &&
_info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
var _ns = (navigator.appName.indexOf("Netscape")
>= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16")
< 0 && java.lang.System.getProperty("os.version").indexOf("3.5")
< 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
//--></SCRIPT></COMMENT>
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH
= "500" HEIGHT = "350" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"><NOEMBED><XMP>');
else if (_ns == true) document.writeln('<EMBED
type="application/x-java-applet;version=1.3" CODE = "WebRespond.class"
CODEBASE
= ".." ARCHIVE = "wrespond.jar"
WIDTH
= "500" HEIGHT = "350" name = "sample.msf"
scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED><XMP>');
//--></SCRIPT>
<APPLET CODE = "WebRespond.class" CODEBASE
= ".." ARCHIVE = "wrespond.jar" WIDTH
= "500" HEIGHT = "350"></XMP>
<PARAM NAME = CODE VALUE = "WebRespond.class" >
<PARAM NAME = CODEBASE VALUE = ".."
>
<PARAM NAME = ARCHIVE VALUE = "wrespond.jar" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME = name VALUE ="sample.msf">
</APPLET>
<!-- Specify the name of the master file for the quiz -->
<!-- Use the ending Applet tag -->
</NOEMBED></EMBED></OBJECT>
<!--
<APPLET CODE = "WebRespond.class" CODEBASE
= ".." ARCHIVE = "wrespond.jar" WIDTH
= "500" HEIGHT = "350">
<PARAM NAME = name VALUE ="sample.msf">
<!-- Specify the name of the master file for the quiz -->
<!-- Use the ending Applet tag -->
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
These changes can be summaried with the following statements.
-
CODEBASE = ".." or CODEBASE VALUE = ".." Replace .. with the
location of your installation of WebRespond. This involves 4 changes.
-
WIDTH = "500" HEIGHT = "350" Replace 500 and 300 with the
dimensions of your implementation of WebRespond. This involves 4
changes.
-
name = "sample.msf" or VALUE = "sample.msf" Replace sample.msf
with the name of your quiz masterfile. This involves 3 changes.
Example: Web Quiz Page
A sample web quiz page is included so you can become familiar with the
look of the file. A link to the sample web quiz page is also included so
you can try out WebRespond for yourself.
<TITLE>Quiz Using WebRespond v1.0</TITLE> <!-- Give your web page a title -->
<BODY BGCOLOR="#94c694"> <!-- This begins the main body of the web
page and sets the background color to light gray. -->
<H2>Quiz Using WebRespond v1.0</H2> <!-- Use any appropriate HTML code before calling WebRespond. -->
<HR> <!-- This places a horizontal line before the applet. -->
<APPLET ARCHIVE="wrespond.jar"
CODEBASE=".."
CODE="WebRespond.class"
WIDTH=500
HEIGHT=350> <!-- This section of code calls WebRespond.
You may change the values of the width and height,
but the rest should remain unchanged unless you have
read the documentation for WebRespond. -->
<PARAM NAME=name VALUE="sample.msf"> <!-- This sets the name of the master file.
Once you generate your master file, replace
"sample.q1" with the name of your master file. -->
</APPLET> <!-- This ends the call to WebRespond. -->
<HR> <!-- This places a horizontal line after the applet. -->
<P>If you have any questions about WebRespond, please
contact the author at <A HREF="mailto:gollmers@cedarville.edu">
gollmers@cedarville.edu</A>.<P> <!-- You can place any additional HTML code after this point. -->
</BODY> <!-- This marks the end of the main body of the web page. -->