Project

General

Profile

« Previous | Next » 

Revision 4887

omit the demographic data - this is not well-defined for the prototype

View differences:

lib/style/skins/first/search.js
209 209
function generateQuery(docObjs, metadataObjs) {
210 210
	//alert("calling method");
211 211
	
212
	//make parameter at some point
213
	var includeDemographicData = false;
214
	
212 215
	//construct the assessment metadata attribute selection snippet
213 216
	var metadataAttributes = "";
214 217
	var index = 0;
......
281 284
				+ "</datapackage>";
282 285
				
283 286
			//select the demographic data
284
			if (containsDemographicData) {
285
				tempQuery +=
286
					"<datapackage id=\"" + docId + "\">"
287
						+ "<entity index=\"1\">"
288
							//omit student id attribute
289
							+ "<attribute index=\"1\"/>"
290
							+ "<attribute index=\"2\"/>"
291
							+ "<attribute index=\"3\"/>"
292
						+ "</entity>"
293
					+ "</datapackage>";	
287
			if (includeDemographicData) {
288
				if (containsDemographicData) {
289
					tempQuery +=
290
						"<datapackage id=\"" + docId + "\">"
291
							+ "<entity index=\"1\">"
292
								//omit student id attribute
293
								+ "<attribute index=\"1\"/>"
294
								+ "<attribute index=\"2\"/>"
295
								+ "<attribute index=\"3\"/>"
296
							+ "</entity>"
297
						+ "</datapackage>";	
298
				}
299
				else {
300
					tempQuery +=
301
						"<staticItem name=\"demographic_1\" value=\"\" />"
302
						+ "<staticItem name=\"demographic_2\" value=\"\" />"
303
						+ "<staticItem name=\"demographic_3\" value=\"\" />";
304
				}
294 305
			}
295
			else {
296
				tempQuery +=
297
					"<staticItem name=\"demographic_1\" value=\"\" />"
298
					+ "<staticItem name=\"demographic_2\" value=\"\" />"
299
					+ "<staticItem name=\"demographic_3\" value=\"\" />";
300
			}
301 306
				
302 307
			//select the metadata
303 308
			tempQuery += metadataAttributeSelection;

Also available in: Unified diff