--- loncom/homework/grades.pm 2004/11/17 20:42:35 1.229
+++ loncom/homework/grades.pm 2004/12/03 23:54:58 1.234
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.229 2004/11/17 20:42:35 albertel Exp $
+# $Id: grades.pm,v 1.234 2004/12/03 23:54:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1670,10 +1670,25 @@ KEYWORDS
$lastsubonly.='
Part: '.
$display_part.' ( ID '.$respid.
' ) ';
+ my @files;
+ if ($record{"resource.$partid.$respid.portfiles"}) {
+ my $file_url = '/uploaded/'.$udom.'/'.$uname.'/portfolio';
+ foreach my $file (split(',',$record{"resource.$partid.$respid.portfiles"})) {
+ push(@files,$file_url.$file);
+
+ &Apache::lonnet::logthis("found a portfolio file".$record{"resource.$partid.$respid.portfiles"});
+ &Apache::lonnet::logthis("uploaded URL file".$record{"resource.$partid.$respid.uploadedurl"});
+ }
+ }
if ($record{"resource.$partid.$respid.uploadedurl"}) {
- &Apache::lonnet::allowuploaded('/adm/grades',
- $record{"resource.$partid.$respid.uploadedurl"});
- $lastsubonly.=' File uploaded by student Like all files provided by users, this file may contain virusses ';
+ push(@files,$record{"resource.$partid.$respid.uploadedurl"});
+ }
+ if (@files) {
+ $lastsubonly.=' Like all files provided by users, this file may contain virusses ';
+ foreach my $file (@files) {
+ &Apache::lonnet::allowuploaded('/adm/grades',$file);
+ $lastsubonly.=' '.$file.'';
+ }
}
$lastsubonly.='Submitted Answer: '.
&cleanRecord($subval,$responsetype,$symb,$partid,
@@ -2387,9 +2402,6 @@ sub viewgrades {
my (undef,undef,$fullname) = &getclasslist($ENV{'form.section'},'1');
my $ctr = 0;
foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
- my $uname = $_;
- $uname=~s/:/_/;
- $result.=''."\n";
$ctr++;
$result.=&viewstudentgrade($url,$symb,$ENV{'request.course.id'},
$_,$$fullname{$_},\@parts,\%weight,$ctr);
@@ -2413,18 +2425,21 @@ sub viewstudentgrade {
my ($uname,$udom) = split(/:/,$student);
$student=~s/:/_/;
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname);
- my $result=' |
'.$ctr.' | '.
+ my $result=' |
'.
+ ''.
+ "\n".$ctr.' | '.
''.$fullname.' '.
'('.$uname.($ENV{'user.domain'} eq $udom ? '' : ':'.$udom).') | '."\n";
foreach my $apart (@$parts) {
my ($part,$type) = &split_part_type($apart);
my $score=$record{"resource.$part.$type"};
+ $result.='';
if ($type eq 'awarded') {
my $pts = $score eq '' ? '' : $score*$$weight{$part};
$result.=''."\n";
- $result.=' | | '."\n";
@@ -2433,7 +2448,7 @@ sub viewstudentgrade {
$status = 'nothing' if ($status eq '');
$result.=''."\n";
- $result.=' |