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

Peekview of folders with pre 10.4 course config showing wrong content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.4, 10.4.3
    • Fix Version/s: 10.4.4
    • Component/s: Course
    • Labels:
      None

      Description

      In a course created before 10.4 the peekview of a folder shows the content of the storage folder instead of the real content of the folder.

      This patch fixes that:

      diff --git a/src/main/java/org/olat/course/nodes/BCCourseNode.java b/src/main/java/org/olat/course/nodes/BCCourseNode.java
      --- a/src/main/java/org/olat/course/nodes/BCCourseNode.java
      +++ b/src/main/java/org/olat/course/nodes/BCCourseNode.java
      @@ -148,10 +148,7 @@
       			// Create a folder peekview controller that shows the latest two entries
       			String path ="";
       			VFSContainer rootFolder = null;
      -			if(getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_AUTO_FOLDER)){
      -				path = getFoldernodePathRelToFolderBase(userCourseEnv.getCourseEnvironment(), this);
      -				rootFolder = new OlatRootFolderImpl(path, null);
      -			}else{
      +			if(getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_SUBPATH)){
       				VFSItem pathItem = userCourseEnv.getCourseEnvironment().getCourseFolderContainer().resolve(getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH));
       				if(pathItem == null){
       					return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
      @@ -159,6 +156,9 @@
       				if(pathItem instanceof VFSContainer){
       					rootFolder = (VFSContainer) pathItem;
       				}
      +			} else {
      +				path = getFoldernodePathRelToFolderBase(userCourseEnv.getCourseEnvironment(), this);
      +				rootFolder = new OlatRootFolderImpl(path, null);
       			}
       			rootFolder.setDefaultItemFilter(new SystemItemFilter());
       			Controller peekViewController = new BCPeekviewController(ureq, wControl, rootFolder, getIdent(), 4);
      

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