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

musolffc musolffc at source.lon-capa.org
Wed Sep 30 17:04:05 EDT 2015


musolffc		Wed Sep 30 21:04:05 2015 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Adding upload file size checking to discussion comments and feedback messages.
  This functionality was intruduced with file_upload.js
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.370 loncom/interface/lonfeedback.pm:1.371
--- loncom/interface/lonfeedback.pm:1.370	Tue Jun  9 21:22:56 2015
+++ loncom/interface/lonfeedback.pm	Wed Sep 30 21:04:04 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.370 2015/06/09 21:22:56 damieng Exp $
+# $Id: lonfeedback.pm,v 1.371 2015/09/30 21:04:04 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1942,6 +1942,7 @@
     $anonscript
 //-->
 </script>
+<script type="text/javascript" src="/res/adm/includes/file_upload.js"></script>
 END
 
   my ($textareaheader,$textareaclass);
@@ -2049,7 +2050,8 @@
     } else {
         $r->print(<<END);
 <p>
-$lt{'atta'} $attachmaxtext: <input type="file" name="attachment" />
+$lt{'atta'} $attachmaxtext: <input type="file" name="attachment" class="flUpload" />
+<input type="hidden" id="free_space" value="131072" />
 </p>
 END
     }
@@ -3498,6 +3500,7 @@
    document.modattachments.submit();
  }
 </script> 
+<script type="text/javascript" src="/res/adm/includes/file_upload.js"></script>
 END
 
     # Breadcrumbs
@@ -3539,7 +3542,10 @@
     $r->print('<b>'.$subject.'</b>');
     $r->print(&Apache::lonhtmlcommon::row_closure());
     $r->print(&Apache::lonhtmlcommon::row_title($lt{'adda'}));
-    $r->print('<input type="file" name="addnewattach" /><input type="button" name="upload" value="Upload" onclick="this.form.submit()" />  '.$attachmaxtext);
+    $r->print('<input type="file" name="addnewattach" class="flUpload" />'
+        .'<input type="hidden" id="free_space" value="131072" />'
+        .'<input type="button" name="upload" value="Upload" '
+        .'onclick="this.form.submit()" />  '.$attachmaxtext);
     if(($idx)||(ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)){
         $r->print(&Apache::lonhtmlcommon::row_closure());
         $r->print(&Apache::lonhtmlcommon::row_title(&mt('Attachments')));




More information about the LON-CAPA-cvs mailing list