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

Projectbroker: show list of uploaded files

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 15.3.15, 15.4.7
    • Project
    • None

    Description

      Students are often confused about their uploaded files. They see that one ore more files are uploaded to the dropbox but they don't see which files. So they often upload the same file again. To avoid this confusion it's better to show a list of the files:

       

      diff --git a/src/main/java/org/olat/course/nodes/ta/DropboxController.java b/src/main/java/org/olat/course/nodes/ta/DropboxController.java
      index ff41ccb..886a6e3 100644
      --- a/src/main/java/org/olat/course/nodes/ta/DropboxController.java
      +++ b/src/main/java/org/olat/course/nodes/ta/DropboxController.java
      @@ -166,7 +166,10 @@
       		if (!previewMode) {
       			VFSContainer fDropbox = getDropBox(ureq.getIdentity());
       			int numFiles = fDropbox.getItems().size();
      -			if (numFiles > 0) myContent.contextPut("numfiles", new String[] {Integer.toString(numFiles)});
      +			if (numFiles > 0) {
      +				myContent.contextPut("numfiles", new String[] {Integer.toString(numFiles)});
      +				myContent.contextPut("filelist", fDropbox.getItems());
      +			}
       			
       		} else {
       			myContent.contextPut("numfiles", "0");
      @@ -290,6 +293,7 @@
       				if (success) {
       					int numFiles = fDropbox.getItems(new VFSSystemItemFilter()).size();
       					myContent.contextPut("numfiles", new String[] {Integer.toString(numFiles)});
      +					myContent.contextPut("filelist", fDropbox.getItems());
       					// assemble confirmation
       					String confirmation = getConfirmation(ureq, fOut.getName());
       					// send email if necessary
      diff --git a/src/main/java/org/olat/course/nodes/ta/_content/dropbox.html b/src/main/java/org/olat/course/nodes/ta/_content/dropbox.html
      index 87212e0..58c529f 100644
      --- a/src/main/java/org/olat/course/nodes/ta/_content/dropbox.html
      +++ b/src/main/java/org/olat/course/nodes/ta/_content/dropbox.html
      @@ -12,7 +12,10 @@
       		<div class="panel-body">
       			<p>
       			#if($numfiles)
      -				<i>$r.translate("dropbox.files", $numfiles)</i>
      +				<i>$r.translate("dropbox.files", $numfiles)</i><br/>
      +				#foreach($file in $filelist)
      +					$file.getName()</br>
      +				#end
       			#else
       				<i>$r.translate("dropbox.nofiles")</i>
       			#end
      

      Attachments

        Activity

          People

            uhensler Urs Hensler
            stephan Stephan Clemenz
            Lukas Witschi Lukas Witschi
            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