hotpotatoes


 

 
What’s Your Job?

 

 

 

// <![CDATA[
<!–

//MDH_SCORM modification to support SCORM 1.2 functionality on LMS
/* JavaScript to find the SCORM API if it is available */
/* Based on a model at */

var API = null; /* SCORM API */

/* look up through the frameset hierarchy for the SCORM API */
function findAPI(win)
{
while ((win.API == null) && (win.parent != null) && (win.parent != win))
{
win = win.parent;
}
API = win.API;
}

/* initialize the SCORM API */
function initAPI(win)
{
/* look for the SCORM API up in the frameset */
findAPI(win);

/* if we still have not found the API, look at the opener and its frameset */
if ((API == null) && (win.opener != null))
{
findAPI(win.opener);
}
}

var ScormSubmitted = false; //use this to check whether LMSFinish has been called later.

function ScormStartUp(){
initAPI(window);
if (API != null){
API.LMSInitialize(”);
API.LMSSetValue(‘cmi.core.lesson_status’, ‘browsed’);
API.LMSSetValue(‘cmi.core.score.min’, 0);
API.LMSSetValue(‘cmi.core.score.max’, 100);
API.LMSCommit(”);
}
}

function CheckLMSFinish(){
if (API != null){
if (ScormSubmitted == false){
API.LMSCommit(”);
API.LMSFinish(”);
ScormSubmitted = true;
}
}
}

function SetScormIncomplete(){
if (ScormSubmitted == true){
return;
}
SetScormScore();
if (API != null){
API.LMSSetValue(‘cmi.core.lesson_status’, ‘incomplete’);
API.LMSSetValue(‘cmi.core.session_time’, MillisecondsToTime((new Date()).getTime() – ScormStartTime));
API.LMSCommit(”);
}
}

function SetScormComplete(){
if (API != null){
API.LMSSetValue(‘cmi.core.session_time’, MillisecondsToTime((new Date()).getTime() – ScormStartTime));
API.LMSSetValue(‘cmi.core.lesson_status’, ‘completed’);
SetScormScore();
API.LMSCommit(”);
API.LMSFinish(”);
ScormSubmitted = true;
}
}

var ScormStartTime = (new Date()).getTime();

var SuspendData = ”;

function SetScormTimedOut(){
if (API != null){
if (ScormSubmitted == false){
SetScormScore();
API.LMSSetValue(‘cmi.core.exit’, ‘time-out’);
API.LMSCommit(”);
CheckLMSFinish();
}
}
}

//TIME RENDERING FUNCTION
function MillisecondsToTime(Seconds){
Seconds = Math.round(Seconds/1000);
var S = Seconds % 60;
Seconds -= S;
if (S < 10){S = '0' + S;}
var M = (Seconds / 60) % 60;
if (M < 10){M = '0' + M;}
var H = Math.floor(Seconds / 3600);
if (H 1);
if (this.gecko){
this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf(‘Gecko’)+6, this.ua.length));
if (this.geckoVer 1);

//Look for Safari
this.safari = (this.ua.indexOf(‘Safari’) > 1);
if (this.safari){
this.gecko = false;
}

//Look for IE
this.ie = (this.ua.indexOf(‘MSIE’) > 0);
if (this.ie){
this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf(‘MSIE’)+5, this.ua.length));
if (this.ieVer 0);
if (this.opera){
this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf(‘Opera’)+6, this.ua.length));
if (this.operaVer < 7.04){this.min = false;}
}
if (this.min == false){
alert('Your browser may not be able to handle this page.');
}

//Special case for the horrible ie5mac
this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6));
}

var C = new Client();

//for (prop in C){
// alert(prop + ': ' + C[prop]);
//}

//CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS

//[strNavBarJS]
function NavBtnOver(Btn){
if (Btn.className != 'NavButtonDown'){Btn.className = 'NavButtonUp';}
}

function NavBtnOut(Btn){
Btn.className = 'NavButton';
}

function NavBtnDown(Btn){
Btn.className = 'NavButtonDown';
}
//[/strNavBarJS]

function FuncBtnOver(Btn){
if (Btn.className != 'FuncButtonDown'){Btn.className = 'FuncButtonUp';}
}

function FuncBtnOut(Btn){
Btn.className = 'FuncButton';
}

function FuncBtnDown(Btn){
Btn.className = 'FuncButtonDown';
}

