Usenet.com

www.Usenet.com

Group Index

Sci Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

*Right HERE*, a Program to score All Your own Personality Inventories



(second try at posting; *my apology if this posts twice*)
This program was given away on a JavaScript newsgroup.  It scores
anything.  (It is a free "scores-all" type program.)  All you
have to do is follow the directions and remove the html comment markers
(these html comment markers are there because people are not supposed
 to post active html page to Usenet -- the comment markers make the
 "html code" inactive). Quoting cyberper:

[snip]
The PGP software used to sign this code below yields code that runs just
fine, but is
not optimally readable.  Here and below the signed copy, I provide code
segments
in a more readable form, which one can substitute for portions of code
that
got segmented and less readable by the PGP software.

The following lines at the top of the code can be substituted, so the
code is more
readable:
<!-- (<--do not include this comment marker)
<html>
<head>
<title>JavaScript Universal Test/Inventory Scorer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
var myArray;
var pssArray = new Array();
var fpssArray = new Array();
var ansArray = new Array();
var results = new Array();
var noIS = 0;
var whStr = 0;
var time = 1;
var impStr;
var myRegEx1;
var b;
var theLet = new
Array("x","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
var fval = "";

[snip]
-->(<--do not include this comment marker or others on this page)
Other lines of more readable code (to substitute for the similar code in
the signed copy)
are provided below the signed block.  Here is the full body of signed
code that
is the JS Scorer program itself (and some directions):

[BELOW IS THE BEGINNING OF THE SIGNED BLOCK OF CODE]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<!-- (Remove this comment tag and these instructions here at the
top; also remove the end comment tag (the last line of this code).)
Copy everything from the top html tag through the end html tag,
inclusive. Paste into NotePad. Save as something.htm (when saving
either switch the bottom box to "All Files" or put quotes around
"something.htm"). This is the Universal Test/Inventory Scorer
(JavaScript version, requiring no downloads or plug-ins).

<html>
<head>
<title>JavaScript Universal Test/Inventory Scorer</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script language="javascript">
var myArray;
var pssArray = new Array();
var fpssArray = new Array();
var ansArray = new Array();
var results = new Array();
var noIS = 0;
var whStr = 0;
var time = 1;
var impStr;
var myRegEx1;
var b;
var theLet = new
Array("x","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o",
"p","q","r","s","t","u","v","w","x","y","z");
var fval = "";
var myRegEx2;
var temp = new Array();
var temp2;
var ssLines = new Array();
var l;


function DoIt()
{
temp[0] = new Array("hi","there");
ansArray[0] = "a";
if(time>1)
{
DoIt2();

document.form2.myTextarea.value = fval;
return;

}
else
{
impStr = document.form2.myTextarea.value

temp2= new Array();
myRegEx1 = /\n/
b = impStr.split(myRegEx1)
myArray = new Array(b.length);
myRegEx2 = /\b.*\b/


for (var i=0; i<b.length; i++)
{

myArray[i] = b[i];
myArray[i] = myRegEx2.exec(myArray[i])

}

for (var i=0; i<myArray.length; i++)
{


if((myArray[i]).toString().length == 3)
{

ssLines[noIS] = whStr;
temp[noIS] = temp2;

fpssArray = temp;
noIS += 1;
whStr = 0;
temp2 = new Array("hi","there");


}
else
{ if((myArray[i]).toString().length > 3)
{
whStr += 1;


temp2[whStr] = (myArray[i]).toString()



}

}



}
time = time + 1;
document.form2.myTextarea.value = "";
}
 return;
}

function DoIt2()
{
impStr = document.form2.myTextarea.value
myRegEx1 = /\n/
b = impStr.split(myRegEx1)

ansArray = new Array(b.length + 1);
myRegEx2 = /\b.*\b/


for (var i=0; i<b.length; i++)
{
l = i+1;
ansArray[l] = b[i];
ansArray[l] = myRegEx2.exec(ansArray[l])

}

for(i=1;i<=noIS;i++)
{
results[i] = 0;
for(var j=1;j<=ssLines[i];j++)
{

var tempx;
for(var
m=0;m<Math.floor(((fpssArray[i][j].toString()).length)/3);m++)
{

tempx =
parseInt(parseFloat(((fpssArray[i][j]).toString()).substring((m*3),(m*
3)+3)) + .9);

if(ansArray[tempx] == "T") {ansArray[tempx] = "a";}
if(ansArray[tempx] == "F") {ansArray[tempx] = "b";}
if(ansArray[tempx] == theLet[j]) {results[i] = results[i] + 1;}
}

}
}

for(var i=1;i<=noIS;i++)
{
fval += "Scale/Item " + i + " Score: " + results[i] +
"\n";

}
return;

}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<center><h1>Universal Objective Test/Inventory Scorer</h1>
<h2> This scores any objective test or personality inventory
automatically.<br>
(The only restriction is that each test or inventory item can have
only 1<br> answer (i.e. one response); for inventories, items may
count on <br>
more than one scale and/or be weighted -- by entering an item <br>
number more than once in the scoring system.)</h2></center>
<form name="form2" method="post" action="">
<p><font size="4">In the textarea you paste the scoring system THEN
click the DoIt button;
paste the answers <br>and click the DoIt button again. The scoring
system must be in a particular format
which is described <br>at the bottom of this page. Just as with the
Java version, client/student answers must simply <br>
be a,b,c, ... or T or F and one answer per line in a raw text file
(like NotePad, TextPad, <br>
or SimpleText) -- with no extra spaces or returns anywhere. <br>Each
'answer' is an answer to a test/inventory item; of course, they are
in order.</font> </p>
<p>
<form name="form2" method="post" action="">

<textarea name="myTextarea" rows="25" cols="100" wrap="OFF"
scroll="yes"></textarea>
</p>
<p>
<input type="button" name="myButton" value="DoIt"
onClick="DoIt();">
</p>
</form>
<br>
<p align="center"><font size="5">Modified Directions for Making
&quot;Scoring
System Text File&quot;<br>
for The JavaScript Version of the Universal (Generalized) <br>
Inventory/Test Scorer</font></p>
<p align="left"><font size="4">You should begin by reading all the
directions on
my <a
href="http://207.155.184.74/~Cyberper/quick_start.htm";>quick_start
.htm</a> and <br>
<a
href="http://207.155.184.74/~Cyberper/ANNOUNCEMENT.htm";>ANNOUNCEME
NT.htm</a> web pages.&nbsp; The directions
for how the student/client <br>
answers are to be formatted for the JS version of the Scorer are
identical to
the <br>
directions for the Java version.</font></p>
<p align="left"><font size="4">Regarding the &quot;scoring system
text
file&quot;, you should begin by following the <br>
directions on the two web pages mentioned above.&nbsp; Making the
scoring file <br>
for the Java version is an excellent way to begin to make the scoring
system <br>
file for this JS version. These directions are also on the 2 web
pages noted
above.</font></p>
<p align="left"><font size="4">After you have followed those
directions for
making the scoring system file <br>
you should then make the following modifications:</font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp; ** Remove all
the blank
(empty) LINES between the scoring for the <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; individual
test
items/inventory scales.&nbsp; No blank LINES are to be <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the scoring
file for
the JS version.</font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp; ** Add a
scoring section
for a last BOGUS item.&nbsp; It should look like this: </font></p>
<p align="left"><font
size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
084<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0000</font></p>
<p align="left"><font
size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(in this example, the test had 83 items OR the inventory had 83
scales) </font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp; ** Leave the cursor
right
after this final set of 4 zeros (0000) -- you do NOT <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do two returns as
you do for
the Java scoring system file. </font></p>
<p align="left"><font size="4">That's it. </font></p>
<p align="left"><font size="4">You paste the scoring system (with
modifications
noted). Click the DoIt button. <br>
Paste in the student/client answers and Click the DoIt button AGAIN.
<br>
No need for a third button click, like in the Java version.<br>
<br>
<br>
To use for a second student/client, Click Reload Button on the
browser, then CLICK <br>
BEHIND the address in the browser's address blank and hold down the
Shift key <br>
and hit RETURN. This procedure ensures a clean new loading of the
program. <br>
<br>
**********************<br>
<br>
All users of this JavaScript Scorer program are to be individually
granted <br>
permission to use it AND it is for THEIR USE ONLY. Furthermore, <br>
all users of either version of the program are asked to go to my main
web <br>
page and read it.&nbsp; This is <a
href="http://207.155.184.74/~Cyberper/index.htm";>index.htm</a> or
(equivalently, <a
href="http://207.155.184.74/~Cyberper/it.html";>it.html</a>).</font
></p>
<p align="left">&nbsp;</p>

</body>
</html>

- -->

(end quote)




<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.