[Building Sakai] [Contrib: Evaluation System] Help with RSF/Evalsys

Rick Moyer rmoyer at umd.edu
Wed Mar 27 14:57:53 PDT 2013


Brian,

	I think your issue is with UIInternalLink.  This is populated when the page is displayed, therefore no changes to the fields are reflected.

	What I do is something like this, create a button which sends all you data to a bean.  

	UICommand.make(reportForm, "submit-admin-report", "Submit", reportBean + "processAdminReport");

	Then in the interceptActionResult method of the producer

	EvalConfigReportParameters vp = (EvalConfigReportParameters) actionReturn;	//incoming;
	result.resultingView =  new DownloadReportViewParams("xlsAdminResultsReport", vp.evalTerm, vp.report, vp.orderBy, vp.filename);

	Which in turns fires off the ReportExporterBean and finally XLSAdminResultsReportExporter.
		
Hope this helps, if you anything else, please let me know

Rick

-----Original Message-----
From: evaluation-bounces at collab.sakaiproject.org [mailto:evaluation-bounces at collab.sakaiproject.org] On Behalf Of Brian Jones
Sent: Wednesday, March 27, 2013 3:45 PM
To: sakai-dev at collab.sakaiproject.org; evaluation at collab.sakaiproject.org
Subject: [Contrib: Evaluation System] Help with RSF/Evalsys

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



_______________________________________________
evaluation mailing list
evaluation at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/evaluation

TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the sakai-dev mailing list