ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd"> <HTML> <HEAD> <TITLE>Newspaper in Education Presents: Teaching Diversity </TITLE> <script type="text/javascript"><!-- var course_name="Diversity"; // --> </script> <script type="text/javascript"><!-- var iPg = 1; var iPgTot = 20; var iPg2 = 1; var iPg2Tot = 29; var iChPg = 1; var iChPgTot = 6; var iChPg2 = 1; var iChPg2Tot = 6; var sChapTit = ""; var sChapNam = ""; // --> </script> <SCRIPT type="text/javascript"><!-- var tmp1 = ""; var indexstart= new Date(); // time on course tmp1 = unescape(document.location.toString()); var student_id = ""; var student_name = ""; var API; var scores = new Array(); var maxScores = new Array(); //Cookie script function getCookieVal(j) { var endstr = document.cookie.indexOf(";",j); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(j, endstr)); } // Function to get a specific value from input URL function GetValue(inString, strVal) { i1 = inString.toLowerCase().indexOf(strVal.toLowerCase()); var value =""; if (i1 != -1) { var tmp1 = inString.substring(i1+strVal.length, inString.length); i1 = tmp1.indexOf("&"); if (i1 == -1) i1 = tmp1.length; value = tmp1.substring(tmp1.indexOf("=")+1, i1); } else { value = ""; } return RemBlanks(value); } function RemBlanks(inString) { i = 0; bFound = 0; iStart = 0; iLen = inString.length; while ((i < iLen) && (bFound == 0)) { if (inString.charAt(i) == " ") { iStart++; } else { bFound = 1; } i++; } if (bFound == 1) {inString = inString.substring(iStart,iLen);} bFound = 0; iLen = inString.length; i = iLen-1; while ((i > 0) && (bFound == 0)) { if (inString.charAt(i) != " ") {bFound = 1;} else {i--;} } if (bFound == 1) { inString = inString.substring(0,i+1); } return (inString); } // --> </SCRIPT> <SCRIPT type="text/javascript"><!-- /* For maxgrade & mastery so we can do percentages */ var iTstCnt = 0; var sGran = 0; var mastery = new Array(iTstCnt); var maxgrade = new Array(iTstCnt); var isSurvey = new Array(iTstCnt); var iTstNoTrack = new Array(iTstCnt); var iTstNotInCert = new Array(iTstCnt); // --> </SCRIPT> <SCRIPT type="text/javascript"><!-- /* For certificate generation */ var course_title="Newspaper in Education Presents: Teaching Diversity "; var master_title="Certificate of Completion"; var master_act="has completed a one-hour course in the teaching of"; var comp_title="Certificate of Completion"; var comp_act="has completed"; var iShowScore = 0; var iShowDate = 1; var iBestFirst = 1; var iLastTest = 4; var fCertPerc = 0.000000; var nameText = "Please enter your name for your certificate"; var iUseTitle = "0"; // --> </SCRIPT> <SCRIPT type="text/javascript"><!-- // Function to check if score should be entered into list of scores // based on first/best status function appendScore(idx, scoreval) { if (idx<iTstCnt) { if ((scores[idx] != null)&&(iTstNoTrack[idx] == 0)) { if (iBestFirst == 0) /* check for best score */ { if (scoreval > parseInt(scores[idx])) scores[idx] = scoreval; } else { scores[idx] = scoreval; } } else if (iTstNoTrack[idx] == 0) { scores[idx] = scoreval; } var arg = ""; for (var i = 0; i < iTstCnt; i++) { if (scores[i]==null) { } else { arg = arg+scores[i]; } arg = arg+","; } /* save scores for future use */ cook_name='WCB'+course_name+'Score'; document.cookie= cook_name+"="+arg+" ; expires= Tue, 01-Apr-2036 00:00:01 GMT "; } } /* Check if student has mastered the tests */ function checkScores() { var total = 0; var mastered = 1; var mxgrd = 0; var bDone = 0; if (iLastTest == 1) /* all tests mastered */ { for (var i = 0; i < iTstCnt; i++) { if ((isSurvey[i] == 0)&&(iTstNoTrack[i] == 0)&& (iTstNotInCert[i] == 0)) { if (scores[i] == null) { mastered = 0; } else { if (scores[i] < mastery[i]) { mastered = 0; } } if ((maxgrade[i] != null)&&(iTstNoTrack[i] == 0)) mxgrd += maxgrade[i]; } } } else if (iLastTest == 2) // only check the last test { var i1 = 0; mastered = 0; while ((bDone == 0) && (i1 < iTstCnt)) { if ((isSurvey[iTstCnt-i1-1] == 0)&&(iTstNoTrack[iTstCnt-i1-1] == 0) &&(iTstNotInCert[iTstCnt-i1-1] == 0)) { if (maxgrade[iTstCnt-i1-1] != null) mxgrd += maxgrade[iTstCnt-i1-1]; if (scores[iTstCnt-i1-1] == null) { mastered = 0; } else { if (scores[iTstCnt-i1-1] >= mastery[iTstCnt-i1-1]) { mastered = 1; } } bDone = 1; } else { i1++; } } } else if ((iLastTest == 3) || (iLastTest == 4)) // check selected tests { for (var i = 0; i < iTstCnt; i++) { if ((isSurvey[i] == 0) && (iTstNoTrack[i] == 0) && (iTstNotInCert[i] == 0)) { if (iLastTest == 3) { // must master all selected if (scores[i] == null) { mastered = 0; } else { if (scores[i] < mastery[i]) { mastered = 0; } } } else { // add up scores if (scores[i] == null) { } else { total += scores[i]; } } if (maxgrade[i] != null) mxgrd += maxgrade[i]; } } if (iLastTest == 4) { if (mxgrd > 0) { if ((100*total/mxgrd) < fCertPerc) { mastered = 0; } } } } else if (iLastTest == 5) /* Master one or more selected tests */ { mastered = 0; for (var i = 0; i < iTstCnt; i++) { if ((isSurvey[i] == 0) && (iTstNoTrack[i] == 0) && (iTstNotInCert[i] == 0)) { if (scores[i] == null) { } else { if (scores[i] >= mastery[i]) { mastered = 1; } } if (maxgrade[i] != null) mxgrd += maxgrade[i]; } } } if ((scores.length == 0) && (mxgrd > 0)) mastered = 0; pass = mastered; return mastered; } function getScore() { var total = 0; var val = ""; var mscore = 0; if (iLastTest == 1) { for (var i = 0; i < iTstCnt; i++) { if ((scores[i] != null)&&(iTstNoTrack[i] == 0)&&(iTstNotInCert[i]==0)) { total += scores[i]; } if ((iTstNoTrack[i] == 0)&&(iTstNotInCert[i]==0)) mscore += maxgrade[i]; } } else if (iLastTest == 2) // only check the last test { // find last test, in case there is a survey or untracked test var iLast = iTstCnt-1; var bDone = false; while ((iLast > 0) && (bDone == false)) { if ((iTstNoTrack[iLast] == 1) || (iTstNotInCert[iLast] == 1) || (isSurvey[iLast] == 1)) { iLast--; } else { bDone = true; } } if ((scores[iLast] != null)&&(iTstNoTrack[iLast] == 0)&&(iTstNotInCert[iLast]==0)) { total = scores[iLast]; } if ((iTstNoTrack[iLast] == 0)&&(iTstNotInCert[iLast]==0)) mscore = maxgrade[iLast]; } else if ((iLastTest == 3) || (iLastTest == 4) || (iLastTest == 5)) { for (var i = 0; i < iTstCnt; i++) { if ((scores[i] != null) && (iTstNoTrack[i] == 0)&&(iTstNotInCert[i]==0)) { total += scores[i]; } if ((iTstNoTrack[i] == 0)&&(iTstNotInCert[i]==0)) { mscore += maxgrade[i]; } } } if (iShowScore == 2) { val = total+'/'+mscore; } else if (iShowScore ==1) { if (mscore != 0) { val = Math.round((total/mscore)*100); } else { val=100; } } return val; } function RecoverScores() { // Scores is number right. Need to retrieve from a cookie var str = ""; cook_name='WCB'+course_name+'Score'; var arg = cook_name; var alen = arg.length; var clen = document.cookie.length; var i = 0; for (i = 0; i < iTstCnt; i++) { scores[i] = null; } i = 0; while (i < clen){ var j = i + alen; if (document.cookie.substring(i,j) == arg) { str=getCookieVal(j); i = clen+1; } else { i = document.cookie.indexOf(" ",i)+1; } if (i == 0) break; } str = str.substring(str.indexOf("=")+1,str.length); var total = 0; var i, i2, i3, itot; i = 0; i2 = 0; itot = str.length; while (i2 < itot) { i3 = str.indexOf(",", i2); if (i3 > i2) { scores[i] = parseInt(str.substring(i2, i3),10); i++; i2 = i3; } else { i++; } i2++; } } // May need to store/recover student name for certificate function SaveStudentName(val) { cook_name='WCB'+course_name+'Student'; document.cookie= cook_name+"="+val+"; expires= Tue, 01-Apr-2036 00:00:01 GMT "; } function RecoverStudentName() { var str = ""; cook_name='WCB'+course_name+'Student'; var arg = cook_name; var alen = arg.length; var clen = document.cookie.length; var i = 0; //for (i = 0; i < iTstCnt; i++) // { // scores[i] = null; // } i = 0; while (i < clen){ var j = i + alen; if (document.cookie.substring(i,j) == arg) { str=getCookieVal(j); i = clen+1; } else { i = document.cookie.indexOf(" ",i)+1; } if (i == 0) break; } str = str.substring(str.indexOf("=")+1,str.length); return str; } // At startup, look for student_id. If none, check for cookie. If none, // prompt user for their name if (student_id.length < 1) { student_id = RecoverStudentName(); if (student_id.length < 1) { student_id = GetValue(tmp1, "student_id"); } if (student_id.length < 1) { if (API != null){ student_id = API.LMSGetValue("cmi.core.student_name");} } if (student_id.length < 1) { if (student_name) student_id = student_name; } if (student_id.length < 1) { student_id = prompt(nameText, student_id); } } // Don't save to cookie if we have an API if (API == null){SaveStudentName(student_id);} function clearCookies() { cook_name='WCB'+course_name+'Score'; document.cookie= cook_name+"=, ; expires= Tue, 01-Apr-1999 00:00:01 GMT "; cook_name='WCB'+course_name+'Student'; document.cookie= cook_name+"=, ; expires= Tue, 01-Apr-1999 00:00:01 GMT "; } RecoverScores(); // Find out scores from before // --> </SCRIPT> <SCRIPT type="text/javascript"><!-- // To dynamically load a CSS file + vertical/horiz var css1 = GetValue(unescape(top.document.location.toString()), "css"); var iVert = GetValue(unescape(top.document.location.toString()), "iVert"); if (iVert.length < 1) iVert = 0; if (css1.length < 1) css1 = "orange-corner.css"; document.writeln('<link rel="stylesheet" HREF="'+css1+'" TYPE="text/css">'); // --> </SCRIPT> <SCRIPT type="text/javascript"><!-- /* To jump to a specific page from URL */ var loaded = 0; function loadstart(){ if (loaded == 0) { var tmp2 = unescape(document.location.toString()); var start_file = GetValue(tmp2, "start_file"); if (start_file.length < 1) start_file = "main.htm"; window.hub.location=start_file; loaded = 1; } } // --> </SCRIPT> <frameset cols="150,*" border="0" framespacing="0" FRAMEBORDER="no"> <FRAME SRC="sidebar.htm" NAME="sidebar" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="AUTO" > <FRAMESET ROWS="31,*" BORDER="0" FRAMESPACING="0" FRAMEBORDER="no"> <FRAME SRC="menu.htm" NAME="bottom" SCROLLING="NO" MARGINWIDTH="0" MARGINHEIGHT="0"> <FRAME SRC="main.htm" NAME="hub" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="AUTO" OnLoad='javascript:loadstart();'></frameset> </frameset> <NOFRAMES><CENTER><H3>No Frames ... <P><A accesskey="N" HREF="main.htm">Click</A></H3></CENTER></noframes> </HTML>