function FocusAButton(){
if (document.getElementById('CheckButton1') != null){
document.getElementById('CheckButton1').focus();
}
else{
if (document.getElementById('CheckButton2') != null){
document.getElementById('CheckButton2').focus();
}
else{
document.getElementsByTagName('button')[0].focus();
}
}
}

//CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX

var topZ = 1000;

function ShowMessage(Feedback){
var Output = Feedback + '

';
document.getElementById('FeedbackContent').innerHTML = Output;
var FDiv = document.getElementById('FeedbackDiv');
topZ++;
FDiv.style.zIndex = topZ;
FDiv.style.top = TopSettingWithScrollOffset(30) + 'px';

FDiv.style.display = 'block';

ShowElements(false, 'input');
ShowElements(false, 'select');
ShowElements(false, 'object');
ShowElements(true, 'object', 'FeedbackContent');

//Focus the OK button
setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);

//
}

function ShowElements(Show, TagName, ContainerToReverse){
// added third argument to allow objects in the feedback box to appear
//IE bug — hide all the form elements that will show through the popup
//FF on Mac bug : doesn't redisplay objects whose visibility is set to visible
//unless the object's display property is changed

//get container object (by Id passed in, or use document otherwise)
TopNode = document.getElementById(ContainerToReverse);
var Els;
if (TopNode != null) {
Els = TopNode.getElementsByTagName(TagName);
} else {
Els = document.getElementsByTagName(TagName);
}

for (var i=0; i<Els.length; i++){
if (TagName == "object") {
//manipulate object elements in all browsers
if (Show == true){
Els[i].style.visibility = 'visible';
//get Mac FireFox to manipulate display, to force screen redraw
if (C.mac && C.gecko) {Els[i].style.display = '';}
}
else{
Els[i].style.visibility = 'hidden';
if (C.mac && C.gecko) {Els[i].style.display = 'none';}
}
}
else {
// tagName is either input or select (that is, Form Elements)
// ie6 has a problem with Form elements, so manipulate those
if (C.ie) {
if (C.ieVer ReduceToSize){
ItemToDump = Math.floor(InArray.length*Math.random());
InArray.splice(ItemToDump, 1);
}
}

function Shuffle(InArray){
var Num;
var Temp = new Array();
var Len = InArray.length;

var j = Len;

for (var i=0; i<Len; i++){
Temp[i] = InArray[i];
}

for (i=0; i<Len; i++){
Num = Math.floor(j * Math.random());
InArray[i] = Temp[Num];

for (var k=Num; k < (j-1); k++) {
Temp[k] = Temp[k+1];
}
j–;
}
return InArray;
}

function WriteToInstructions(Feedback) {
document.getElementById('InstructionsDiv').innerHTML = Feedback;

}

function EscapeDoubleQuotes(InString){
return InString.replace(/"/g, '"')
}

function TrimString(InString){
var x = 0;

if (InString.length != 0) {
while ((InString.charAt(InString.length – 1) == '\u0020') || (InString.charAt(InString.length – 1) == '\u000A') || (InString.charAt(InString.length – 1) == '\u000D')){
InString = InString.substring(0, InString.length – 1)
}

while ((InString.charAt(0) == '\u0020') || (InString.charAt(0) == '\u000A') || (InString.charAt(0) == '\u000D')){
InString = InString.substring(1, InString.length)
}

while (InString.indexOf(' ') != -1) {
x = InString.indexOf(' ')
InString = InString.substring(0, x) + InString.substring(x+1, InString.length)
}

return InString;
}

else {
return '';
}
}

function FindLongest(InArray){
if (InArray.length < 1){return -1;}

var Longest = 0;
for (var i=1; i InArray[Longest].length){
Longest = i;
}
}
return Longest;
}

//UNICODE CHARACTER FUNCTIONS
function IsCombiningDiacritic(CharNum){
var Result = (((CharNum >= 0x0300)&&(CharNum = 0x20d0)&&(CharNum = 0x3099)&&(CharNum = 0xfe20)&&(CharNum = 0x3000)&&(CharNum < 0xd800));
}

//SETUP FUNCTIONS
//BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED
function ClearTextBoxes(){
var NList = document.getElementsByTagName('input');
for (var i=0; i -1)||(NList[i].id.indexOf(‘Gap’) > -1)){
NList[i].value = ”;
}
if (NList[i].id.indexOf(‘Chk’) > -1){
NList[i].checked = ”;
}
}
}

//EXTENSION TO ARRAY OBJECT
function Array_IndexOf(Input){
var Result = -1;
for (var i=0; i<this.length; i++){

if (this[i] == Input){
Result = i;
}
}
return Result;
}
Array.prototype.indexOf = Array_IndexOf;

//IE HAS RENDERING BUG WITH BOTTOM NAVBAR
function RemoveBottomNavBarForIE(){
if ((C.ie)&&(document.getElementById('Reading') != null)){
if (document.getElementById('BottomNavBar') != null){
document.getElementById('TheBody').removeChild(document.getElementById('BottomNavBar'));
}
}
}

//HOTPOTNET-RELATED CODE

var HPNStartTime = (new Date()).getTime();
var SubmissionTimeout = 30000;
var Detail = ''; //Global that is used to submit tracking data

function Finish(){
//If there's a form, fill it out and submit it
if (document.store != null){
Frm = document.store;
Frm.starttime.value = HPNStartTime;
Frm.endtime.value = (new Date()).getTime();
Frm.mark.value = Score;
Frm.detail.value = Detail;
Frm.submit();
}
}

//JMATCH-SPECIFIC SCORM-RELATED JAVASCRIPT CODE

function SetScormScore(){
//Reports the current score and any other information back to the LMS
if (API != null){
API.LMSSetValue('cmi.core.score.raw', Score);

//Now send a detailed reports on the item
var ItemLabel = 'Matching';
API.LMSSetValue('cmi.objectives.0.id', 'obj'+ItemLabel);
API.LMSSetValue('cmi.interactions.0.id', 'int'+ItemLabel);
API.LMSSetValue('cmi.objectives.0.status', API.LMSGetValue('cmi.core.lesson_status'));
API.LMSSetValue('cmi.objectives.0.score.min', '0');
API.LMSSetValue('cmi.objectives.0.score.max', '100');
API.LMSSetValue('cmi.objectives.0.score.raw', Score);
//We can only use the performance type, because we're storing multiple responses of various types.
API.LMSSetValue('cmi.interactions.0.type', 'performance');

var AnswersTried = '';
for (var i=0; i0){AnswersTried += ‘ | ‘;}
for (var j=0; j0){AnswersTried += ‘,’;}
AnswersTried += j + ‘.’ + Status[j][3][i];
}
}
API.LMSSetValue(‘cmi.interactions.0.student_response’, AnswersTried);
API.LMSCommit(”);
}
}

