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

RS in project broker of a copied course

    XMLWordPrintable

    Details

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

      Description

      In certain cases it's possible that no account manager group exists for a project broker, but a related property exists in the database with a null value for the group key. In course run this doesn't matter but when copying the course entering the editor and configuring the project broker, a new property is created. After that, two properties exist which results in a sleeping lion (AssertException: findProperty found more than one properties for...).

      If the group key of the property is null, a new group is created. I check if a property exists and if yes, the property is updated with the new group key instead of creating a new property.

      diff --git a/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java b/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java
      --- a/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java
      +++ b/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java
      @@ -123,7 +123,14 @@
       			}
       			logDebug("createAndPersistBusinessGroup businessgroup=" + accountManagerGroup);			
       			
      -			saveAccountManagerGroupKey(accountManagerGroup.getKey(), cpm, courseNode);
      +			if (accountManagerGroupProperty != null) {
      +				accountManagerGroupProperty.setLongValue(accountManagerGroup.getKey());
      +				cpm.updateProperty(accountManagerGroupProperty);
      +				logDebug("updateAccountManagerGroupKey accountManagerGroupKey=" + accountManagerGroup.getKey());
      +			}
      +			else {
      +				saveAccountManagerGroupKey(accountManagerGroup.getKey(), cpm, courseNode);
      +			}
       			logDebug("created account-manager default businessgroup=" + accountManagerGroup);
       		} 
       		return accountManagerGroup;
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Stephan Clemenz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m