Project

General

Profile

« Previous | Next » 

Revision 4792

handle case when there is a single question on the assessment

View differences:

lib/style/skins/first/search.js
50 50
			documentObject.demographicData = submitFormObj[documentObject.docid + "demographicData"].value;
51 51
				
52 52
			var questionIds = new Array();
53
			for (var z = 0; z < submitFormObj[documentObject.docid].length; z++) {
54
				questionIds[z] = submitFormObj[documentObject.docid][z].value;
53
			if (submitFormObj[documentObject.docid].length > 1) {
54
				for (var z = 0; z < submitFormObj[documentObject.docid].length; z++) {
55
					questionIds[z] = submitFormObj[documentObject.docid][z].value;
56
				}
55 57
			}
58
			else {
59
				questionIds[0] = submitFormObj[documentObject.docid].value;
60
			}
56 61
			
57 62
			documentObject.questionIds = questionIds;
58 63
			documentObjects[0] = documentObject;

Also available in: Unified diff