//JMATCH CORE JAVASCRIPT CODE

var CorrectIndicator = ‘:-)’;
var IncorrectIndicator = ‘X’;
var YourScoreIs = ‘Your score is ‘;
var CorrectResponse = ‘Correct! Well done.’;
var IncorrectResponse = ‘Sorry! Try again. Incorrect matches have been removed.’;
var TotalUnfixedLeftItems = 0;
var TotCorrectChoices = 0;
var Penalties = 0;
var Finished = false;
var TimeOver = false;

var Score = 0;
var Locked = false;
var ShuffleQs = false;
var QsToShow = 15;

function StartUp(){
RemoveBottomNavBarForIE();

ScormStartUp();

SetUpItems(ShuffleQs,QsToShow);

TotalUnfixedLeftItems = document.getElementById(‘MatchDiv’).getElementsByTagName(‘select’).length;

//Create arrays
CreateStatusArrays();

}

Status = new Array();

function CreateStatusArrays(){
var Selects = document.getElementById(‘Questions’).getElementsByTagName(‘select’);
for (var x=0; x 0){
var Select = Container.getElementsByTagName(‘select’)[0];
if (Select != null){
Result = parseInt(Select.id.substring(1, Select.id.length));
}
}
return Result;
}

function GetKeyFromSelect(Select){
var Result = -1;
if (Select != null){
Result = parseInt(Select.id.substring(1, Select.id.length));
}
return Result;
}

var OriginalKeys = new Array();
var ReducedKeys = new Array();

