Revision 5081
Added by ben leinfelder about 15 years ago
download.jsp | ||
---|---|---|
435 | 435 |
if (temp != null && temp.length > 0) { |
436 | 436 |
pivot = Integer.parseInt(temp[0]); |
437 | 437 |
} |
438 |
String[] pivotColumns = null; |
|
439 |
temp = params.get("pivotColumns"); |
|
440 |
if (temp != null && temp.length > 0) { |
|
441 |
pivotColumns = temp; |
|
442 |
} |
|
438 | 443 |
|
439 | 444 |
//get the results as csv file |
440 | 445 |
if (qformat != null && qformat.equalsIgnoreCase("csv")) { |
... | ... | |
448 | 453 |
try { |
449 | 454 |
if (transpose) { |
450 | 455 |
List pivotCols = new ArrayList(); |
451 |
pivotCols.add("studentid"); |
|
452 |
pivotCols.add("score"); |
|
453 |
pivotCols.add("response"); |
|
454 |
pivotCols.add("responsefile"); |
|
456 |
if (pivotColumns != null) { |
|
457 |
for (int i = 0; i < pivotColumns.length; i++) { |
|
458 |
pivotCols.add(pivotColumns[i]); |
|
459 |
} |
|
460 |
} else { |
|
461 |
pivotCols.add("studentid"); |
|
462 |
pivotCols.add("score"); |
|
463 |
pivotCols.add("response"); |
|
464 |
pivotCols.add("responsefile"); |
|
465 |
} |
|
455 | 466 |
List transposedTable = transpose(rs, observation, pivot, pivotCols, true); |
456 | 467 |
csv.writeAll(transposedTable); |
457 | 468 |
} else { |
Also available in: Unified diff
allow user to specify the data columns included for the transpose data set (score, response, response file).
decided in today's CC