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

Assessment tool: avoid displaying "null"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 12.4.2
    • Fix Version/s: 12.4.3
    • Component/s: None
    • Labels:
      None

      Description

      However, it can be possible that an element to review is not (any more?) in the node list. So the ElementToReviewCellRenderer displays "null" which is a little confusing. Displaying an empty string would be better. this patch fixes that:

      diff --git a/src/main/java/org/olat/course/assessment/ui/tool/ElementToReviewCellRenderer.java b/src/main/java/org/olat/course/assessment/ui/tool/ElementToReviewCellRenderer.java
      --- a/src/main/java/org/olat/course/assessment/ui/tool/ElementToReviewCellRenderer.java
      +++ b/src/main/java/org/olat/course/assessment/ui/tool/ElementToReviewCellRenderer.java
      @@ -54,7 +54,7 @@
       			List<String> elements = rowToReview.getSubIndents();
       			if(elements.size() == 1) {
       				String msg = nodeIdentToNodeShortTitles.get(elements.get(0));
      -				target.append(msg);
      +				target.append(msg != null ? msg : "");
       			} else {
       				String msg = translator.translate("elements.to.review", new String[]{ Integer.toString(elements.size()) });
       				target.append("<i class='o_icon o_icon_important'> </i> ");
      

        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 - 5 minutes
                5m