--- loncom/homework/grades.pm 2002/09/20 23:46:41 1.51
+++ loncom/homework/grades.pm 2002/10/02 21:24:35 1.53
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.51 2002/09/20 23:46:41 albertel Exp $
+# $Id: grades.pm,v 1.53 2002/10/02 21:24:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -265,7 +265,7 @@ sub verifyreceipt {
my ($string,$contents,$matches) = ('','',0);
my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist('all','0');
- foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+ foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom)=split(/\:/);
if ($receipt eq
&Apache::lonnet::ireceipt($uname,$udom,$courseid,$symb)) {
@@ -401,7 +401,7 @@ LISTJAVASCRIPT
$gradeTable.=''."\n";
my $ctr = 0;
- foreach my $student (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+ foreach my $student (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom) = split(/:/,$student);
my (%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist);
my $statusflg = '';
@@ -1300,7 +1300,7 @@ sub processHandGrade {
my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist($ENV{'form.section'},'0');
my (@parsedlist,@nextlist);
my ($nextflg) = 0;
- foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+ foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
if ($nextflg == 1 && $button =~ /Next$/) {
push @parsedlist,$_;
}
@@ -1584,12 +1584,22 @@ sub viewgrades {
''."\n".
''."\n".
''."\n";
- $result.='To assign the same score for all the students use the radio buttons or '.
- 'text box below. To assign scores individually fill in the score boxes for '.
- 'each student in the table below. A part that has already '.
- 'been graded does not get changed using the radio buttons or text box. '.
- 'If needed, it has to be changed individually.';
-
+ $result.='
Assign Common Grade To ';
+ if ($ENV{'form.section'} eq 'all') {
+ $result.='Class
';
+ } elsif ($ENV{'form.section'} eq 'no') {
+ $result.='Students in no Section ';
+ } else {
+ $result.='Students in Section '.$ENV{'form.section'}.'';
+ }
+ $result.= '
'."\n".
+ '
';
+# $result.='To assign the same score for all the students use the radio buttons or '.
+# 'text box below. To assign scores individually fill in the score boxes for '.
+# 'each student in the table below. A part that has already '.
+# 'been graded does not get changed using the radio buttons or text box. '.
+# 'If needed, it has to be changed individually.';
+# $result.='
';
#radio buttons/text box for assigning points for a section or class.
#handles different parts of a problem
my ($partlist,$handgrade) = &response_type($ENV{'form.url'});
@@ -1631,7 +1641,8 @@ sub viewgrades {
'
'."\n";
$ctsparts++;
}
- $result.='
';
+ $result.='
'.''.''."\n".
+ '';
$result.=' ';
$result.='Assign Grade to Specific Students in ';
+ if ($ENV{'form.section'} eq 'all') {
+ $result.='the Class ';
+ } elsif ($ENV{'form.section'} eq 'no') {
+ $result.='no Section ';
+ } else {
+ $result.='Section '.$ENV{'form.section'}.'';
+ }
$result.= '
'."\n".
'
'.
'
Fullname
Username
Domain
'."\n";
@@ -1650,11 +1669,11 @@ sub viewgrades {
if ($display =~ /^Partial Credit Factor/) {
$_ = $display;
my ($partid) = /.*?(\d+).*/;
- $result.='
Score Part '.$partid.' (weight = '.
+ $result.='
Score Part '.$partid.' (weight = '.
$weight{$partid}.')
'."\n";
next;
}
- $display =~ s/Problem Status/Grade Status /;
+ $display =~ s|Problem Status|Grade Status |;
$result.='
'.$display.'
'."\n";
}
$result.='
';
@@ -1663,7 +1682,7 @@ sub viewgrades {
#list all the students - with points and grade status
my ($classlist,$seclist,$ids,$stusec,$fullname) = &getclasslist($ENV{'form.section'},'0');
my $ctr = 0;
- foreach (sort {$$fullname{$a} cmp $$fullname{$b} } keys %$fullname) {
+ foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom) = split(/:/);
$result.=''."\n";
$result.=&viewstudentgrade($url,$symb,$ENV{'request.course.id'},
@@ -2116,7 +2135,7 @@ sub view_edit_entire_class_form {
my ($classlist,$sections) = &getclasslist('all','0');
my $result.='
'."\n";
$result.='
'."\n";
- $result.=' Grade Entire Class
'."\n";
+ $result.=' Grade Entire Section or Class'."\n";
$result.='