--- loncom/homework/grades.pm 2020/08/31 15:42:52 1.596.2.12.2.51 +++ loncom/homework/grades.pm 2020/09/10 00:39:46 1.596.2.12.2.54 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.596.2.12.2.51 2020/08/31 15:42:52 raeburn Exp $ +# $Id: grades.pm,v 1.596.2.12.2.54 2020/09/10 00:39:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -289,6 +289,17 @@ sub showResourceInfo { $result .= ''; } $result .= '
'; + if (!keys(%partsseen)) { + $result = ''; + if ($uploads) { + return '
'. + '

'. + &mt('No dropbox items or essayresponse items with uploadedfiletypes set.'). + '

'; + } else { + return '
'; + } + } return $result; } @@ -3188,7 +3199,7 @@ sub processHandGrade { # 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(' ',@keywords); $keyhash{$symb.'_keywords'} = $env{'form.keywords'}; @@ -9192,7 +9203,7 @@ END if ($count > 1) { $formatextra = ''; $onclick = ' onclick="toggleScantab(this.form);"'; $formatjs = <<"END"; @@ -9890,11 +9901,11 @@ sub grading_menu { icon => 'grade_PageFolder.png', linktitle => 'Grade all resources in current page/sequence/folder for one student.' }, - { linktext => 'Download submissions', + { linktext => 'Download submitted files', url => $url1e, permission => 'F', icon => 'download_sub.png', - linktitle => 'Download all students submissions.' + linktitle => 'Download all files submitted by students.' }]}, { categorytitle=>'Automated Grading', items =>[ @@ -10008,7 +10019,7 @@ sub submit_options_download { ''."\n"; $result.='

- '.&mt('Select Students for whom to Download Submissions').' + '.&mt('Select Students for whom to Download Submitted Files').'

'.&selectfield(1).' @@ -10866,6 +10877,9 @@ sub handler { } &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}],undef,undef,$stuvcurrent,$stuvdisp,undef,$js,$onload,$divforres); if ($versionform) { + if ($divforres) { + $request->print('
'); + } $request->print($versionform); } ($env{'form.student'} eq '' ? &listStudents($request,$symb,'',$divforres) : &submission($request,0,0,$symb,$divforres,$command)); @@ -11017,6 +11031,7 @@ sub handler { [{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('
'); &submit_download_link($request,$symb); } elsif ($command) { &startpage($request,$symb,[{href=>'', text=>'Access denied'}]);