Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3320

User cannot delete a portfolio entry with an assignment of type survey

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12.3.2
    • Component/s: ePortfolio
    • Labels:
      None

      Description

      • An author make a portfolio survey
      • In a portfolio make an assignment based on the survey
      • Make a course with the portfolio
      • A student take the portfolio in the course
      • It starts the assignment but before publishing it, it deletes it
      • The student goes in the delete entries tab, try to delete definitively the entry
        -> red screen
      RedScreen on hfgs 12.2.8
      2018-02-17 11:07:31,353 [ajp-nio2-8004-exec-94] ERROR OLATRuntimeException - OLAT::ERROR ^%^ N4-E56 ^%^ org.olat.core.logging 
      
      https://e.hfgs.ch/auth/HomeSite/321191984/PortfolioV2/0/Trash/0/Entry/11442
      Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
      **RedScreen** org.hibernate.exception.ConstraintViolationException: could not execute statement
      
      <dispatchinfo>
      	<componentinfo>
      		<compname>link_0</compname>
      		<compclass>org.olat.core.gui.components.link.Link</compclass>
      		<extendedinfo>n/a</extendedinfo>
      		<event>
      			<class&gt;org.olat.core.gui.control.Event</class&gt;
      			<command>link_0</command>
      			<tostring>com:link_0,org.olat.core.gui.control.Event@be46a54a</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.core.gui.control.generic.modal.DialogBoxController</controllername>
      		<controllername>org.olat.modules.portfolio.ui.PageRunController</controllername>
      		<controllername>org.olat.modules.portfolio.ui.DeletedPageListController</controllername>
      		<controllername>org.olat.modules.portfolio.ui.TrashController</controllername>
      		<controllername>org.olat.modules.portfolio.ui.PortfolioHomeController</controllername>
      		<controllername>org.olat.modules.portfolio.ui.PortfolioPersonalToolController</controllername>
      		<controllername>org.olat.home.HomeMainController</controllername>
      		<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      	</controllerinfo>
      </dispatchinfo>
      
      >>> stack of 1.cause::org.olat.core.logging.OLATRuntimeException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.olat.core.gui.exception.ExceptionWindowController.<init>(ExceptionWindowController.java:116)
         at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:57)
         at org.olat.core.gui.exception.MsgFactory.createMessageChiefController(MsgFactory.java:46)
         at org.olat.core.gui.components.Window.dispatchRequest(Window.java:549)
         at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:242)
         at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
         at org.olat.dispatcher.AuthenticatedDispatcher.processValidDispatchURI(AuthenticatedDispatcher.java:273)
         at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:190)
         at org.olat.core.servlets.OpenOLATServlet.executeUserRequest(OpenOLATServlet.java:289)
         at org.olat.core.servlets.OpenOLATServlet.doPost(OpenOLATServlet.java:232)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
      >>> stack of 2.cause::javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:149)
         at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:157)
         at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1423)
         at org.hibernate.query.Query.getResultList(Query.java:146)
         at org.olat.modules.portfolio.manager.CommentDAO.getNumberOfCommentsOnOwnedPage(CommentDAO.java:94)
         at org.olat.modules.portfolio.manager.PortfolioServiceImpl.getNumberOfCommentsOnOwnedPage(PortfolioServiceImpl.java:780)
         at org.olat.modules.portfolio.ui.DeletedPageListController.loadModel(DeletedPageListController.java:88)
         at org.olat.modules.portfolio.ui.AbstractPageListController.event(AbstractPageListController.java:513)
         at org.olat.modules.portfolio.ui.DeletedPageListController.event(DeletedPageListController.java:133)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      >>> stack of 3.cause::org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
         at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3325)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3562)
         at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:99)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:589)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
      >>> stack of 4.cause::org.postgresql.util.PSQLException: ERROR: update or delete on table "o_pf_page_body" violates foreign key constraint "eva_session_to_body_idx" on table "o_eva_form_session"
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              srosse Stéphane Rossé
              Tester:
              Mandy Menzel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m