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v*V_e_qЏhPNְ#Jk 6һitR_OG:`iv1+1iZyxzFBkZ\qF7my FTwOg-qv[b݃$4In+OmhUµPj771#l?Q{E1**QG7U>a `OZ ww'(X:&,euG{:tyiJrNM) n=:ićI8WX,#YNC0g=yP:g;c;)uq*@>c,Q0"˂7aw)E\  H?0[i[C Kœ~x?0)SITiKCѣת4j6QM6o62 } pA\!?o^k솮&1&G9̰ ܿ)l`ռES:][fruܗq!p"wbfW9Sgf")ӛ"N R,i83\2dXq뚕 b G\Wti{8U,E_i=u&"Tb㓎I=jYίsֹc+ŷNu{m6F+9RHܟ־XץPf ds޵z},&.+%z[!&6e,ySUC*P=G'hyNj5MYemϯkrѼwx6eO/ien}[L w* 3NR%t=K>'t,AyhN|6O7^uU.=\#`*!`~^x18J]'9Sޒc8n5'j~@֭0\^@RB^~Y11BZ/ݜ]6TeN_i5 Mׇ 2ǢR+? fUqu՟xOT:G$y^q_y[12yd5kc8:G/32GMmP~dֳn?wĖuU3.gs}̍F?=Mw.mF zz?} т)k s,ZU苃Obַ ּEo&ȟ}]Čuyg߳췰]jߍtKow#q ϯ56_'FOKMj UJS*[%ki~:i0qLvN:skmd>/Z!ݍʯFBE}nU^Z>OG9sVJ/?&M e?|KAG-' aIL5&I 9eS'կ (ƛ]#l$ߙ#jV\0?xrqǵvѵqWie>՟ K oV8e9z{}ŤuG6<{_n :B$|%Kƙj=YXkX#;#μ']յnŭ\oPU{N+kraU)Wm>ZvA5qU-ooRkLAFX!wXk_ĒGE-'彳|팜kVg~g 8bs*s5+&;m@Ru 1 ccKwZ'b88f2n7ZFm^kjP,6nr NS|-$s K xA]K RYv B@8$JuZT-?>R<[w&ym F&61GLWx3> x\.qR3nB/7x>#1X m_S3 06=c O$o@lwʋ02;d]}$0pJToK*<*T\P uT),5p(7A~#&\m#WOL#8%d+o 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 InArray[Longest].length){ Longest = i; } } return Longest; } //UNICODE CHARACTER FUNCTIONS function IsCombiningDiacritic(CharNum){ var Result = (((CharNum >= 0x0300)&&(CharNum <= 0x370))||((CharNum >= 0x20d0)&&(CharNum <= 0x20ff))); Result = Result || (((CharNum >= 0x3099)&&(CharNum <= 0x309a))||((CharNum >= 0xfe20)&&(CharNum <= 0xfe23))); return Result; } function IsCJK(CharNum){ return ((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.GetL()){if(X<=this.GetR()){if(Y>=this.GetT()){if(Y<=this.GetB()){Result=true;}}}} return Result; } Card.prototype.Inside=CardInside; function CardSwapColours(){ var c=this.css.backgroundColor; this.css.backgroundColor=this.css.color; this.css.color=c; } Card.prototype.SwapColours=CardSwapColours; function CardHighlight(){ this.css.backgroundColor='#ff80ff'; this.css.color='#000046'; } Card.prototype.Highlight=CardHighlight; function CardUnhighlight(){ this.css.backgroundColor='#000046'; this.css.color='#ff80ff'; } Card.prototype.Unhighlight=CardUnhighlight; function CardOverlap(OtherCard){ var smR=(this.GetR()<(OtherCard.GetR()+this.OverlapTolerance))? this.GetR(): (OtherCard.GetR()+this.OverlapTolerance); var lgL=(this.GetL()>OtherCard.GetL())? this.GetL(): OtherCard.GetL(); var HDim=smR-lgL; if (HDim<1){return 0;} var smB=(this.GetB()OtherCard.GetT())? this.GetT(): OtherCard.GetT(); var VDim=smB-lgT; if (VDim<1){return 0;} return (HDim*VDim); } Card.prototype.Overlap=CardOverlap; function CardDockToR(OtherCard){ this.SetL(OtherCard.GetR() + 5); this.SetT(OtherCard.GetT()); } Card.prototype.DockToR=CardDockToR; function CardSetHome(){ this.HomeL=this.GetL(); this.HomeT=this.GetT(); } Card.prototype.SetHome=CardSetHome; function CardGoHome(){ this.SetL(this.HomeL); this.SetT(this.HomeT); } Card.prototype.GoHome=CardGoHome; function doDrag(e) { if (CurrDrag == -1) {return}; if (C.ie){var Ev = window.event}else{var Ev = e} var difX = Ev.clientX-window.lastX; var difY = Ev.clientY-window.lastY; var newX = DC[CurrDrag].GetL()+difX; var newY = DC[CurrDrag].GetT()+difY; DC[CurrDrag].SetL(newX); DC[CurrDrag].SetT(newY); window.lastX = Ev.clientX; window.lastY = Ev.clientY; return false; } function beginDrag(e, DragNum) { CurrDrag = DragNum; if (C.ie){ var Ev = window.event; document.onmousemove=doDrag; document.onmouseup=endDrag; } else{ var Ev = e; window.onmousemove=doDrag; window.onmouseup=endDrag; } DC[CurrDrag].Highlight(); topZ++; DC[CurrDrag].css.zIndex = topZ; window.lastX=Ev.clientX; window.lastY=Ev.clientY; return false; } function endDrag(e) { if (CurrDrag == -1) {return}; DC[CurrDrag].Unhighlight(); if (C.ie){document.onmousemove=null}else{window.onmousemove=null;} onEndDrag(); CurrDrag = -1; //Need a bugfix for Opera focus problem here if (C.opera){FocusAButton();} return true; } var CurrDrag = -1; var topZ = 100; //JMIX DRAG-DROP OUTPUT FORMAT CODE var Punctuation = '\u002E'; var Openers = ''; var CorrectResponse = 'Correcto!'; var IncorrectResponse = 'Tenta de novo'; var ThisMuchCorrect = ''; var TheseAnswersToo = ''; var YourScoreIs = 'A tua pontuação é'; var NextCorrect = ''; var FeedbackWidth = 200; //default var ExBGColor = '#000046'; var PageBGColor = '#ff80ff'; var TextColor = '#ff80ff'; var TitleColor = '#000046'; var DropTotal = 3; // number of lines that will be available for dropping on var Gap = 4; //Gap between two segments when they're next to each other on a line var DropHeight = 30; var CapitalizeFirst = false; var CompiledOutput = ''; var TempSegment = ''; var FirstSegment = -1; var FirstDiv = -1; var Penalties = 0; var Score = 0; var TimeOver = false; var CurrDrag = -1; var topZ = 100; var Cds = new Array(); var L = new Array(); var Finished = false; var Locked = false; var DivWidth = 600; var LeftColPos = 100; var DragTop = 120; var DragNumber = -1; Lines = new Array(); function CapFirst(InString){ var i = 0; if ((Openers.indexOf(InString.charAt(i))>-1)||(InString.charAt(i) == ' ')){ i++; } if ((Openers.indexOf(InString.charAt(i))>-1)||(InString.charAt(i) == ' ')){ i++; } var Temp = InString.charAt(i); Temp = Temp.toUpperCase(); InString = InString.substring(0, i) + Temp + InString.substring(i+1, InString.length); return InString; } function CheckResults(ChkType){ //Get sequence student has chosen GetGuessSequence(); //Compile the answer CompiledOutput = CompileString(GuessSequence); //Check the answer CheckAnswer(ChkType); } function GetGuessSequence(){ //Put pointers to draggables in arrays based on the lines they're sitting on var Drops = new Array(); for (var i=0; i -4)){ Drops[j][Drops[j].length] = Cds[i]; } } } //Sort the drop arrays based on the Left of each div for (i=0; i 0){ NewFirstDiv = Drops[i][0].index; break; } } return NewFirstDiv; } function CompDrags(a,b){ return a.GetL() - b.GetL(); } function FindSegment(SegID){ var Seg = ''; for (var i=0; i 0){ OutString = OutArray[0]; } else{ OutString = ''; } var Spacer = ''; for (i=1; i -1)||(Punctuation.indexOf(OutArray[i].charAt(0)) > -1)){ Spacer = ''; } OutString = OutString + Spacer + OutArray[i]; } //Capitalize the first letter if necessary if (CapitalizeFirst == true){ OutString = CapFirst(OutString); } return OutString; } function CheckAnswer(CheckType){ if (Locked == true){return;} if (GuessSequence.length < 1){ if (CheckType == 1){ Penalties++; ShowMessage(NextCorrect + '

