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

Assignment tool breaks on duplicate submission scenario

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.6, 19.0, 20.0 [Tentative]
    • Fix Version/s: 12.6, 19.0, 20.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 19 status:
      Resolved
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      • A user belongs to two groups.
      • Add a task assigned to group 1.
      • Enter grading screen for that group.
      • Edit the task, unselect group 1 and add group 2. Enter the grading screen for that group.
      • Access the assignments tool with that user.
      Show
      A user belongs to two groups. Add a task assigned to group 1. Enter grading screen for that group. Edit the task, unselect group 1 and add group 2. Enter the grading screen for that group. Access the assignments tool with that user.

      Description

      A query is not being properly executed, resulting in an error page that breaks the whole tool:

      The log shows these related lines:

      02-Dec-2018 14:21:44.179 INFO [http-nio-8080-exec-177] org.sakaiproject.assignment.impl.persistence.AssignmentRepositoryImpl.findSubmissionForUser Duplicate submissions detected for assignment faa48640-b8f1-4b67-a3a4-ef5b9b20a53d and user 976e12a4-135d-4caf-8a65-12ffe3b4a5b0 attempting to clean
      02-Dec-2018 14:21:44.180 INFO [http-nio-8080-exec-177] org.sakaiproject.assignment.impl.persistence.AssignmentRepositoryImpl.deleteSubmission Deleting submission AssignmentSubmission(id=7557b265-7997-4691-ad5e-a4f444fa01d8, dateSubmitted=null, dateReturned=null, dateCreated=2018-09-24T12:20:14Z, dateModified=2018-09-24T12:20:14Z, submittedText=null, feedbackComment=null, feedbackText=null, grade=null, factor=null, submitted=true, returned=false, graded=false, gradedBy=null, gradeReleased=false, honorPledge=false, hiddenDueDate=false, userSubmission=false, groupId=null)
      02-Dec-2018 14:21:44.497 ERROR [http-nio-8080-exec-177] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions Connection is read-only. Queries leading to data modification are not allowed
      02-Dec-2018 14:21:44.499 ERROR [http-nio-8080-exec-177] org.sakaiproject.velocity.util.SLF4JLogChute.log VelocityViewServlet: Exception processing the template: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getSubmission' in class com.sun.proxy.$Proxy136 threw exception org.hibernate.exception.GenericJDBCException: could not execute statement at /vm/assignment/chef_assignments_list_assignments.vm[line 207, column 75]
      

      I'm not really sure about the steps to reproduce it, but probably the same ones than onĀ SAK-40875.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bergarvi Bernardo Garcia Vila
                  Reporter:
                  bergarvi Bernardo Garcia Vila
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code