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

NPE occurs in DeliveryBean.timeExpired

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.9.0
    • Labels:
      None
    • Previous Issue Keys:
      SAM-925

      Description

      I don't have exact steps to replicate.

      I took an assessment with the direct URL (provided at time of publish). I took the assessment for awhile and then attempted another link (for another assessment).

      java.lang.NullPointerException
      org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.timeExpired(DeliveryBean.java:2416)
      org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.checkBeforeProceed(DeliveryBean.java:2735)
      org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.checkBeforeProceed(DeliveryBean.java:2742)
      org.sakaiproject.tool.assessment.ui.servlet.delivery.LoginServlet.doPost(LoginServlet.java:174)
      org.sakaiproject.tool.assessment.ui.servlet.delivery.LoginServlet.doGet(LoginServlet.java:85)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:641)

      This is the function unchanged in trunk, adata is the null variable

      public boolean timeExpired(){
      boolean timeExpired = false;
      TimedAssessmentQueue queue = TimedAssessmentQueue.getInstance();
      TimedAssessmentGradingModel timedAG = (TimedAssessmentGradingModel)queue.
      get(adata.getAssessmentGradingId());
      if (timedAG != null){
      // if server already submit the assessment, this happen if JScript latency is very long
      // and assessment passed the time left + latency buffer
      // in this case, we will display the time expired message.
      if (timedAG.getSubmittedForGrade())

      { timeExpired = true; queue.remove(timedAG); }


      }
      else

      { // null => not only does the assessment miss the latency buffer, it also missed the // transaction buffer timeExpired = true; }

      return timeExpired;
      }

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                jonespm Matthew Jones
                Reporter:
                ottenhoff Sam Ottenhoff
                Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration