[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework inputtags.pm

raeburn raeburn at source.lon-capa.org
Wed Aug 7 17:10:37 EDT 2019


raeburn		Wed Aug  7 21:10:37 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	inputtags.pm 
  Log:
  - For 2.11
    Backport 1.336, 1.346, 1.347
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.333.2.5 loncom/homework/inputtags.pm:1.333.2.6
--- loncom/homework/inputtags.pm:1.333.2.5	Mon Mar 18 20:21:14 2019
+++ loncom/homework/inputtags.pm	Wed Aug  7 21:10:37 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.333.2.5 2019/03/18 20:21:14 raeburn Exp $
+# $Id: inputtags.pm,v 1.333.2.6 2019/08/07 21:10:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -667,9 +667,11 @@
         $result .= $constraints.'<br />';
     }
     if ($which eq 'uploadonly' || $which eq 'both') { 
-	$result.=&mt('Submit a file: (only one file per submission)').
-	    ' <br /><input type="file" size="50" name="HWFILE'.
-	    $jspart.'_'.$id.'" id="HWFILE'.$jspart.'_'.$id.'" /><br />';
+        my $free_space = $maxfilesize * 1048576;
+        $result .= &mt('Submit a file: (only one file per submission)').
+            ' <br /><input type="file" size="50" name="HWFILE'.$jspart.'_'.$id.
+            '" id="HWFILE'.$jspart.'_'.$id.'" class="LC_flUpload" />'.
+            '<input type="hidden" id="free_space" value="'.$free_space.'" /><br />';
     }
     if ( $which eq 'both') {
 	$result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />';




More information about the LON-CAPA-cvs mailing list