[LON-CAPA-cvs] cvs: loncom /homework grades.pm

raeburn raeburn at source.lon-capa.org
Tue Sep 8 09:44:33 EDT 2020


raeburn		Tue Sep  8 13:44:33 2020 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - In "Download submissions" context, table listing parts/responsetypes
    not shown if none set up as dropboxes.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.774 loncom/homework/grades.pm:1.775
--- loncom/homework/grades.pm:1.774	Mon Aug 31 01:14:06 2020
+++ loncom/homework/grades.pm	Tue Sep  8 13:44:33 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.774 2020/08/31 01:14:06 raeburn Exp $
+# $Id: grades.pm,v 1.775 2020/09/08 13:44:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -293,6 +293,17 @@
         $result .= '</div></fieldset>';
     }
     $result .= '</div><div style="padding:0;clear:both;margin:0;border:0"></div>';
+    if (!keys(%partsseen)) {
+        $result = '';
+        if ($uploads) {
+            return '<div style="padding:0;clear:both;margin:0;border:0"></div>'.
+                   '<p class="LC_info">'.
+                    &mt('No dropbox items or essayresponse items with uploadedfiletypes set.').
+                   '</p>';
+        } else {
+            return '<br clear="all" />';
+        }
+    }
     return $result;
 }
 
@@ -3241,7 +3252,7 @@
 	# Keywords sorted in alphabatical order
 	my $loginuser = $env{'user.name'}.':'.$env{'user.domain'};
 	$env{'form.keywords'}           =~ s/,\s{0,}|\s+/ /g;
-	$env{'form.keywords'}           =~ s/^\s+|\s+$//;
+	$env{'form.keywords'}           =~ s/^\s+|\s+$//g;
 	my (@keywords) = sort(split(/\s+/,$env{'form.keywords'}));
 	$env{'form.keywords'} = join(' ', at keywords);
 	$keyhash{$symb.'_keywords'}     = $env{'form.keywords'};
@@ -11393,6 +11404,9 @@
             }
             &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}],undef,undef,$stuvcurrent,$stuvdisp,undef,$js,$onload,$divforres);
             if ($versionform) {
+                if ($divforres) {
+                    $request->print('<div style="padding:0;clear:both;margin:0;border:0"></div>');
+                }
                 $request->print($versionform);
             }
 	    ($env{'form.student'} eq '' ? &listStudents($request,$symb,'',$divforres) : &submission($request,0,0,$symb,$divforres,$command));
@@ -11545,6 +11559,7 @@
    [{href=>&href_symb_cmd($symb,'downloadfilesselect'), text=>'Select which submissions to download'},
     {href=>'', text=>'Download submitted files'}],
                undef,undef,undef,undef,undef,undef,undef,1);
+            $request->print('<div style="padding:0;clear:both;margin:0;border:0"></div>');
             &submit_download_link($request,$symb);
 	} elsif ($command) {
             &startpage($request,$symb,[{href=>'', text=>'Access denied'}]);




More information about the LON-CAPA-cvs mailing list