' + FindSegment(Answers[0][0])); } return; } var i = 0; var j = 0; var k = 0; var WellDone = ''; var WhichCorrect = -1; var TryAgain = ''; var LongestCorrectBit = ''; TempCorrect = new Array(); LongestCorrect = new Array(); var TempHint = ''; var HintToReturn = 1; var OtherAnswers = ''; var AllDone = false; for (i=0; i LongestCorrect.length){ LongestCorrect.length = 0; for (k=0; k -1){ AllDone = true; for (i=0; i

' + CorrectResponse + '
'; //Do score calculation here Score = Math.floor(((Segments.length-Penalties) * 100)/Segments.length); WellDone += YourScoreIs + ' ' + Score + '%.
'; if (OtherAnswers.length > 0){ WellDone += TheseAnswersToo + '' + OtherAnswers + ''; } ShowMessage(WellDone); WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); } else{ TryAgain = '' + CompileString(GuessSequence) + '

'; if ((CheckType == 0)||(LongestCorrect.length==0)){ TryAgain += IncorrectResponse + '
'; } if (LongestCorrect.length > 0){ LongestCorrectBit = CompileString(LongestCorrect); GuessSequence.length = LongestCorrect.length; TryAgain += '
' + ThisMuchCorrect + '
' + LongestCorrectBit + '
'; } if (CheckType == 1){ TryAgain += '
' + NextCorrect + '
' + FindSegment(HintToReturn); } Penalties++; //Penalty for inaccurate check ShowMessage(TryAgain); } //If the exercise is over, deal with that if ((AllDone == true)||(TimeOver == true)){ TimeOver = true; Locked = true; Finished = true; setTimeout('Finish()', SubmissionTimeout); WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); } } var Segments = new Array(); Segments[0] = new Array(); Segments[0][0] = '\u0074\u0065\u0061\u0074\u0072\u006F'; Segments[0][1] = 5; Segments[0][2] = 0; Segments[1] = new Array(); Segments[1][0] = '\u0069\u0072\u006D\u00E3\u006F'; Segments[1][1] = 9; Segments[1][2] = 0; Segments[2] = new Array(); Segments[2][0] = '\u006D\u0069\u006E\u0068\u0061'; Segments[2][1] = 12; Segments[2][2] = 0; Segments[3] = new Array(); Segments[3][0] = '\u006F\u006E\u0074\u0065\u006D'; Segments[3][1] = 2; Segments[3][2] = 0; Segments[4] = new Array(); Segments[4][0] = '\u006D\u00E3\u0065\u002E'; Segments[4][1] = 13; Segments[4][2] = 0; Segments[5] = new Array(); Segments[5][0] = '\u006D\u0065\u0075'; Segments[5][1] = 8; Segments[5][2] = 0; Segments[6] = new Array(); Segments[6][0] = '\u0066\u0075\u0069'; Segments[6][1] = 3; Segments[6][2] = 0; Segments[7] = new Array(); Segments[7][0] = '\u0063\u006F\u006D'; Segments[7][1] = 6; Segments[7][2] = 0; Segments[8] = new Array(); Segments[8][0] = '\u0061\u006F'; Segments[8][1] = 4; Segments[8][2] = 0; Segments[9] = new Array(); Segments[9][0] = '\u0045\u0075'; Segments[9][1] = 1; Segments[9][2] = 0; Segments[10] = new Array(); Segments[10][0] = '\u0061'; Segments[10][1] = 11; Segments[10][2] = 0; Segments[11] = new Array(); Segments[11][0] = '\u006F'; Segments[11][1] = 7; Segments[11][2] = 0; Segments[12] = new Array(); Segments[12][0] = '\u0065'; Segments[12][1] = 10; Segments[12][2] = 0; var GuessSequence = new Array(); var Answers = new Array(); Answers[0] = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13); function doDrag(e) { if (CurrDrag == -1) {return}; if (C.ie){var Ev = window.event}else{var Ev = e} var difX = Ev.clientX-window.lastX; var difY = Ev.clientY-window.lastY; var newX = Cds[CurrDrag].GetL()+difX; var newY = Cds[CurrDrag].GetT()+difY; Cds[CurrDrag].SetL(newX); Cds[CurrDrag].SetT(newY); window.lastX = Ev.clientX; window.lastY = Ev.clientY; return false; } function beginDrag(e, DragNum) { CurrDrag = DragNum; if (C.ie){ var Ev = window.event; document.onmousemove=doDrag; document.onmouseup=endDrag; } else{ var Ev = e; window.onmousemove=doDrag; window.onmouseup=endDrag; } Cds[CurrDrag].SwapColours(); topZ++; Cds[CurrDrag].css.zIndex = topZ; window.lastX=Ev.clientX; window.lastY=Ev.clientY; return true; } function endDrag(e) { if (CurrDrag == -1) {return}; Cds[CurrDrag].SwapColours(); if (C.ie){document.onmousemove=null}else{window.onmousemove=null;} onEndDrag(); CurrDrag = -1; return true; } function onEndDrag(){ //Snap to lines var i = 0; var SnapLine = Cds[CurrDrag].GetT(); var BiggestOverlap = -1; var OverlapRect = 0; for (i=0; i OverlapRect){ OverlapRect = Cds[CurrDrag].Overlap(L[i]); BiggestOverlap = i; } } if (BiggestOverlap > -1){ SnapLine = L[BiggestOverlap].GetB() - (Cds[CurrDrag].GetH() + 2); Cds[CurrDrag].SetT(SnapLine); CheckOver(-1); } if (CapitalizeFirst==true){ setTimeout('DoCapitalization()', 50); } } function DoCapitalization(){ //Capitalize first segment if necessary var FD = GetGuessSequence(); if ((FD == -1)&&(FirstDiv > -1)){ Cds[FirstDiv].elm.innerHTML = Segments[FirstDiv][0]; } if (((FD != FirstDiv)&&(CapitalizeFirst == true))&&(FD > -1)){ if (FirstDiv > -1){ Cds[FirstDiv].elm.innerHTML = Segments[FirstDiv][0]; } } if ((FD > -1)&&(CapitalizeFirst == true)){ var Temp = CapFirst(Segments[FD][0]); Cds[FD].elm.innerHTML = Temp; FirstDiv = FD; } } function CheckOver(NoMove){ //This recursive function spreads out the Cards on a line if two of them are overlapping; //if the spread operation moves one beyond the end of a line, it wraps it to the next line. for (var i=0; i 0){ if ((i==NoMove)||(Cds[i].GetL() < Cds[j].GetL())){ Cds[j].DockToR(Cds[i]); if (Cds[j].GetR() > (LeftColPos + DivWidth)){ Cds[j].SetL(LeftColPos); Cds[j].SetT(Cds[j].GetT() + DropHeight); } CheckOver(j); } else{ Cds[i].DockToR(Cds[j]); if (Cds[i].GetR() > (LeftColPos + DivWidth)){ Cds[i].SetL(LeftColPos); Cds[i].SetT(Cds[i].GetT() + DropHeight); } CheckOver(i); } } } } } } function StartUp(){ Segments = Shuffle(Segments); //Calculate page dimensions and positions pg = new PageDim(); DivWidth = Math.floor((pg.W*4)/5); LeftColPos = Math.floor(pg.W/10); DragTop = parseInt(document.getElementById('CheckButtonDiv').offsetHeight) + parseInt(document.getElementById('CheckButtonDiv').offsetTop) + 10; var CurrTop = DragTop + 10; //Position the drop divs for (var i=0; i //]]>

ordenação de frases

ordenação de frases

Ordena as palavras para construires uma frase correcta