function GetUniqueKeys(Container, TargetArray){
TargetArray.length = 0;
var x = -1;
var SList = Container.getElementsByTagName(‘select’);
if (SList.length > 0){
for (var i=0; i<SList.length; i++){
x = GetKeyFromSelect(SList[i]);
if (TargetArray.indexOf(x) 0){
QList.push(Qs.removeChild(Qs.getElementsByTagName(‘tr’)[0]));
}

var Reducing = (QList.length > ReduceTo);

//If required, select random rows to delete
if (Reducing == true){
var DumpItem = 0;
while (ReduceTo < QList.length){

//Get a number to delete from the array
DumpItem = Math.floor(QList.length*Math.random());
for (i=DumpItem; i<(QList.length-1); i++){
QList[i] = QList[i+1];
}
QList.length = QList.length-1;
}
}
//Shuffle the rows if necessary
if (ShuffleQs == true){
QList = Shuffle(QList);
}

TotalUnfixedLeftItems = QList.length;

//Write the rows back to the table body
for (i=0; i<QList.length; i++){
Qs.appendChild(QList[i]);
}

//Now we need to remove any drop-down options that no longer have associated select items
if (Reducing == true){
GetUniqueKeys(Qs, ReducedKeys);

Selects = Qs.getElementsByTagName('select');
for (i=0; i=0; j–){
if (OptionRequired(Options[j].value) == false){
Selects[i].removeChild(Options[j]);
}
}
}
}
}

function OptionRequired(Key){
if (ReducedKeys.indexOf(Key) > -1){
return true;
}
else{
if (OriginalKeys.indexOf(Key) > -1){
return false;
}
else{
return true;
}
}
}

function CheckAnswers(){
if (Locked == true){return;}
var Select = null;
var Key = -1;
var Parent = null;
var Answer = null;
var AnsText = ”;
var AllDone = true;
TotCorrectChoices = 0;

//for each item not fixed or a distractor
for (var i=0; i<Status.length; i++){

//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 a pointer to the drop-down
Select = document.getElementById(Status[i][2]);
Key = GetKeyFromSelect(Select);
//Save the answer given
Status[i][3].push(Select.options[Select.selectedIndex].value);

//Check the answer
if (Select.options[Select.selectedIndex].value == Key){
Status[i][0] = 1;
AnsText = Select.options[Select.selectedIndex].innerHTML;
Parent = Select.parentNode;
Parent.removeChild(Select);
Parent.innerHTML = AnsText;
Parent.nextSibling.innerHTML = CorrectIndicator;
}
else{
AllDone = false;
Parent = Select.parentNode;
Parent.nextSibling.innerHTML = IncorrectIndicator;
}
}
else{
//Add a copy of the last (correct) answer.
Status[i][3].push(Status[i][3][Status[i][3].length-1]);
}
//If it's correct, count it
if (Status[i][0] == 1){
TotCorrectChoices++;
}
}
//Calculate the score
Score = Math.floor(((TotCorrectChoices-Penalties)/TotalUnfixedLeftItems)*100);
if (Score
// ]]>

 

 

 

 

What’s Your Job?

Listen to the video. The interviewer asks people on the street Whats your job?

What does he find out? Match the people to their jobs. Watch the video as many times as necessary. When you have finished, click on the Check button.

 Check 

Alan is a store manager.
is a housewife.
is a salesman.
is a police officer.is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed.is a musician. 

is a nurse.

Charlie is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.
is a police officer in New York City.is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Dave is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.
is a police officer in New York City.
is a gardener.
is a teacher.a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

kevin is a store manager.is a housewife. 

is a salesman. 

is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser.is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Helen is a store manager.
is a housewife.
is a salesman.is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor.is unemployed. 

is a musician. 

is a nurse.

Mark is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician.is a nurse.

Maureen is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.
is a police officer in New York City.
is a gardener.is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Nicola is a store manager. 

is a housewife. 

is a salesman. 

is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden.is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Harry is a store manager.
is a housewife.is a salesman. 

is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver.is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Eileen is a store manager.
is a housewife.
is a salesman.
is a police officer.is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed.is a musician. 

is a nurse.

Myra is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.
is a police officer in New York City.is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Paula is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.
is a police officer in New York City.
is a gardener.
is a teacher.a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Stu is a store manager.is a housewife. 

is a salesman. 

is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser.is a taxi driver. 

is an actor. 

is unemployed. 

is a musician. 

is a nurse.

Mary is a store manager.
is a housewife.
is a salesman.is a police officer. 

is a librarian. 

is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor.is unemployed. 

is a musician. 

is a nurse.

Jeffrey is a store manager.
is a housewife.
is a salesman.
is a police officer.
is a librarian.is a police officer in New York City. 

is a gardener. 

is a teacher. 

a traffic warden. 

is a hairdresser. 

is a taxi driver. 

is an actor. 

is unemployed. 

is a musician.is a nurse.

 Check 

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: