--- loncom/homework/grades.pm 2002/12/10 02:46:23 1.65 +++ loncom/homework/grades.pm 2003/03/11 19:32:02 1.71 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.65 2002/12/10 02:46:23 albertel Exp $ +# $Id: grades.pm,v 1.71 2003/03/11 19:32:02 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, March 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 { @@ -234,7 +237,8 @@ sub verifyreceipt { my $title.='
'. - 'Resource: '.$url.' |
'. + 'Part '.$partid.' Points: | '."\n";
+
+ my $ctr = 0;
+ $result.='
| or | '."\n"; + $result.=''."\n"; + $result.=' | /'.$wgt.' '.$wgtmsg. + ($$record{'resource.'.$partid.'.solved'} eq 'correct_by_student' ? ' '.$checkIcon : ''). + ' | '."\n"; + + $result.=''."\n"; + } else { + $result.=''. + ''."\n"; + } + $result.="  \n"; + $result.=''."\n". + ''."\n". + ''."\n"; + $result.=' |
';
- $result.='
'; - $request->print($result); + return $result; +# $request->print($result); } # --------------------------- show submissions of a student, option to grade @@ -841,13 +986,15 @@ sub submission { # header info if ($counter == 0) { &sub_page_js($request); + &sub_page_kw_js($request); $request->print(' Submission Record'."\n". - ' Resource: '.$url.''."\n"); + ' Problem: '. + &Apache::lonnet::metadata($url,'title').''."\n"); # option to display problem, only once else it cause problems # with the form later since the problem has a form. - if ($ENV{'form.vProb'} eq 'yes') { - &show_problem($request,$symb,$uname,$udom,0); + if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) { + $request->print(&show_problem($request,$symb,$uname,$udom,0,1)); } # kwclr is the only variable that is guaranteed to be non blank @@ -911,8 +1058,8 @@ KEYWORDS } if ($ENV{'form.vProb'} eq 'all') { - $request->print(''); - &show_problem($request,$symb,$uname,$udom,1); + $request->print(' ') if ($counter > 0); + $request->print(&show_problem($request,$symb,$uname,$udom,1,1)); } my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname); @@ -1008,7 +1155,7 @@ KEYWORDS } else { my ($string,$timestamp)= &get_last_submission (%record); - my $lastsubonly.=''. + my $lastsubonly=''. ($$timestamp eq '' ? '' : 'Date Submitted: '. $$timestamp).''; if ($$timestamp eq '') { @@ -1021,7 +1168,12 @@ KEYWORDS my ($ressub,$subval) = split(/:/,$_,2); $lastsubonly.=' | ||||||
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).' |
Part '.$partid.' Points: | ';
- my $ctr = 0;
- $result.='
| or | '; - $result.=''."\n"; - $result.=' | /'.$wgt.' '.$wgtmsg.' | '; - - $result.=''; - } else { - $result.=''. - ''; - } - $result.="  \n"; - $result.=''; - $result.=' |
'."\n";
@@ -1994,7 +2109,8 @@ sub csvuploadmap_header {
}
my $result='
|