[Contrib: Evaluation System] Help with RSF/Evalsys

Brian Jones bjones86 at uwo.ca
Wed Mar 27 12:44:34 PDT 2013


Hi,

I'm trying to introduce a new reporting style for the evaluation system, but
I'm having some difficulty hooking it all up properly. I'll try to explain
what I've done as clearly as possible; any help is appreciated :)

ReportExporter.java (interface):
	- changed method signature for buildReport to include new parameter:
		public void buildReport( EvalEvaulation evaluation, String[]
groupIds, OutputStream outputStream, boolean useNewReportStyle );

XLSReportExporter.java (and other *ReportExporter.java classes):
	- updated buildReport() to include new parameter:
		public void buildReport( ...., boolean useNewReportStyle )
		{
			if( useNewReportStyle )
				buildReportNewStyle( evaluation, groupIds,
outputStream );
			else
			{
				// continue default report style
			}
		}

BaseViewParameters.java:
	- added new instance member:
		public boolean useNewReportStyle;

DownloadReportViewParams.java:
	- added new parameter to contructor:
		public DownloadReportViewParams( ...., boolean
useNewReportStyle )
		{
			...
			...
			this.useNewReportStyle = useNewReportStyle;
		}

ReportsViewingProducer.java:
	- added static class member to hold default value from
sakai.properties:
		Private static Boolean useNewReportStyle =
ServerConfigurationService.getBoolean( "evalsys.report.new.style.default",
false );

	- added a checkbox to display the value retrieved from
sakai.properties (eventually I want this checkbox to toggle between new/old
report style, but that hasn't been implemented yet)
		UIBranchContainer newReportStyle = UIBranchContainer.make(
tofill, "useNewReportStyle:" );
		UIBoundBoolean.make( newReportStyle, "useNewReportStyle",
useNewReportStyle );

	- added the new parameter to the DownloadReportViewParams object
used to create the top links (csvResultsExporter, xlsResultsExporter, etc.):
		UIInternalLink.make( tofill, "xlsResultsReport",
UIMessage.make( "viewreport.view.xls" ), new DownloadReportViewParams(
"xlsResultsReport", templateId, reportViewParams.evaluationId,
reportViewParams.groupIds, evaltitle + ".xls", useNewReportStyle ) );

ReportExporterBean.java:
	- modified the exporter.buildReport() calls to include new
parameter:
		exporter.buildReport( evaluation, drvp.groupIds,
resultsOutputStream, dvrp.useNewReportStyle );
		xlsReportExporter.buildReport( evaluation, dvrp.groupIds,
resultsOutputStream, dvrp.useNewReportStyle );

So, when I get to the Reports interface, the checkbox correctly displays the
value retrieved from sakai.properties (if it's false, the checkbox is not
checked, if it's true, the checkbox is checked). However, that value never
seems to make it past this interface.

The way I understand it, the value is included in the
DownloadReportViewParams object that is given when the top Report links are
created. However, when I debug it, it always ends up being false, so the
'new' report style is never triggered.

I was assuming that somewhere along the lines, the flow gets intercepted and
maybe the ViewParams object gets copied or parsed somehow where it doesn't
know about my new 'useNewReportStyle' member, so it just always get's
instantiated to false during the copy. I thought maybe it was the
ReportViewParamsInterceptor that was responsible for this. However, when
debugging and program flow hits ReportViewParamsInterceptor
.adjustViewParameters(ViewParameters incoming), the 'incoming' object
already has the wrong value for useNewReportStyle.

So I'm drawing blanks as to where to look/what to do, and I'm hoping someone
out there might be able to point me in the right direction or let me know
what I'm doing wrong.

Thanks in advance,

Brian Jones
Applications Development
Information Technology Services
Support Services Building, Room 4326
Western University
(519) 661-2111 x86969
bjones86 at uwo.ca





More information about the evaluation mailing list