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

Checklist: RS when coach checks a checkbox

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.1.2
    • Fix Version/s: 11.2.1
    • Component/s: None
    • Labels:
      None

      Description

      A RS can occur when a coach checks a checkbox in assessment tool:

      stack of 1.cause::java.lang.NullPointerException: null -> at org.olat.course.nodes.cl.manager.CheckboxManagerImpl.loadCheck(CheckboxManagerImpl.java:349) at org.olat.course.nodes.cl.manager.CheckboxManagerImpl.check(CheckboxManagerImpl.java:309) at org.olat.course.nodes.cl.ui.AssessedIdentityCheckListController.doSave(AssessedIdentityCheckListController.java:279) at org.olat.course.nodes.cl.ui.AssessedIdentityCheckListController.formOK(AssessedIdentityCheckListController.java:193)
      

      This patch fixes that:

      diff --git a/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java b/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java
      --- a/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java
      +++ b/src/main/java/org/olat/course/nodes/cl/manager/CheckboxManagerImpl.java
      @@ -343,13 +343,15 @@
       		sb.append("select check from clcheck as check")
       		  .append(" where check.identity.key=:identityKey and check.checkbox.key=:checkboxKey");
       		
      -		List<DBCheck> checks = dbInstance.getCurrentEntityManager()
      +		List<DBCheck> checks = null;
      +		if (checkbox != null)
      +		checks = dbInstance.getCurrentEntityManager()
       				.createQuery(sb.toString(), DBCheck.class)
       				.setParameter("identityKey", identity.getKey())
       				.setParameter("checkboxKey", checkbox.getKey())
       				.getResultList();
       		
      -		if(checks.isEmpty()) {
      +		if(checks == null || checks.isEmpty()) {
       			return null;
       		}
       		return checks.get(0);
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
            • 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 - 20 minutes
                20m