--- loncom/homework/grades.pm 2002/09/06 20:59:28 1.48
+++ loncom/homework/grades.pm 2002/09/20 23:35:30 1.49
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.48 2002/09/06 20:59:28 albertel Exp $
+# $Id: grades.pm,v 1.49 2002/09/20 23:35:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -111,6 +111,10 @@ sub getclasslist {
my %classlist=&Apache::lonnet::dump('classlist',
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
$ENV{'course.'.$ENV{'request.course.id'}.'.num'});
+ my ($tmp) = keys(%classlist);
+ # Bail out if we were unable to get the classlist
+ return if ($tmp =~ /^(con_lost|error|no_such_host)/i);
+
# codes to check for fields in the classlist
# should contain end:start:id:section:fullname
for (keys %classlist) {
@@ -297,6 +301,37 @@ sub verifyreceipt {
# on the problem page.
sub listStudents {
my ($request) = shift;
+
+ my ($symb,$url) = &get_symb_and_url();
+ my $cdom = $ENV{"course.$ENV{'request.course.id'}.domain"};
+ my $cnum = $ENV{"course.$ENV{'request.course.id'}.num"};
+ my $getsec = $ENV{'form.section'} eq '' ? 'all' : $ENV{'form.section'};
+ my $submitonly= $ENV{'form.submitonly'} eq '' ? 'all' : $ENV{'form.submitonly'};
+
+ my $result;
+ my ($partlist,$handgrade) = &response_type($url);
+ for (sort keys(%$handgrade)) {
+ my ($responsetype,$handgrade)=split(/:/,$$handgrade{$_});
+ $ENV{'form.handgrade'} = 'yes' if ($handgrade eq 'yes');
+ $result.='
'."\n";
$result.=''."\n";
+ if (ref($sections)) {
+ $result.=' (Section "no" implies the students were not assigned a section.) '
+ if (grep /no/,@$sections);
+ }
+
+
+ $result.=' '."\n".''."\n";
$result.='