[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Wed, 28 May 2008 20:46:50 -0000


raeburn		Wed May 28 16:46:50 2008 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  Include parserflag checkbox to allow users to suppress display of screen used to uploaded embedded objects in an uploaded HTML page.
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.192 loncom/interface/portfolio.pm:1.193
--- loncom/interface/portfolio.pm:1.192	Thu Apr 17 10:46:18 2008
+++ loncom/interface/portfolio.pm	Wed May 28 16:46:46 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.192 2008/04/17 14:46:18 raeburn Exp $
+# $Id: portfolio.pm,v 1.193 2008/05/28 20:46:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -93,7 +93,9 @@
 					 'Upload file to current directory:',
 					 'createdir' => 'Create Subdirectory',
 					 'createdir_label' => 
-					 'Create subdirectory in current directory:');
+					 'Create subdirectory in current directory:',
+                                         'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'
+                                            );
         my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
 	my $help_fileupload = &Apache::loncommon::help_open_topic('Portfolio AddFiles');
 	my $help_createdir = &Apache::loncommon::help_open_topic('Portfolio CreateDirectory');
@@ -116,6 +118,12 @@
 	<input type="hidden" name="fieldname" value="$env{"form.fieldname"}" />
 	<input type="hidden" name="mode" value="$env{"form.mode"}" />
 	<input type="submit" name="storeupl" value="$text{'upload'}" />$help_fileupload
+        <br />
+        <span class="LC_nobreak">
+         <label>$text{'parse'}
+         <input type="checkbox" name="parserflag" checked="checked" />
+         </label>
+        </span>
       </form>
     </td>
   </tr>
@@ -1815,8 +1823,9 @@
     my $port_path = &get_port_path();
     my (%allfiles,%codebase,$mode);
     if ($env{'form.uploaddoc.filename'} =~ m/(\.htm|\.html|\.shtml)$/i) {
-	$mode = 'parse';
-	
+        if ($env{'form.parserflag'}) {
+	    $mode = 'parse';
+        }
     }
     my $result=
 	&Apache::lonnet::userfileupload('uploaddoc','',