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

Checklist: show error message if due date is configured but empty

    Details

    • Type: Improvement
    • 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

      When configuring the checklist with an enabled due date the date field can be left empty. I think this is an unwanted state and can cause a Redscreen (in a special case ).
      If the date field is left empty the user gets an error message to choose a date.

      The patch:

      diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java
      --- a/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java
      +++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckListConfigurationController.java
      @@ -342,6 +342,11 @@
       				maxPointsEl.setErrorKey("form.legende.mandatory", null);
       			}
       		}
      +		
      +		if (dueDateChooserEl.isEmpty()) {
      +			dueDateChooserEl.setErrorKey("form.error.date", null);
      +			allOk &= false;
      +		}
       		return allOk & super.validateFormLogic(ureq);
       	}
       	
      diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties
      --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties
      +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_de.properties
      @@ -44,6 +44,7 @@
       edit.checkbox=Checkbox bearbeiten
       file=Datei
       filter.all=Alle anzeigen
      +form.error.date=Es muss ein Datum angegeben werden.
       form.error.scoreOutOfRange=$org.olat.course.assessment\:form.error.scoreOutOfRange
       form.error.wrongFloat=$org.olat.course.nodes.ms\:form.error.wrongFloat
       info.title=$org.olat.course.nodes.ms\:info.title
      diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties
      --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties
      +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_en.properties
      @@ -44,6 +44,7 @@
       edit.checkbox=Edit checkbox
       file=File
       filter.all=Show all
      +form.error.date=A date must be indicated.
       form.error.scoreOutOfRange=$org.olat.course.assessment\:form.error.scoreOutOfRange
       form.error.wrongFloat=$org.olat.course.nodes.ms\:form.error.wrongFloat
       info.title=$org.olat.course.nodes.ms\:info.title
      diff --git a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties
      --- a/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties
      +++ b/src/main/java/org/olat/course/nodes/cl/ui/_i18n/LocalStrings_fr.properties
      @@ -44,6 +44,7 @@
       edit.checkbox=Editer case \u00E0 cocher
       file=Fichier
       filter.all=Tout afficher
      +form.error.date=Il faut indiquer une date. 
       form.error.scoreOutOfRange=$org.olat.course.assessment\:form.error.scoreOutOfRange
       form.error.wrongFloat=$org.olat.course.nodes.ms\:form.error.wrongFloat
       info.title=$org.olat.course.nodes.ms\:info.title
      

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