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

Assignments - can't remove or edit Model Answer, Private Notes, Attachments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 19.4, 20.0, 21.0 [Tentative]
    • Fix Version/s: 19.4, 20.0, 21.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 20 status:
      Verified
    • 19 status:
      Verified
    • Test Plan:
      1. Create an assignment and add a Model Answer or a Private Note.
      2. Edit the assignment and try to remove them.
      3. Do the same test with attachments in the Model Answer or in the All Purpose item.

      Description

      When trying to remove or edit Model Answer, Private Notes associated with an assignment, this errors are thrown:

      Caused by: java.lang.IllegalArgumentException: Removing a detached instance org.sakaiproject.assignment.api.model.AssignmentNoteItem#1
      	at org.hibernate.jpa.event.internal.core.JpaDeleteEventListener.performDetachedEntityDeletionCheck(JpaDeleteEventListener.java:69)
      ...
      	at org.springframework.orm.hibernate4.HibernateTemplate.delete(HibernateTemplate.java:782)
      	at org.sakaiproject.assignment.impl.AssignmentSupplementItemServiceImpl.removeNoteItem(AssignmentSupplementItemServiceImpl.java:277)
      
      Caused by: java.lang.IllegalArgumentException: Removing a detached instance org.sakaiproject.assignment.api.model.AssignmentModelAnswerItem#4
      	at org.hibernate.jpa.event.internal.core.JpaDeleteEventListener.performDetachedEntityDeletionCheck(JpaDeleteEventListener.java:69)
      ...
      	at org.springframework.orm.hibernate4.HibernateTemplate.delete(HibernateTemplate.java:782)
      	at org.sakaiproject.assignment.impl.AssignmentSupplementItemServiceImpl.removeModelAnswer(AssignmentSupplementItemServiceImpl.java:219)
      

      Same thing happens when trying to remove attachments from any of those items.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

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

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration