Site hosted by Angelfire.com: Build your free website today!
'; OutString += '
'; OutString += NavBar; if (Feedback.length>0){ OutString += '' } OutString += '
'; OutString += ''; OutString += Feedback; OutString += '
'; //Write it to the frame TopFrame.document.clear(); TopFrame.document.open(); TopFrame.document.write(OutString); TopFrame.document.close(); } function BuildSelector(){ DropDownList = ''; } function StartUp(){ CorrectIndicator = '' + CorrectIndicator + ''; IncorrectIndicator = '' + IncorrectIndicator + ''; //Write the top frame WriteFeedback(Instructions); //Create the right-item/distractor array, and shuffle it var DuplicateItem = false; for (var i=0; i 0){ TotalUnfixedLeftItems++; } DuplicateItem = false; //and it's not already in the array for (var j=0; j 0){ TempRow = IRow; TempRow = ReplaceStuff('[strLeftItem]', I[i][0], TempRow); //if not fixed and not yet answered correctly if ((I[i][2] < 1)&&(Status[i][0] < 1)){ TempRow = ReplaceStuff('[strRightItem]', DropDownList, TempRow); } else{ TempRow = ReplaceStuff('[strRightItem]', I[i][1], TempRow); } //if it's not fixed, and it's been attempted, mark it appropriately if ((I[i][2] < 1)&&(Status[i][1] > 0)){ if (Status[i][0] < 1){ TempRow = ReplaceStuff('[Mark]', IncorrectIndicator, TempRow); } else{ TempRow = ReplaceStuff('[Mark]', CorrectIndicator, TempRow); } } else{ TempRow = ReplaceStuff('[Mark]', '', TempRow); } TempRow = ReplaceStuff('[INum]', i, TempRow); Exercise += TempRow; } } //Add the check button Exercise += CheckButton; //Make it into a table Exercise = TableOpener + Exercise + TableCloser; } I = new Array(); I[0] = new Array(); I[0][0] = 'Frederick Douglass'; I[0][1] = 'father of the civil rights movement'; I[0][2] = 0; I[1] = new Array(); I[1][0] = 'John Newton'; I[1][1] = 'wrote "Amazing Grace"'; I[1][2] = 0; I[2] = new Array(); I[2][0] = 'Maryland'; I[2][1] = 'first colony to recognize slavery as a legal institution'; I[2][2] = 0; I[3] = new Array(); I[3][0] = 'South Carolina'; I[3][1] = 'almost half of the slaves brought to North America came here'; I[3][2] = 0; I[4] = new Array(); I[4][0] = 'manumit'; I[4][1] = 'formal release from slavery'; I[4][2] = 0; I[5] = new Array(); I[5][0] = 'Oluadah Equiano'; I[5][1] = 'captured at the age of 11 and brought to North America as a slave'; I[5][2] = 0; I[6] = new Array(); I[6][0] = 'Middle Passage'; I[6][1] = 'journey of a slave ship from Africa\'s "slave coast" to the Americas'; I[6][2] = 0; I[7] = new Array(); I[7][0] = 'primary sources'; I[7][1] = 'diaries, letters, journals, photographs, or autobiographies'; I[7][2] = 0; I[8] = new Array(); I[8][0] = 'fight with Covey'; I[8][1] = 'turning point in the life of Frederick Douglass'; I[8][2] = 0; I[9] = new Array(); I[9][0] = 'synecdoche'; I[9][1] = 'a figure of speech in which a part represents the whole'; I[9][2] = 0; I[10] = new Array(); I[10][0] = 'Virginia Slave Codes'; I[10][1] = '"sealed the fate of African Americans for generations to come"'; I[10][2] = 0; I[11] = new Array(); I[11][0] = 'code song'; I[11][1] = 'had details that provided information to help slaves escape'; I[11][2] = 0; I[12] = new Array(); I[12][0] = 'abolitionist'; I[12][1] = 'a person who fought to get rid of the institution of slavery'; I[12][2] = 0; I[13] = new Array(); I[13][0] = 'metaphor'; I[13][1] = 'figure of speech that makes a comparison between two unlike things without the use of specific words of comparison'; I[13][2] = 0; I[14] = new Array(); I[14][0] = 'American Memory'; I[14][1] = 'an “on-line archive of primary sources that relates to the history and culture of America”'; I[14][2] = 0; Status = new Array(); RItems = new Array(); function CreateStatusArrays(){ for (var x=0; x-1){ FirstBit = InString.substring(0, i); LastBit = InString.substring(i + Token.length, InString.length); InString = FirstBit + Replacement + LastBit; i = InString.indexOf(Token); } return InString; } function EscapeDoubleQuotes(InString){ var Result = ''; for (var i=0; i 0)){ //if it hasn't been answered correctly yet if (Status[i][0] < 1){ //Add one to the number of tries for this item Status[i][1]++; //Get the answer if (GetAnswer(i) == I[i][3]){ //The answer is correct, so set the status flag Status[i][0] = 1; } //else the answer is wrong, so remember that else{ AllDone = false; } } //If it's correct, count it if (Status[i][0] == 1){ TotCorrectChoices++; } } } //Calculate the score var Score = Math.floor(((TotCorrectChoices-Penalties)/TotalUnfixedLeftItems)*100); var Feedback = ''; //Build the feedback if (AllDone == true){ Feedback = CorrectResponse + '
' + YourScoreIs + Score + '%.'; } else{ Feedback = IncorrectResponse + '
' + YourScoreIs + Score + '%.'; //Penalty for incorrect check Penalties++; } //Show the feedback and rebuild the exercise WriteFeedback(Feedback); BuildExercise(); DisplayExercise(Exercise); } function Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>