--- loncom/homework/grades.pm 2003/07/28 18:04:39 1.126
+++ loncom/homework/grades.pm 2003/08/18 18:24:32 1.134
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.126 2003/07/28 18:04:39 ng Exp $
+# $Id: grades.pm,v 1.134 2003/08/18 18:24:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -96,6 +96,18 @@ sub get_fullname {
return $fullname;
}
+#--- Format fullname, username:domain if different for display
+#--- Use anywhere where the student names are listed
+sub nameUserString {
+ my ($type,$fullname,$uname,$udom) = @_;
+ if ($type eq 'header') {
+ return ' Fullname (Username) ';
+ } else {
+ return ' '.$fullname.' ('.$uname.
+ ($ENV{'user.domain'} eq $udom ? '' : ' ('.$udom.')').')';
+ }
+}
+
#--- Get the partlist and the response type for a given problem. ---
#--- Indicate if a response type is coded handgraded or not. ---
sub response_type {
@@ -109,9 +121,8 @@ sub response_type {
my ($responsetype,$part) = split(/_/,$_,2);
my ($partid,$respid) = split(/_/,$part);
$responsetype =~ s/response$//; # make it compatible w/ navmaps - should move to that!!
-# my ($value) = &Apache::lonnet::EXT('resource.'.$part.'.handgrade',$symb);
-# $handgrade{$part} = $responsetype.':'.($value eq 'yes' ? 'yes' : 'no'); #a bug $value is 'yes' regardless
- $handgrade{$part} = $responsetype.':'.(($allkeys =~ /parameter_$part\_handgrade/) ? 'yes' : 'no');
+ my ($value) = &Apache::lonnet::EXT('resource.'.$part.'.handgrade',$symb);
+ $handgrade{$part} = $responsetype.':'.($value eq 'yes' ? 'yes' : 'no');
next if ($seen{$partid} > 0);
$seen{$partid}++;
push @partlist,$partid;
@@ -299,7 +310,7 @@ sub student_gradeStatus {
my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname);
my %partstatus = ();
foreach (@$partlist) {
- my ($status,$foo) = split(/_/,$record{"resource.$_.solved"},2);
+ my ($status,undef) = split(/_/,$record{"resource.$_.solved"},2);
$status = 'nothing' if ($status eq '');
$partstatus{$_} = $status;
my $subkey = "resource.$_.submitted_by";
@@ -533,15 +544,14 @@ LISTJAVASCRIPT
$gradeTable.='" />'."\n";
-
+ $gradeTable.='Check For Plagiarism';
my (undef, undef, $fullname) = &getclasslist($getsec,'1');
$gradeTable.='