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

Student View of assignment with future open time and null visible time causes NPE

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0, 19.0
    • Fix Version/s: 19.0
    • Component/s: Assignments
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Create two sites (site 1, Site 2)
      As an instructors create two assignment to site 1 with today's date and a short 10 minute available/unavailable.
      Log in as a student and submit to the assignment.
      Access Site 2 as an Instructor, Create a new Assignment.
      Using the "Import from Site" from the Site Info navigation, import the other Assignment from Site 1. Deploy the three Assignments in Site 2.
      Log into Site 2 as a students 1 and 2 and try to take the assignment.
      Log into Site 2 as the instructor and note the status of the assignments.
      The issue is as an Instructor assignments were in non-editable but "open" state.

      Show
      Create two sites (site 1, Site 2) As an instructors create two assignment to site 1 with today's date and a short 10 minute available/unavailable. Log in as a student and submit to the assignment. Access Site 2 as an Instructor, Create a new Assignment. Using the "Import from Site" from the Site Info navigation, import the other Assignment from Site 1. Deploy the three Assignments in Site 2. Log into Site 2 as a students 1 and 2 and try to take the assignment. Log into Site 2 as the instructor and note the status of the assignments. The issue is as an Instructor assignments were in non-editable but "open" state.

      Description

      This error was reported by Laura G on nightly server.

      Student clicked on "Assignments" where Assignments were imported from a previous site. Those assignments were in non-editable but "open" state. ~LauraG

      Not a report but the upside down sakaiger. I clicked to post the draft of a group assignment. https://qa2-us.nightly.sakaiproject.org/portal/site/0cfb8db5-edc0-4b0e-a794-114dc0bf7d2b/tool/7d90e86b-7a9c-40aa-bb61-a09fbea8d7d3?panel=Main

      It looks like the line is below, I guess either the openTime or visibleTime is null?

                                  if ((currentTime.isAfter(openTime) || currentTime.isAfter(visibleTime)) && !a.getDraft()) {
      
      stack trace:
      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: java.lang.reflect.InvocationTargetException
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:857)
      caused by: org.sakaiproject.tool.api.ToolException: java.lang.reflect.InvocationTargetException
          at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:234)
      caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      caused by: java.lang.NullPointerException
          at java.time.Instant.compareTo(Instant.java:1255)
          at java.time.Instant.isAfter(Instant.java:1272)
          at org.sakaiproject.assignment.tool.AssignmentAction.sizeResources(AssignmentAction.java:11764)
          at org.sakaiproject.cheftool.PagedResourceActionII.prepPage(PagedResourceActionII.java:300)
          at org.sakaiproject.assignment.tool.AssignmentAction.build_list_assignments_context(AssignmentAction.java:2184)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                jonespm Matthew Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code