[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmsgdisplay.pm

raeburn raeburn at source.lon-capa.org
Mon Aug 12 11:19:06 EDT 2019


raeburn		Mon Aug 12 15:19:06 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - For 2.11
    Backport 1.182 (part), 1.187, 1.188, 1.189, 1.190
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.181.2.2 loncom/interface/lonmsgdisplay.pm:1.181.2.3
--- loncom/interface/lonmsgdisplay.pm:1.181.2.2	Tue Aug  6 17:53:56 2019
+++ loncom/interface/lonmsgdisplay.pm	Mon Aug 12 15:19:06 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.181.2.2 2019/08/06 17:53:56 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.181.2.3 2019/08/12 15:19:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1412,11 +1412,14 @@
                                        'to'   => 'To:',
                                       );
     my %attachmax = (
-                     text => &mt('(128 KB max size)'),
-                     num  => 131072,
+                     text => &mt('(1 MB max size)'),
+                     num  => 1048576,
                     );
     if (!$forwarding && !$multiforward) {
-        $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}.': <input type="file" name="attachment" /></td></tr>';
+        $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}
+            .': <input type="file" name="attachment" class="LC_flUpload" />'.
+            .'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />'.
+            .'</td></tr>';
     }
     if (&Apache::lonnet::allowed('srm',$env{'request.course.id'})
 	|| &Apache::lonnet::allowed('srm',$env{'request.course.id'}.
@@ -2680,6 +2683,8 @@
     if ($baseurl) {
 	$extra .= "<base href=\"".&Apache::lonnet::absolute_url()."/$baseurl\" />";
     }
+    $extra .= '<script type="text/javascript"
+                src="/res/adm/includes/file_upload.js"></script>';
     $r->print(&Apache::loncommon::start_page('Messages',
  					$extra));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs
@@ -2920,7 +2925,7 @@
             &Apache::lonnet::logthis('Failed to store To, Bcc and Cc recipients for '.$env{'user.name'}.':'.$env{'user.domain'});
         }
         if ($env{'form.attachment'}) {
-            if (length($env{'form.attachment'})<131072) {
+            if (length($env{'form.attachment'}) <= 1048576) {
                 $attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback/'.$now);
             } else {
                 $r->print('<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>');




More information about the LON-CAPA-cvs mailing list