rem: if (CaseSensitive) { if (g==I[q][1][i][0]) break; } else { if (G==I[q][1][i][0].toUpperCase()) break; } } if (i==i_max) { 
add:   if (hp==5 || (hp==6 && I[q][ans][i][2])) {  if (hp==6 && I[q][2]==3) { correct_answer += (correct_answer  ? '&#43;' : '') + I[q][ans][i][0];  } else {  if (window.CaseSensitive) { if (g==I[q][ans][i][0]) break; } else { if (G==I[q][ans][i][0].toUpperCase()) break; } } } } if (i==i_max && g!=correct_answer) { 
context: function hpClickCheck(hp, t, v, args) {	if (t==3) { // JCross		if (v==5 || v==6) {			var q = args[0]; // clue/question number			for (var row=0; row<L.length; row++) {				for (var col=0; col<L[row].length; col++) {					var q = (v==5) ? C[row][col] : CL[row][col];					if (q) {						hpClickCheckJCrossV5V6(hp, v, 'A', q, row, col);						hpClickCheckJCrossV5V6(hp, v, 'D', q, row, col);					}				}			}		}	}	if (t==4) { // JMatch		var a = new Array();		var extra = ''; // extra js code to eval(uate)		var guess = ''; // js code to eval(uate) guess		var correct = ''; // js code to eval(uate) correct answer		if (window.D && window.F) {			// drag-and-drop, i.e. v5+ and v6+ (HP5 and HP6)			a = F;			guess = 'GetJMatchRHS(v,i)';			correct = 'GetJMatchRHS(v,i,true)';		} else  if (window.GetKeyFromSelect) {			// HP6 v6			a = Status;			guess = 'GetJMatchRHS(v,i)';			correct = 'GetJMatchRHS(v,i,true)';		} else if (window.GetAnswer) {			// HP5 v6,v5			a = I;			guess = "(I[i][2]==0||I[i][0]=='')?'':GetAnswer(i)";			correct = 'I[i][3])';					} else if (window.Draggables) {			// HP5 v4			a = Draggables;			s = "Draggables[i].correct=='1'";		} else if (window.CorrectAnswers) {			// HP5 v3			a = CorrectAnswers;			guess = 'document.QuizForm.elements[i*2].selectedIndex';			correct = 'CorrectAnswers[i]';		}		for (var i=0; i<a.length; i++) {			// check this match has not already been finished			if (!HP[_correct][i]) {				// do extra setup, if necessary				if (extra) eval(extra);				// get the guess, if any				var g = ''+eval(guess);				if (g) {					// is the guess correct?					if (g==eval(correct)) {						HP[_correct][i] = g;					} else { // wrong answer						// initialize wrong guess array if necessary						if (!HP[_wrong][i]) HP[_wrong][i] = new Array();						// check to see if the guess is already in the guess array						var i_max = HP[_wrong][i].length;						for (var ii=0; ii<i_max; ii++) {							if (HP[_wrong][i][ii]==g) break;						}						// add the guess if it was not found						if (ii==i_max) {							HP[_wrong][i][ii]=g;						} else {							g = null; // this is not a new answer						}					}					// increment checks for this question, if necessary					if (g) {						if (!HP[_checks][i]) HP[_checks][i] = 0;						HP[_checks][i]++;					}				}			}		}	} // end if JMatch		if (t==5) { // JMix			// get question number (always 0)		var q = args[0];		// check question has not already been answered correctly		if (!HP[_correct][q]) {			// match current guess against possible correct answers			var a_max = Answers.length;			for (var a=0; a<a_max; a++) {				var i_max = Answers[a].length;				for (var i=0; i<i_max; i++) {					if (Answers[a][i] != GuessSequence[i]) break;				}				if (i==i_max) break; // correct answer was found			}			// at this point, (a==a_max) means guess is wrong			// get array of segment texts in this g(uess)			var g = GetJMixSequence(GuessSequence);			// convert g(uess) array and to a s(tring)			var s = '';			var i_max = g.length;			for (var i=0; i<i_max; i++) {				g[i] = trim(g[i]);				if (g[i]!='') {					s += (s=='' ? '' : '+') +  g[i];				}			}			if (s) {				if (a==a_max) { // wrong					if (!HP[_wrong][q]) HP[_wrong][q] = new Array();					var i = HP[_wrong][q].length;					HP[_wrong][q][i] = s;				} else { // correct					HP[_correct][q] = s;				}				// increment checks for this question				if (!HP[_checks][q]) HP[_checks][q] = 0;				HP[_checks][q]++;			}		}	}	if (t==6) { // JQuiz		if (hp==5 || hp==6) {			var q = args[0]; // clue/question number						if (v==5) { // HP5 v5				var g = TrimString(eval('BottomFrame.document.QForm' + q + '.Guess').value);			} else if (v==6) {				var g = args[1]; // guess (ShortAnswer or Hybrid)				// var g = TrimString(eval('document.QForm.Guess').value);			}			// increment check count			if (!HP[_checks][q]) HP[_checks][q] = 0;			HP[_checks][q]++;			if (g) {				var G = g.toUpperCase();				var i_max = I[q][1].length;				for (var i=0; i<i_max; i++) {					if (CaseSensitive) {						if (g==I[q][1][i][0]) break;					} else {						if (G==I[q][1][i][0].toUpperCase()) break;					}				}				if (i==i_max) { // wrong answer					if (!HP[_wrong][q]) HP[_wrong][q] = new Array();					var i_max = HP[_wrong][q].length;					for (var i=0; i<i_max; i++) {						if (HP[_wrong][q]==g) break;					}					if (i==i_max) HP[_wrong][q][i] = g;				} else {					HP[_correct][q] = g;				}			}			// is there a guess? (ShortAnswer or Hybrid)			if (g) {				// initialize guess array if necessary				if (!State[q][6]) State[q][6] = new Array();				// check to see if the guess is already in the guess array				var i_max = State[q][6].length;				for (var i=0; i<i_max; i++) {					if (State[q][6][i]==g) break;				}				// add the guess if it was not found				if (i==i_max) State[q][6][i]=g;			}		}	}	return true;}
meta: 2641	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2641/5237207862290e6950c71339743289f4d2d5f4d3/hotpot-full.js/buggy/mod/hotpot/hotpot-full.js