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

Velocity error viewing assignment with duplicate submissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 12.5, 19.0, 20.0
    • Fix Version/s: 12.7, 19.3, 20.0
    • Component/s: Assignments
    • Labels:
      None
    • 19 status:
      Resolved
    • 12 status:
      Verified
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      We've seen this issue with assignments that use group submissions as well as without group submissions. We're not sure how the duplicate submissions are getting it there for basic assignmements, but...

      Here's a procedure that may cause duplicates without involving groups:

      1. create a fresh site
      2. add 3 users to that site
      3. add the assignments tool to that site
      4. create 3 assignments
      5. quickly double click the 'Grade Report' tab
      6. duplicates may have been created
        1. you can verify this on the "Grade Report" tab where there should have been 9 'dummy' submissions created, but there are more
      7. login as a student where they had duplicate submissions in the step above
      8. visit site's the assignment tool
      9. Velocity Error... hmmm.. I can no longer reproduce this on 12.6. Sorry, I can't remember if I definitely saw the error with this procedure, but it's not happening now. (although the duplicate submission is definitely reproducible)
      10. However...
        1. login as instructor again
        2. click the assignment tool's 'Grade Report' tab
        3. the duplicates may be fixed (by SAK-40875)

      Here's how to replicate this issue when it involves group submissions:

      1. Create a group in Site Info and add 'Student' 1 to it
      2. Create an assignment in Assignments
      3. Select "Display only to selected groups" then select group
      4. Select the option for Group Submission (under "Additional Assignment Options")
      5. Post the assignment
      6. Log in as the student and submit the assignment
      7. Log in as the instructor
      8. Create a new group
      9. add the 1st student to the new group
      10. add a 2nd student to the new group
      11. In Assignments, edit the assignment and disassociate the old group from the assignment then associate the new group with it
      12. Post the assignment
      13. Log in as the 2nd student and go to Assignments and submit the assignment
      14. Log in as the 1st student and go to Assignments... Error
      Invocation of method 'getSubmission' in class com.sun.proxy.$Proxy150 threw exception org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at /vm/assignment/chef_assignments_list_assignments.vm[line 207, column 75] 
      
      org.hibernate.NonUniqueResultException: query did not return a unique result: 2
      	at org.sakaiproject.assignment.impl.persistence.AssignmentRepositoryImpl.findSubmissionForUser(AssignmentRepositoryImpl.java:216)
      	at sun.reflect.GeneratedMethodAccessor591.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      	at com.sun.proxy.$Proxy151.findSubmissionForUser(Unknown Source)
      	at org.sakaiproject.assignment.impl.AssignmentServiceImpl.getSubmission(AssignmentServiceImpl.java:1376)
      	at org.sakaiproject.assignment.impl.AssignmentServiceImpl.getSubmission(AssignmentServiceImpl.java:1367)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      	at com.sun.proxy.$Proxy150.getSubmission(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:366)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      	at org.apache.velocity.Template.merge(Template.java:328)
      	at org.apache.velocity.Template.merge(Template.java:235)
      	at org.apache.velocity.tools.view.servlet.VelocityViewServlet.performMerge(VelocityViewServlet.java:805)
      	at org.apache.velocity.tools.view.servlet.VelocityViewServlet.mergeTemplate(VelocityViewServlet.java:762)
      	at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:555)
      	at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
      	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
      	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:527)
      	at org.sakaiproject.vm.VmServlet.includeVm(VmServlet.java:162)
      	at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:454)
      	at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:234)
      	at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      	at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	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:418)
      	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:728)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:356)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
      	at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1487)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1227)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1061)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:490)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:266)
      	at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:154)
      	at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:856)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      	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:467)
      	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:52)
      	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:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
      	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)
      

        Gliffy Diagrams

          Zeplin

            Attachments

            1. after submissions.PNG
              after submissions.PNG
              124 kB
            2. assignment.PNG
              assignment.PNG
              99 kB
            3. assignment.PNG
              assignment.PNG
              99 kB
            4. SAK-41275.png
              SAK-41275.png
              327 kB

              Issue Links

                Activity

                  People

                  Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  austinUH Austin
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration