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

Mark for Review with Required Rationale not saving answers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.1, 10.0
    • Fix Version/s: 10.6
    • Labels:
      None
    • 10 status:
      Resolved
    • Previous Issue Keys:
      SAM-2241
    • Test Plan:
      Hide
      • Create an assessment with 3 or 4 MC questions that are set to require rationale
      • In settings before publishing
        (Layout and Appearance) Choose the entire exam is on one webpage and check the box so "questions can be marked for review"
      • Save and publish, all the other settings are fine as defaults
      • As a student, answer the questions and enter a rationale for each question. Also, check the Mark for Review for each question.
      • Press save-Answers are still available
      • Press save again - Answers are erased as well as rationale
      Show
      Create an assessment with 3 or 4 MC questions that are set to require rationale In settings before publishing (Layout and Appearance) Choose the entire exam is on one webpage and check the box so "questions can be marked for review" Save and publish, all the other settings are fine as defaults As a student, answer the questions and enter a rationale for each question. Also, check the Mark for Review for each question. Press save-Answers are still available Press save again - Answers are erased as well as rationale

      Description

      At UVa (running Samigo 2.9.1 with MySQL database), we applied the patch for SAM-2185 and while testing it, came across a one scenario that still isn't working correctly: "Mark for Review" combined with "Require Rationale". To quote the tester who found this:

      ============================================
      On Multiple Choice questions that Require Rationale on an exam with Mark for Review (M4R) enabled, there is still a potential for blank responses to be recorded on questions that are re-visited. This occurs using the built-in Next/Previous/Submit navigation buttons. This issue does not appear to be browser-specific nor does it involve using the buttons in the browser.

      To re-create: Create a 2-question MC exam. Require Rationale on both questions. In the Settings, enable M4R and have each Q on a Separate Webpage. Then, as a student, take the exam...

      1. On Q1 - Select answer, type something in rationale box, and place check in M4R box. Press Next.
      2. On Q2 - Select answer, type something in rationale box, and place check in M4R box. Press Previous.
      3. Back on Q1 - Select Next
      4. Back on Q2 - Press Submit and submit the exam.

      The whole exam will be submitted as blank?!? Even if you press Save on Step 2, the exam is still submitted blank.

      Here are some other troubleshooting notes and scenarios that I have tested:

      • This does NOT happen when M4R is NOT enabled on the exam.
      • This does NOT appear to happen on MC-questions that do not have "require rationale" selected.
      • If you repeat the steps above...but the student does NOT select the M4R box (even though it is enabled) on either question...the exam submission is fine.
      • If you repeat the steps above...but the student ONLY selects M4R box on Q1...only Q1 is submitted blank.

      I also tested this on an exam with 3 questions — On Q1 and Q2, I followed step 1 above. Then on the last question, Q3, I then followed steps 2-4 above. Looking at the submission, only Q2 and Q3 were submitted blank. Q1 (which was never returned back to) still had the answer and rationale included.
      ============================================

      We've determined that this bug doesn't seem to be a result of the patch from SAM-2185, as it happened on our un-patched production systems while we were testing the patch in our test environment. Can anyone here replicate this behavior?

      The bug report(s) that come out of this are different than the one posted in SAM-2185 as well:

      2013-11-04 15:14:40,174  WARN ajp-bio-8009-exec-44 org.hibernate.util.JDBCExceptionReporter - SQL Error: 1062, SQLState: 23000
      2013-11-04 15:14:40,175 ERROR ajp-bio-8009-exec-44 org.hibernate.util.JDBCExceptionReporter - Duplicate entry '292778-354540-364630-wc3s-1241009' for key 'ASSESSMENTGRADINGID'
      2013-11-04 15:14:40,175  WARN ajp-bio-8009-exec-44 org.sakaiproject.tool.assessment.facade.AssessmentGradingFacadeQueries - problem inserting assessmentGrading: could not insert: [org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData]
      2013-11-04 15:14:40,175  WARN ajp-bio-8009-exec-44 org.sakaiproject.tool.assessment.services.PersistenceService - Error saving to db...retry again....
      2013-11-04 15:14:40,176  WARN ajp-bio-8009-exec-44 org.sakaiproject.tool.assessment.services.PersistenceService - could not insert: [org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData]
      2013-11-04 15:14:40,176 ERROR ajp-bio-8009-exec-44 org.hibernate.AssertionFailure - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
      org.hibernate.AssertionFailure: null id in org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData entry (don't flush the Session after an exception occurs)
              at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:55)
              at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:164)
              at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
              at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
              at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
              at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
              at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy94.saveOrUpdateAll(Unknown Source)
              at org.sakaiproject.tool.assessment.services.GradingService.saveOrUpdateAll(GradingService.java:1671)
              at org.sakaiproject.tool.assessment.services.GradingService.storeGrades(GradingService.java:890)
              at org.sakaiproject.tool.assessment.services.GradingService.storeGrades(GradingService.java:731)
              at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.persistAssessmentGrading(SubmitToGradingActionListener.java:442)
              at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.submitToGradingService(SubmitToGradingActionListener.java:269)
              at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.processAction(SubmitToGradingActionListener.java:118)
              at org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.confirmSubmit(DeliveryBean.java:1562)
              ...
      

      I've attached full bug reports (one from clicking 'next' and one from clicking 'submit') to this jira.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  kcarruth Kevin Carruth
                  Votes:
                  3 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration