version 1.7, 2001/05/01 17:30:18
|
version 1.8, 2001/06/08 19:44:48
|
Line 1
|
Line 1
|
# The LON-CAPA Grading handler |
# The LON-CAPA Grading handler |
# 2/9,2/13 Guy Albertelli |
# 2/9,2/13 Guy Albertelli |
|
# 6/8 Gerd Kortemeyer |
|
|
package Apache::grades; |
package Apache::grades; |
use strict; |
use strict; |
Line 83 sub viewstudentgrade {
|
Line 84 sub viewstudentgrade {
|
|
|
my ($stuname,$domain) = split(/:/,$student); |
my ($stuname,$domain) = split(/:/,$student); |
|
|
my %record=&Apache::lonnet::restore($symb,$courseid,$domain,$stuname, |
my %record=&Apache::lonnet::restore($symb,$courseid,$domain,$stuname); |
&Apache::lonnet::homeserver($stuname,$domain)); |
|
|
|
$result.="<tr><td>$stuname</td><td>$domain</td>\n"; |
$result.="<tr><td>$stuname</td><td>$domain</td>\n"; |
foreach my $part (@parts) { |
foreach my $part (@parts) { |
Line 125 sub setstudentgrade {
|
Line 125 sub setstudentgrade {
|
|
|
my ($stuname,$domain) = split(/:/,$student); |
my ($stuname,$domain) = split(/:/,$student); |
|
|
my %record=&Apache::lonnet::restore($symb,$courseid,$domain,$stuname, |
my %record=&Apache::lonnet::restore($symb,$courseid,$domain,$stuname); |
&Apache::lonnet::homeserver($stuname,$domain)); |
|
my %newrecord; |
my %newrecord; |
|
|
foreach my $part (@parts) { |
foreach my $part (@parts) { |
Line 162 sub setstudentgrade {
|
Line 162 sub setstudentgrade {
|
} |
} |
if ( scalar(keys(%newrecord)) > 0 ) { |
if ( scalar(keys(%newrecord)) > 0 ) { |
$newrecord{"resource.regrader"}="$ENV{'user.name'}:$ENV{'user.domain'}"; |
$newrecord{"resource.regrader"}="$ENV{'user.name'}:$ENV{'user.domain'}"; |
&Apache::lonnet::cstore(\%newrecord,$symb,$courseid,$domain,$stuname, |
&Apache::lonnet::cstore(\%newrecord,$symb,$courseid,$domain,$stuname); |
&Apache::lonnet::homeserver($stuname,$domain)); |
|
$result.="Stored away ".scalar(keys(%newrecord))." elements.<br />\n"; |
$result.="Stored away ".scalar(keys(%newrecord))." elements.<br />\n"; |
} |
} |
return $result; |
return $result; |