--- loncom/homework/grades.pm 2001/05/01 17:30:18 1.7
+++ loncom/homework/grades.pm 2001/08/20 23:27:27 1.15
@@ -1,5 +1,8 @@
# The LON-CAPA Grading handler
# 2/9,2/13 Guy Albertelli
+# 6/8 Gerd Kortemeyer
+# 7/26 H.K. Ng
+# 8/20 Gerd Kortemeyer
package Apache::grades;
use strict;
@@ -26,6 +29,37 @@ sub moreinfo {
}
+sub listStudents {
+ my ($request) = shift;
+ my ($cdom,$cnum) = split(/_/,$ENV{'request.course.id'});
+ my $chome=$ENV{"course.$ENV{'request.course.id'}.home"};
+ $request->print ("Found $cdom:$cnum:$chome
");
+ my (%classlist) = &getclasslist($cdom,$cnum,$chome,'0');
+ foreach my $student ( sort(@{ $classlist{'allids'} }) ) {
+ my ($sname,$sdom) = split(/:/,$student);
+
+ my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
+ ':environment:lastname&generation&firstname&middlename',
+ &Apache::lonnet::homeserver($sname,$sdom));
+ #print "reply=$reply
";
+ my (@nameparts) = split /&/,$reply;
+# my $sfullname = $Apache::lonnet::unescape($nameparts[0]);
+
+ if ( $Apache::grades::viewgrades eq 'F' ) {
+ $request->print('
$stuname | $domain | \n";
foreach my $part (@parts) {
my ($temp,$part,$type)=split(/_/,$part);
#print "resource.$part.$type = ".$record{"resource.$part.$type"}."
\n";
if ($type eq 'awarded') {
my $score=$record{"resource.$part.$type"};
- $result.=" | \n";
+ $result.=" | \n";
} elsif ($type eq 'tries') {
my $score=$record{"resource.$part.$type"};
- $result.=" | \n"
+ $result.=" | \n"
} elsif ($type eq 'solved') {
my $score=$record{"resource.$part.$type"};
- $result.=" |