--- loncom/homework/grades.pm 2003/06/13 15:43:28 1.96
+++ loncom/homework/grades.pm 2003/06/20 17:25:48 1.102
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.96 2003/06/13 15:43:28 albertel Exp $
+# $Id: grades.pm,v 1.102 2003/06/20 17:25:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -147,43 +147,6 @@ sub getclasslist {
return ($classlist,\@sections,\%fullnames);
}
-#find user domain
-sub finduser {
- my ($name) = @_;
- my $domain = '';
- if ( $Apache::grades::viewgrades eq 'F' ) {
- my %classlist=&Apache::lonnet::dump('classlist',
- $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
- $ENV{'course.'.$ENV{'request.course.id'}.'.num'});
- my (@fields) = grep /^$name:/, keys %classlist;
- ($name, $domain) = split(/:/,$fields[0]);
- return ($name,$domain);
- } else {
- return ($ENV{'user.name'},$ENV{'user.domain'});
- }
-}
-
-#--- Prompts a user to enter a username.
-sub moreinfo {
- my ($request,$reason) = @_;
- $request->print("Unable to process request: $reason");
- if ( $Apache::grades::viewgrades eq 'F' ) {
- $request->print('
');
- }
- return '';
-}
-
#--- Retrieve the grade status of a student for all the parts
sub student_gradeStatus {
my ($url,$symb,$udom,$uname,$partlist) = @_;
@@ -1050,7 +1013,7 @@ sub submission {
(my $url=$ENV{'form.url'})=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
my ($uname,$udom) = ($ENV{'form.student'},$ENV{'form.userdom'});
- ($uname,$udom) = &finduser($uname) if $udom eq '';
+
$ENV{'form.fullname'} = &get_fullname ($uname,$udom) if $ENV{'form.fullname'} eq '';
my $symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url)));
@@ -2395,7 +2358,7 @@ sub csvuploadassign {
}
$request->print('
Assigning Grades
');
my $courseid=$ENV{'request.course.id'};
- my ($classlist) = &getclasslist('all','1');
+ my ($classlist) = &getclasslist('all',0);
my @skipped;
my $countdone=0;
foreach my $grade (@gradedata) {
@@ -2427,7 +2390,6 @@ sub csvuploadassign {
$request->print(' Skipped Students ');
foreach my $student (@skipped) { $request->print(" $student"); }
}
- $request->print(&view_edit_entire_class_form($symb,$url));
$request->print(&show_grading_menu_form($symb,$url));
return '';
}
@@ -2598,10 +2560,9 @@ sub getSymbMap {
my $countProblems = 0;
$mapiterator->next(); # skip the first BEGIN_MAP
my $mapcurRes = $mapiterator->next(); # for "current resource"
- my $ctr=0;
while ($mapdepth > 0) {
if($mapcurRes == $mapiterator->BEGIN_MAP) { $mapdepth++; }
- if($mapcurRes == $mapiterator->END_MAP) { $mapdepth++; }
+ if($mapcurRes == $mapiterator->END_MAP) { $mapdepth--; }
if (ref($mapcurRes) && $mapcurRes->is_problem() && !$mapcurRes->randomout) {
$countProblems++;
@@ -2669,12 +2630,12 @@ sub displayPage {
'