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

Assessment tool: NPE can occur

    XMLWordPrintable

    Details

      Description

      If you have the following structure in a course a NPE occurs in assessment tool when selecting the text "Einzelne Seite":

      stack of 1.cause::java.lang.NullPointerException: null ->
      > at org.olat.course.assessment.ui.tool.IdentityListCourseNodeTableModel.(IdentityListCourseNodeTableModel.java:67)

      If you open it via the triangel everything is okay.

      This patch fixes that: 

      diff --git a/src/main/java/org/olat/course/assessment/ui/tool/IdentityListCourseNodeTableModel.java b/src/main/java/org/olat/course/assessment/ui/tool/IdentityListCourseNodeTableModel.java
      index 1f3a02c..edc9735 100644
      --- a/src/main/java/org/olat/course/assessment/ui/tool/IdentityListCourseNodeTableModel.java
      +++ b/src/main/java/org/olat/course/assessment/ui/tool/IdentityListCourseNodeTableModel.java
      @@ -64,7 +64,7 @@
       		this.locale = locale;
       		this.courseNode = courseNode;
       		
      -		if(!(courseNode instanceof STCourseNode) && courseNode.hasScoreConfigured()) {
      +		if(courseNode != null && !(courseNode instanceof STCourseNode) && courseNode.hasScoreConfigured()) {
       			maxScore = courseNode.getMaxScoreConfiguration();
       			minScore = courseNode.getMinScoreConfiguration();
       		}
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Mandy Menzel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 25 minutes
                25m