Sunteți pe pagina 1din 12

<!DOCTYPE html> <html xmlns="http://www.w3.

org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>German Expressions</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <style type="text/css"> body { text-align:center; } #q_left { float:left; width:47%; } #question { text-align:right; } #q_right { float:right; width:47%; min-height:51px; } #q_right p { display:block; } #solution { text-align:left; } #b_trans { margin-top:6%; } #b_restart1, #b_restart2, #b_restart3 { margin-top:6%; display:none; } #cnt { display:none; } #work { margin-bottom:5%; } </style> <script> var i,j=0; var usage=null; var full=false; var support=0; var question1=[];

var var var var var

solution1=[]; question2=[]; solution2=[]; question3=[]; solution3=[];

var _gaq = _gaq []; _gaq.push(['_setAccount', 'UA-25674214-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.a sync = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://w ww') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefor e(ga, s); })(); function supports_local_storage() { try { return 'localStorage' in window && window['localStorage' ] !== null; } catch(e) { return false; } } function save() { var q_c1=question1.join(' var s_c1=solution1.join(' var q_c2=question2.join(' var s_c2=solution2.join(' var q_c3=question3.join(' var s_c3=solution3.join('

'); '); '); '); '); ');

if(support==true) { localStorage["question1"]=q_c1; localStorage["question2"]=q_c2; localStorage["question3"]=q_c3; localStorage["solution1"]=s_c1; localStorage["solution2"]=s_c2; localStorage["solution3"]=s_c3; } else { alert("Your browser does not support local saving, the d ata will only be saved for this session"); setCookie(question1,q_c1,360); setCookie(question2,q_c2,360); setCookie(question3,q_c3,360); setCookie(solution1,s_c1,360); setCookie(solution2,s_c2,360);

setCookie(solution3,s_c3,360); } } function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); x=x.replace(/^\s+ \s+$/g,""); if (x==c_name) { return unescape(y); } } } function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+ exdate.toUTCString()); document.cookie=c_name + "=" + c_value; } function begin() { document.getElementById('start').style.display = 'inline'; document.getElementById('cnt').style.display = 'none'; if(supports_local_storage) { support=true; } else { support=false; } if(support==true) { if((localStorage!=null)) { full=true; } else { full=false; } } } function load1() { usage=1; document.getElementById('cnt').style.display = 'block'; if((support)&&(full)) { tmpq=localStorage['question1'];

tmps=localStorage['solution1']; } else { var tmpq=getCookie(question1); var tmps=getCookie(solution1); } if((tmpq!=null)&&(tmps!=null)) { question1=tmpq.split(' '); solution1=tmps.split(' '); } else { question1=["Gut. Das ist (sehr) gut", "Schn. Das ist (seh r) schn","Ausgezeichnet","Wunderbar", "Das ist schon besser","Viel besser", "Nich t schlecht","Richtig","Natrlich","Genau","Sind Sie/Bist du sicher?","Nein, das ic ht nicht (ganz) richtig", "Ein Wort ist nicht richtig","Nein, das ist falsch","S ie haben/Du hast mich nicht verstanden. Ich sage es noch einmal", "Sie haben/Du hast den Satz (das Wort) nicht verstanden","Sagen sie/Sag (Versuchen Sie/Versuch )es noch einmal bitte", "Nich so laut bitte","Wrden Sie/Wrden ihr bitte genau zuhre n", "Stehen Sie/Steht bitte auf","Bilden Sie/Bildet einen Kreis","Arbeiten Sie/A rbeitet einen Moment mit Partnern","Bringen Sie/Bringt (Bilder) von zu Hause mit ","(Morgen)haben wir einen Test","Schreiben Sie/Schreibt jetzt bitte","Lesen Sie /Lest jetzt bitte","Ich fange (Wir fangen) jetzt an","Fangen Sie/Fangt jetzt an" ,"Hren Sie/Hrt bitte auf zu schreiben (lesen)","Knnte ich bitte Ihre/eure Aufstze (K lassenarbeiten, Tests, bungsarbeiten, Hausaufgaben) haben?","Jeder verbesser sein e eigene Arbeit","Verbessern Sie Ihre/Verbessere deine Arbeit bitte","Tauschen S ie mit Ihrem/Tausch mit deinem Nachbarn","Machen Sie/Macht die Bcher auf (zu)","S hlagen Sie/Schlagt Seite (11) in Ihrem/eurem Buch auf","Schauen Sie/Schaut beim Sprechen nicht ins Buch","Wiederholen Sie/Wiederholt den Satz (den Ausdruck)","N och einmal bitte","(Etwas) Lauter. (Deutlicher./Langsamer./Schneller)","Sprechen Sie/Sprich bitte deutlicher","(Jan), Sie/du allein","Alle zusammen","Sprechen S ie/Sprecht mir nach","(Nicht) Nachsprechen bitte","Hren Sie/Hrt nur zu. Nur zuhren bitte","Hren Sie/Hrt gut zu","Lessen Sie/Kies den Satz (den Absatz) vor","Jeder li est einen Satz","Fangen Sie/Fang mit Zeile (17) an","Nicht auf Seite (19), auf S eite (20)","Gehen Sie/Geh an die Tafel","(Jan), gehen Sie/gehst du bitte an die Tafel?","Wer geht an die Tafel?","Schreiben Sie/Schreb den Satz (das Wort) an di e Tafel","Schreiben Sie/Schreibt ab, was an der Tafel steht","Wer wei es (die Ant wort)?","Wie sagt man das auf Deutsch (auf Englisch)?","Auf Deutsch bitte","Vers tehen Sie/Verstehst du die Frage (den Satz)?","Ist es (zu) schwer (leicht)?","Si nd Sie/Seid ihr fertig?","Kommen Sie/Komm (morgen) nach der Stunde","Jetzt mache n wir weiter","Jetzt beginnen wir was Neues","Das ist genug fr heute","Hat jemand eine Frage?","Haben Sie/Habt ihr Fragen?","Das verstehe ich nicht","Das habe ic h nicht verstanden","Ah, ich verstehe","Ich wie es nicht","Wie bitte","Wie sagt m an ... auf Deutsch (aud Englisch)?","Knnen Sie den Satz noch einmal sagen bitte?" ,"Kann sie/er den Satz wiederholen bitte?","Ich habe kein Paper (Buch)","Ich hab e keinen Bleistift (Kuli)","Auf welcher Seite sind wir? Welche Zeile?","Wo steht das?","Ich habe eine Frage","Was haben wir fr morgen (Montag) auf?","Sollen wir das schriflich oder mndlich machen?","Wann schreiben wir die nchste Arbeit?","Wann schreiben wir die nchsten Test?","Fr wann (sollen wir das machen)?","Ist das so r ichtig?","(Wann) Knnen Sie mir helfen?","(Wann) Kann ich mit Ihnen sprechen?"]; solution1=["Good. That is (very) good","Nice. That is (v ery) nice","Excellent","Wonderful", "That's better","Much better", "Not bad","Ri ght. Correct","Of course","Exactly","Are you sure?","No, that's not (quite) righ t", "One word isn't right","No, that's wrong","You didn't understand me. I'll sa y it again","You didn't understand the sentence (the word)","Say (Try) it again please", "Not so loud please","Would you please listen carefully","Stand up plea se","Form a circle","Work for a minute with partners","Bring (pictures) along fr

om home","(Tomorrow) we're having a test","Please write now","Please read now"," I'll (We'll) begin now","Begin now","Please stop writting (reading)","Could I pl ease have your essays (quiz, tests, exercises, homework)?","Everyone should corr ect her or his own work(paper)","Please correct your work (paper)","Exchange wit h your neighbor","Open (shut) your books","Turn to page (11) in your books","Don 't look at your book while reading","Repeat the sentence (the expression)","Once again please","(Somewhat) louder. (Clearer./Slower./Faster)","Please speak more distinctly","(Jan), you alone", "All (everybody) together","Repeat after me","D on't repeat after me","Just listen","Listen carefully","Read the sentence (the p aragraph) aloud","Everyone should read one sentence","Begin with line (17)","Not on page (19), on page (20)","Go to the board","(Jan), will you please go to the board","Who will go to the board?","Write the sentence (the word) on the board" ,"Copy what is on the board","Who knows it (the answer)?","How do you say that i n German (in English)?","In German please","Do you understand the question?","Is it (too) difficult (easy)?","Are you finished?","Come see me (tomorrow) after c lass","Now let's do something different","Now let's begin something new","That i s enough for today","Does anyone have a question?","Do you have a question?","I don't understand that","I didn't understand that","Oh, I understand","I don't kn ow (that)","*Said when you don't catch what someone said.* Pardon./Excuse me?/I' m sorry","How do you say ... in German (in English)?","Can you repeat please?"," Can she/he repeat the sentence please?","I don't have any paper (a book)","I don 't have a pencil (a pen)","Which page are we on? Which line?","Where is that?"," I have a question","What do we have due for tomorrow (Monday)?","Should we do th at in writting or orally?","When do we have the next paper (written work)?","Whe n do we have the next test?","For when (are we supposed to do that)?","Is that c orrect?","(When) Can you help me?","(When) Can I see you?"]; } document.getElementById('b_trans').style.display = 'block'; document.getElementById('b_restart1').style.display = 'none'; document.getElementById('b_restart2').style.display = 'none'; document.getElementById('b_restart3').style.display = 'none'; document.getElementById('solution').style.display = 'none'; var size=question1.length; var number=Math.floor(Math.random()*size); if((question1[0]=="") (question1[0]==undefined) (question1[0]= =null)) { alert("Nothing in this envelope; please move an expressi on to this envelope before-hand."); document.getElementById('question').innerHTML="Empty Env elope"; document.getElementById('solution').innerHTML="Empty Env elope"; return; } if((question1[number]=="") (question1[number]==undefined) (que stion1[number]==null)) { load1(); } else { document.getElementById('question').innerHTML=question1[ number]; document.getElementById('solution').innerHTML=solution1[ number]; } }

function load2() { usage=2; document.getElementById('cnt').style.display = 'block'; if((support)&&(full)) { tmpq=localStorage['question2']; tmps=localStorage['solution2']; } else { var tmpq=getCookie(question2); var tmps=getCookie(solution2); } if((tmpq!=null)&&(tmps!=null)) { question2=tmpq.split(' '); solution2=tmps.split(' '); } document.getElementById('b_trans').style.display = 'block'; document.getElementById('b_restart1').style.display = 'none'; document.getElementById('b_restart2').style.display = 'none'; document.getElementById('b_restart3').style.display = 'none'; document.getElementById('solution').style.display = 'none'; var size=question2.length; var number=Math.floor(Math.random()*size); if((question2[0]=="") (question2[0]==undefined) (question2[0]= =null)) { alert("Nothing in this envelope; please move an expressi on to this envelope before-hand."); document.getElementById('question').innerHTML="Empty Env elope"; document.getElementById('solution').innerHTML="Empty Env elope"; return; } if((question2[number]=="") (question2[number]==undefined) (que stion2[number]==null)) { load2(); } else { document.getElementById('question').innerHTML=question2[ number]; document.getElementById('solution').innerHTML=solution2[ number]; } } function load3() { usage=3; document.getElementById('cnt').style.display = 'block';

if((support)&&(full)) { tmpq=localStorage['question3']; tmps=localStorage['solution3']; } else { var tmpq=getCookie(question3); var tmps=getCookie(solution3); } if((tmpq!=null)&&(tmps!=null)) { question3=tmpq.split(' '); solution3=tmps.split(' '); } document.getElementById('b_trans').style.display = 'block'; document.getElementById('b_restart1').style.display = 'none'; document.getElementById('b_restart2').style.display = 'none'; document.getElementById('b_restart3').style.display = 'none'; document.getElementById('solution').style.display = 'none'; var size=question3.length; var number=Math.floor(Math.random()*size); if((question3[0]=="") (question3[0]==undefined) (question3[0]= =null)) { alert("Nothing in this envelope; please move an expressi on to this envelope before-hand."); document.getElementById('question').innerHTML="Empty Env elope"; document.getElementById('solution').innerHTML="Empty Env elope"; return; } if((question3[number]=="") (question3[number]==undefined) (que stion3[number]==null)) { load3(); } else { document.getElementById('question').innerHTML=question3[ number]; document.getElementById('solution').innerHTML=solution3[ number]; } } function position(value) { //cycle through array comparing the string to all others, when f ound, return index if(usage==1) { var tmp=question1.length; for(i=0;i<tmp;i++) {

if(value==question1[i]) { return i; } } } if(usage==2) { var tmp=question2.length; for(i=0;i<tmp;i++) { if(value==question2[i]) { return i; } } } if(usage==3) { var tmp=question3.length; for(i=0;i<tmp;i++) { if(value==question3[i]) { return i; } } } } function move1() { var string=document.getElementById('question').innerHTML; var index=position(string); if(usage==2) { var tmp_q=question2[index]; var tmp_s=solution2[index]; var size=question2.length; for(j=index;j<size;j++) { question2[j]=question2[j+1]; solution2[j]=solution2[j+1]; } question2[j+1]=solution2[j+1]=null; var size1=question1.length; question1[size1]=tmp_q; solution1[size1]=tmp_s; } if(usage==3) { var tmp_q=question3[index]; var tmp_s=solution3[index]; var size=question3.length; for(j=index;j<size;j++)

{ question3[j]=question3[j+1]; solution3[j]=solution3[j+1]; } question3[j+1]=solution3[j+1]=null; var size1=question1.length; question1[size1]=tmp_q; solution1[size1]=tmp_s; } save(); } function move2() { var string=document.getElementById('question').innerHTML; var index=position(string); if(usage==1) { var tmp_q=question1[index]; var tmp_s=solution1[index]; var size=question1.length; for(j=index;j<size;j++) { question1[j]=question1[j+1]; solution1[j]=solution1[j+1]; } question1[j-1]=solution1[j-1]=null; var size1=question2.length; question2[size1]=tmp_q; solution2[size1]=tmp_s; } if(usage==3) { var tmp_q=question3[index]; var tmp_s=solution3[index]; var size=question3.length; for(j=index;j<size;j++) { question3[j]=question3[j+1]; solution3[j]=solution3[j+1]; } question3[j+1]=solution3[j+1]=null; var size1=question2.length; question2[size1]=tmp_q; solution2[size1]=tmp_s; } save(); } function move3()

{ var string=document.getElementById('question').innerHTML; var index=position(string); if(usage==1) { var tmp_q=question1[index]; var tmp_s=solution1[index]; var size=question1.length; for(j=index;j<size;j++) { question1[j]=question1[j+1]; solution1[j]=solution1[j+1]; } question1[j+1]=solution1[j+1]=null; var size1=question3.length; question3[size1]=tmp_q; solution3[size1]=tmp_s; } if(usage==2) { var tmp_q=question2[index]; var tmp_s=solution2[index]; var size=question2.length; for(j=index;j<size;j++) { question2[j]=question2[j+1]; solution2[j]=solution2[j+1]; } question2[j+1]=solution2[j+1]=null; var size1=question3.length; question3[size1]=tmp_q; solution3[size1]=tmp_s; } save(); } function solution() { document.getElementById('b_trans').style.display = 'none'; document.getElementById('solution').style.display = 'block'; if(usage==1) { document.getElementById('b_restart1').style.display = 'b lock'; } if(usage==2) { document.getElementById('b_restart2').style.display = 'b lock'; } if(usage==3) { document.getElementById('b_restart3').style.display = 'b

lock'; } } function reset() { var verify=confirm("Reseting the data will place all the express ions in envelope1 and remove them from number 2 and 3. Do you still wish to cont inue?"); if(verify) { localStorage.removeItem('question1'); localStorage.removeItem('question2'); localStorage.removeItem('question3'); localStorage.removeItem('solution1'); localStorage.removeItem('solution2'); localStorage.removeItem('solution3'); } } /*originally have all values in part1 Check what the values of the cookies are, if they have info, then load them, if not then start with initial enveloppe. on page load, have user chose envelope, load the according arrays (use of innerH TML read and split() ). Give option to move a word choice. -> write in innerHTML in the appropriate zone and remove via search? When move a word, reload arrays. After changing it, set a new cookie with the information Always give option to leave and change envelops */ </script> </head> <body onload="begin()"> <p>German Expression Study Center!</p> <h6>Version 2.3<br/>Virtual enveloppe support in place, permanent save i n place, full set of expressions in place. <br/>Corrections and overview to be done. <br/>If you are having issues, please read the "readme.txt" available at : http://homepage.usask.ca/~rol555/german/readme.txt </h6> <div id="start"> <p>To begin chose the envelope you wish to work with.</p> <button type="button" onclick="load1()">Envelope 1</button> <button type="button" onclick="load2()">Envelope 2</button> <button type="button" onclick="load3()">Envelope 3</button> </div> <div id="cnt"> <div id="work"> <div id="q_left"> <p id="question"></p> </div> <div id="q_right"> <p/> <p id="solution"></p> </div>

</div> <div> <p><br/></p> <div id="b_trans"> <button type="button" onclick="solution()">Check Transla tion</button> </div> <div id="b_restart1"> <button type="button" onclick="load1()">Next Expression< /button> </div> <div id="b_restart2"> <button type="button" onclick="load2()">Next Expression< /button> </div> <div id="b_restart3"> <button type="button" onclick="load3()">Next Expression< /button> </div> <div id="move"> <button type="button" onclick="move1()">Move to envelope 1</button> <button type="button" onclick="move2()">Move to envelope 2</button> <button type="button" onclick="move3()">Move to envelope 3</button> </div> <div> <div/> <div id="reset"> <button type="button" onclick="reset()">Reset al l data</button> </div> </div> </div> </div> <h6>Webpage developed by Ronan Lefol</h6> </body> </html>

S-ar putea să vă placă și