rem: var x = HP[_correct][q]; 
add: var x = (HP[_correct][q]) ? HP[_correct][q] : ''; 
context: function GetJQuizQuestionDetails(hp, v) {	var qDetails = '';	// HP5.5 uses "Status" for v5 and v6 JMatch quizzes (HP6 uses "State")	// var hp =  (window.Status) ? 5 : (window.State) ? 6 : 0;	// check the quiz version	if (hp==5 || hp==6) {		// get details for each question		var max_q = (hp==5) ? Status.length : State.length;		for (var q=0; q<max_q; q++) {			// skip this question if it was not used (HP6 v6 only)			if (hp==6 && !State[q]) continue;			// format 'Q' (a padded, two-digit version of 'q')			var Q = getQ('JQuiz', q);			// add separator			if (JQuiz[0]) qDetails += makeSeparator(Q);			if (hp==6 && JQuiz[11]) { // question type				var x = parseInt(I[q][2]);				x = (x==0) ? 'multiple-choice' : (x==1) ? 'short-answer' : (x==2) ? 'hybrid' : (x==3) ? 'multi-select' : 'n/a';				qDetails += hpHiddenField(Q+'type', x);			}			// score (as %)			var x = (hp==5) ? Status[q][4]*10 : I[q][0]*State[q][0];			if (x<0) x = 0;			qDetails += hpHiddenField(Q+'score', Math.floor(x)+'%');			if (hp==6 && JQuiz[10]) { // weighting				qDetails += hpHiddenField(Q+'weighting', I[q][0]);			}			if (JQuiz[1]) { // question text				var x = (hp==5) ? I[q][0] : (document.getElementById) ? GetChildNodesText(document.getElementById('Q_'+q), 'QuestionText') : '';				qDetails += hpHiddenField(Q+'question', x);			}			if (JQuiz[2]) { // student's correct answers				var x = HP[_correct][q];				qDetails += hpHiddenField(Q+'correct', x);			}			if (JQuiz[3]) { // ignored and wrong answers				var x = (hp==5) ? new Array() : GetJQuizAnswerDetails(q, 1);				if (hp==5) {					for (var i=0; i<I[q][1].length; i++) {						var correct = HP[_correct][q] ? HP[_correct][q] : '';						if (I[q][1][i][0] && I[q][1][i][0].toUpperCase()!=correct.toUpperCase()) {							x[x.length] = I[q][1][i][0];						}					}				}				if (DB[0] || x) qDetails += hpHiddenField(Q+'other', x);			}			if (hp==6 && JQuiz[7]) { // all selected answers				var x = GetJQuizAnswerDetails(q, 0);				qDetails += hpHiddenField(Q+'selected', x);			}			if (JQuiz[8]) { // wrong answers				if (hp==6) {					var x = GetJQuizAnswerDetails(q, 3);					var i_max = (State[q][6]==null) ? 0 : (State[q][6].length - (State[q][0]<0||x.length ? 0 : 1));					for (var i=0; i<i_max; i++) {						x[x.length] = State[q][6][i];					}				} else if (hp==5) {					var x = HP[_wrong][q];				}				qDetails += hpHiddenField(Q+'wrong', x);			}			if (hp==6 && JQuiz[9]) { // ignored answers				var x = GetJQuizAnswerDetails(q, 4);				qDetails += hpHiddenField(Q+'ignored', x);			}			if (JQuiz[4]) { // number of hints				var x = (HP[_hints][q]) ? HP[_hints][q] : 0;				qDetails += hpHiddenField(Q+'hints', x);			}			if (JQuiz[5] || JQuiz[12]) { // number of checks				if (JQuiz[12]) { // strictly checks only					var x = (HP[_checks][q]) ? HP[_checks][q] : 0;				} else { // checks (+ hints in HP6)					var x = (hp==5) ? Status[q][1] : (State[q][2]-1);				}				qDetails += hpHiddenField(Q+'checks', x);			}			if (JQuiz[13]) { // ShowAnswer				var x = (HP[_clues][q]) ? HP[_clues][q] : 0;				qDetails += hpHiddenField(Q+'clues', x);			}		} // end for	} // end if	return qDetails;}
meta: 2641	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2641/5237207862290e6950c71339743289f4d2d5f4d3/hotpot-full.js/buggy/mod/hotpot/hotpot-full.js