--- loncom/homework/grades.pm 2002/10/16 19:23:48 1.56 +++ loncom/homework/grades.pm 2003/02/27 21:05:58 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.56 2002/10/16 19:23:48 matthew Exp $ +# $Id: grades.pm,v 1.68 2003/02/27 21:05:58 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,6 +31,8 @@ # 8/20 Gerd Kortemeyer # Year 2002 # June-August H.K. Ng +# Year 2003 +# February H.K. Ng # package Apache::grades; @@ -39,12 +41,13 @@ use Apache::style; use Apache::lonxml; use Apache::lonnet; use Apache::loncommon; +use Apache::lonnavmaps; use Apache::lonhomework; use Apache::loncoursedata; use Apache::lonmsg qw(:user_normal_msg); use Apache::Constants qw(:common); -# ----- These first few routines are general use routines.----- +# ----- These first few routines are general use routines.---- # # --- Retrieve the parts that matches stores_\d+ from the metadata file.--- sub getpartlist { @@ -269,6 +272,10 @@ sub verifyreceipt { return $string.&show_grading_menu_form($symb,$url); } +# +# Pick student and page/sequence for manual grading + + #--- This is called by a number of programs. #--- Called from the Grading Menu - View/Grade an individual student #--- Also called directly when one clicks on the subm button @@ -293,12 +300,7 @@ sub listStudents { } $result.=''; - my $viewgrade; - if ($ENV{'form.handgrade'} eq 'yes') { - $viewgrade = 'View/Grade'; - } else { - $viewgrade = 'View'; - } + my $viewgrade = $ENV{'form.handgrade'} eq 'yes' ? 'View/Grade' : 'View'; $result='
';
+ $result.='
|
';
- $result.='
|
'. - 'This student has submitted '. - (scalar (@badcollaborators) > 1 ? '' : 'an'). - ' invalid collaborator'.(scalar (@badcollaborators) > 1 ? 's. ' : '. '). - (join ', ',@badcollaborators).' |
'. - 'This student has submitted too many collaborators. Maximum is '. - $ncol.'. |
';
+ $result.='This student has submitted ';
+ if (scalar(@badcollaborators) == 1) {
+ $result .= 'an invalid collaborator';
+ } else {
+ $result .= 'invalid collaborators';
+ }
+ $result .= ': '.join(', ',@badcollaborators);
+
+ }
+ if (scalar(@collaborators > $ncol)) {
+ $result .= '
| |
Part '.
$partid.' ( ID '.$respid.
- ' ) Answer: '.
+ ' ) '.
+ ($record{"resource.$partid.$respid.uploadedurl"}?
+ ' File uploaded by student Like all files provided by users, this file may contain virusses ':''). + 'Answer: '. &keywords_highlight($subval).' |
'."\n";
$result.='
|