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

Enrollment: "Number of groups" can be any integer

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.0.2
    • Fix Version/s: 12.1.1
    • Component/s: None
    • Labels:
      None

      Description

      We have noticed that enrollment can be configured with "Number of groups" containing any integer value. This can confuse students when the author has accidently set a number greater than the actual group count. The following patch fixes that problem, but it respects only configured groups, not learning areas.

      
      diff --git a/src/main/java/org/olat/course/nodes/en/ENEditController.java b/src/main/java/org/olat/course/nodes/en/ENEditController.java
      --- a/src/main/java/org/olat/course/nodes/en/ENEditController.java
      +++ b/src/main/java/org/olat/course/nodes/en/ENEditController.java
      @@ -163,6 +163,9 @@
               String areaNames = (String)moduleConfiguration.get(ENCourseNode.CONFIG_AREANAME);
               List<Long> groupKeys = moduleConfiguration.getList(ENCourseNode.CONFIG_GROUP_IDS, Long.class);
               List<Long> areaKeys = moduleConfiguration.getList(ENCourseNode.CONFIG_AREA_IDS, Long.class);
      +        int count = moduleConfiguration.getIntegerSafe(ENCourseNode.CONFIG_ALLOW_MULTIPLE_ENROLL_COUNT, 1);
      +        if (groupKeys != null && groupKeys.size() > 0)
      +            return count <= groupKeys.size();
               return StringHelper.containsNonWhitespace(groupNames) || StringHelper.containsNonWhitespace(areaNames)
                       || (groupKeys != null && groupKeys.size() > 0) || (areaKeys != null && areaKeys.size() > 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 - 35 minutes
                35m