Project

General

Profile

« Previous | Next » 

Revision 3669

add support for selecting records for only one question from a set of one or more assessment response data files

View differences:

assessmentQuery.jsp
6 6
import="java.io.*"%><%
7 7

  
8 8
String[] docids = request.getParameterValues("docids");
9
String questionId = request.getParameter("questionId");
9 10
String qformat = request.getParameter("qformat");
10 11

  
11 12
if (docids != null && docids.length > 0) {
......
25 26
	fileName += ".csv";
26 27
	
27 28
	//AssessmentQuery.testEcogrid("edml.4.5");
28
	ResultSet rs = AssessmentQuery.selectResponseData(assessmentDocIds);
29
	ResultSet rs = AssessmentQuery.selectResponseData(assessmentDocIds, questionId, "=", new Integer(1));
29 30
	
30 31
	if (rs == null) {
31 32
		return;
......
40 41
		Writer writer = new OutputStreamWriter(response.getOutputStream());
41 42
		CSVWriter csv = new CSVWriter(writer, CSVWriter.DEFAULT_SEPARATOR, CSVWriter.NO_QUOTE_CHARACTER);
42 43
		csv.writeAll(rs, true);
44
		csv.flush();
43 45
		
44 46
		response.flushBuffer();
45 47
		

Also available in: Unified diff