[Building Sakai] [samigo-team] Loss of precision when instructor exports the assessment's results

RAUL SANCHEZ VEGAS raulsv at um.es
Mon Nov 18 01:59:00 PST 2013


Hi

Yes, SAM-1562 fixes the Gradebook export but not the Samigo export. We 
have developed a patch for 2.9.x(attached within this mail) which fixes 
the Samigo export. If you agree we could upload this patch to SAM-1562 
or open new Jira.

Thanks,
Raúl

El 16/11/2013 0:48, Sanghyun S. Jeon escribió:
>
> Thank you for your explanation.
>
> S
>
> *From:*samigo-team-bounces at collab.sakaiproject.org 
> [mailto:samigo-team-bounces at collab.sakaiproject.org] *On Behalf Of 
> *Karen Tsao
> *Sent:* Friday, November 15, 2013 3:08 PM
> *To:* Sanghyun Jeon
> *Cc:* sakai-dev; Samigo Team
> *Subject:* Re: [samigo-team] [Building Sakai] Loss of precision when 
> instructor exports the assessment's results
>
> Hi Sanghyun,
>
> No one has looked into Raul's issue yet. And so there is no fix for 
> that scenario. If you have the same scenario as what Raul has, you 
> will still have loss precision problem.
>
> As Samigo also has export feature, just to clarify, the fix for 
> SAM-1562 is in Gradebook. The Gradebook export, not Samigo.
>
> Thanks,
> Karen
>
> On Fri, Nov 15, 2013 at 2:34 PM, Sanghyun Jeon <euksa99 at gmail.com 
> <mailto:euksa99 at gmail.com>> wrote:
>
> We plan to use Sakai 2.9.3 Next semester. During our test, we find out 
> that Sakai 2.9.3 still has the described issue of SAM 1562. Would you 
> mind confirming this?
>
> Thank you in advance.
>
> S
>
> On Mon, Oct 7, 2013 at 6:16 AM, Neal Caidin <neal.caidin at apereo.org 
> <mailto:neal.caidin at apereo.org>> wrote:
>
> Hi Raúl,
>
> Does this look like the issue?
>
> https://jira.sakaiproject.org/browse/SAM-1562
>
> Looks like it was fixed in 2.9.0 . Which version are you seeing this 
> problem on?
>
> Cheers,
>
> Neal
>
> Neal Caidin
>
> Sakai CLE Community Coordinator
>
> neal.caidin at apereo.org <mailto:neal.caidin at apereo.org>
>
> Skype: nealkdin
>
> Twitter: ncaidin
>
> On Oct 7, 2013, at 2:50 AM, RAUL SANCHEZ VEGAS <raulsv at um.es 
> <mailto:raulsv at um.es>> wrote:
>
>     Hi all
>
>     We have found an issue related to the loss of precision in the
>     final scores.
>
>     Steps to reproduce the issue:
>
>     1. The instructor publishes the assessment called
>     "Assessment"(attached to this mail).
>     2. The student answers all questions correctly:
>
>         3 questions: Every question worth 2 points so the student gets
>     6 points as total score.
>
>     3. The instructor exports the results to an excel file.(using
>     button 'Export').
>     4. The total score is 5.999999 instead of 6 points in the excel
>     file. The final score is displayed correctly: 6 points on the
>     "Total Scores"  web page.
>
>     This loss of precision only happens sometimes.
>
>     It happens in Sakai 2.9.x
>     too(http://qa1-nl.sakaiproject.org/portal/): Samigo uses float
>     precision in 2.9.x instead of double precision as Samigo does in
>     trunk.
>
>     At this example the final score is 6 on the "Total Scores" web
>     page while the final score is 5.9999 in the Excel file. The reason
>     is that the final score is rounded by the method
>     [samigo-app]AgentResults.getRoundedFinalScore()  on "Total Scores"
>     web page while the final score is not rounded in the Excel file.
>
>     Should it be opened a new Jira with this issue?
>
>     Regards
>
>     <Assessment.zip>_______________________________________________
>     samigo-team mailing list
>     samigo-team at collab.sakaiproject.org
>     <mailto:samigo-team at collab.sakaiproject.org>
>     http://collab.sakaiproject.org/mailman/listinfo/samigo-team
>
>
> _______________________________________________
> samigo-team mailing list
> samigo-team at collab.sakaiproject.org 
> <mailto:samigo-team at collab.sakaiproject.org>
> http://collab.sakaiproject.org/mailman/listinfo/samigo-team
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org 
> <mailto:sakai-dev at collab.sakaiproject.org>
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to 
> sakai-dev-unsubscribe at collab.sakaiproject.org 
> <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject 
> of "unsubscribe"
>
>
>
> _______________________________________________
> samigo-team mailing list
> samigo-team at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/samigo-team

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131118/f88ee15d/attachment.html 
-------------- next part --------------
Index: samigo-services/src/java/org/sakaiproject/tool/assessment/facade/AssessmentGradingFacadeQueries.java
===================================================================
--- samigo-services/src/java/org/sakaiproject/tool/assessment/facade/AssessmentGradingFacadeQueries.java	(revision 131691)
+++ samigo-services/src/java/org/sakaiproject/tool/assessment/facade/AssessmentGradingFacadeQueries.java	(working copy)
@@ -96,6 +96,7 @@
 import org.springframework.orm.hibernate3.HibernateCallback;
 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 import org.sakaiproject.event.cover.EventTrackingService;
+import org.apache.commons.math.util.MathUtils;
 
 public class AssessmentGradingFacadeQueries extends HibernateDaoSupport implements AssessmentGradingFacadeQueriesAPI{
   private static Log log = LogFactory.getLog(AssessmentGradingFacadeQueries.class);
@@ -2056,7 +2057,7 @@
 			  //gopalrc - Dec 2007
 			  int sectionScoreColumnStart = responseList.size();
 			  if (showPartAndTotalScoreSpreadsheetColumns) {
-				  Float finalScore = assessmentGradingData.getFinalScore();
+				  Float finalScore = MathUtils.round(assessmentGradingData.getFinalScore(), 2);
 				  if (finalScore != null) {
                       responseList.add((Double)finalScore.doubleValue()); // gopal - cast for spreadsheet numerics
 				  } else {


More information about the sakai-dev mailing list