--- loncom/homework/grades.pm 2001/11/29 23:16:29 1.17
+++ loncom/homework/grades.pm 2002/04/09 04:33:10 1.21
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.17 2001/11/29 23:16:29 albertel Exp $
+# $Id: grades.pm,v 1.21 2002/04/09 04:33:10 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,7 +64,9 @@ 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
");
+ $request->print ('
Show Student Submissions on Assessment
'.
+ 'Username | Domain | Name | |
'
+ );
my (%classlist) = &getclasslist($cdom,$cnum,$chome,'0');
foreach my $student ( sort(@{ $classlist{'allids'} }) ) {
my ($sname,$sdom) = split(/:/,$student);
@@ -77,22 +79,28 @@ sub listStudents {
# my $sfullname = $Apache::lonnet::unescape($nameparts[0]);
if ( $Apache::grades::viewgrades eq 'F' ) {
- $request->print('
');
}
@@ -260,6 +268,10 @@ sub submission {
my $rendered=&Apache::loncommon::get_student_view($symb,$uname,$udom,
$ENV{'request.course.id'});
$result.="Student's view of the problem:
$rendered
Correct answer:";
+
+ my $answer=&Apache::loncommon::get_student_answers($symb,$uname,$udom,
+ $ENV{'request.course.id'});
+ $result.=$answer;
return $result;
}
@@ -410,7 +422,7 @@ sub handler {
} else {
$Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'});
if ($command eq 'submission') {
- $request->print(&listStudents($request)) if ($ENV{'form.student'} eq '');
+ &listStudents($request) if ($ENV{'form.student'} eq '');
$request->print(&submission($request)) if ($ENV{'form.student'} ne '');
} elsif ($command eq 'viewgrades') {
$request->print(&viewgrades($request));