Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-42637

Gradebook errors manipulating grades using percentage entry and comma-decimals

    XMLWordPrintable

    Details

    • Test Plan:
      Hide
      1. Create a site with the language set to one that uses comma decimals, e.g., French or Spanish, a roster, and the Gradebook tool included.
      2. Go to Gradebook > Settings > Grade Entry.
      3. Set the grade entry to Percentages and Save Changes.
      4. Add a gradebook item.
      5. Enter some grades with decimals in them for students, e.g., 94,5. The grades should save successfully.
      6. Create another site with the language set to default, a roster, and the Gradebook tool included.
      7. Go to Gradebook > Settings > Grade Entry.
      8. Set the grade entry to Percentages and Save Changes.
      9. Add a gradebook item.
      10. Go to Home > Preferences > Language and set the language to one that uses comma decimals, e.g., French or Spanish.
      11. Go to your new site with default language and try to enter grades with decimals in them for students, e.g., 94,5. The grades should save successfully.
      12. Edit some of the entered decimal grades, and delete at least one of them. The new and null grades should save successfully.
      Show
      Create a site with the language set to one that uses comma decimals, e.g., French or Spanish , a roster, and the Gradebook tool included. Go to Gradebook > Settings > Grade Entry . Set the grade entry to Percentages and Save Changes . Add a gradebook item. Enter some grades with decimals in them for students, e.g., 94,5 . The grades should save successfully. Create another site with the language set to default , a roster, and the Gradebook tool included. Go to Gradebook > Settings > Grade Entry . Set the grade entry to Percentages and Save Changes . Add a gradebook item. Go to Home > Preferences > Language and set the language to one that uses comma decimals, e.g., French or Spanish . Go to your new site with default language and try to enter grades with decimals in them for students, e.g., 94,5 . The grades should save successfully. Edit some of the entered decimal grades, and delete at least one of them. The new and null grades should save successfully.

      Description

      If your site is set to a language that uses comma decimals, e.g., French, and Gradebook is set up to grade in percentages, entering a grade with a decimal point generates the error below. The same error is generated if your user language is set to a language with comma decimals and site language default.

      Something went wrong
      You should refresh and try again. If you end up back here, quote the following error number to your local IT Support: SEdcMXhfY6.
      
      org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.sakaiproject.gradebookng.tool.component.GbGradeTable$1@6f6511e5 on component [WebMarkupContainer [Component id = gradeTable]] threw an exception
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
      	at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
      	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
      	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:426)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      	at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:508)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1490)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:471)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:268)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:156)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:856)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:475)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.GeneratedMethodAccessor845.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
      	... 55 more
      Caused by: java.lang.NullPointerException
      	at org.sakaiproject.gradebookng.business.GradebookNgBusinessService.saveGrade(GradebookNgBusinessService.java:807)
      	at WICKET_org.sakaiproject.gradebookng.business.GradebookNgBusinessService$$FastClassByCGLIB$$86be4ca5.invoke(<generated>)
      	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      	at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:355)
      	at WICKET_org.sakaiproject.gradebookng.business.GradebookNgBusinessService$$EnhancerByCGLIB$$3e85fe20.saveGrade(<generated>)
      	at org.sakaiproject.gradebookng.tool.actions.GradeUpdateAction.handleEvent(GradeUpdateAction.java:157)
      	at org.sakaiproject.gradebookng.tool.component.GbGradeTable.handleEvent(GbGradeTable.java:71)
      	at org.sakaiproject.gradebookng.tool.component.GbGradeTable$1.onEvent(GbGradeTable.java:95)
      	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:145)
      	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:654)
      	... 59 more
      

      Additionally, if you enter a grade in a points Gradebook with comma decimals that would result in a decimal percentage grade, e.g., 9,15 or 8,79, then change the Gradebook setting to percentages, you can sometimes edit the grade successfully, but other times, you generate the wicket error on trying to change the grade?!

      For example, trying to change 87,9% to 89% on the nightly experimental server, I get the wicket error. However, trying to change 87,9% to 90%, it saves successfully.

      Example:

      1. Enter the following grades in the default points Gradebook:
        • 8,5
        • 9,15
        • 8,79
      2. Go to Settings and change grading to percentages to get the following percentage grades:
        • 85%
        • 91,5%
        • 87,9%
      3. Try to change 87,9% to 89%, get the wicket error.
      4. Change 87,9% to 90% and the grade saves successfully.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  rainribbon Tiffany Stull
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Git Source Code