[LON-CAPA-cvs] cvs: loncom /homework grades.pm
banghart
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 09 Oct 2007 19:33:57 -0000
banghart Tue Oct 9 15:33:57 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
Saving work in progress. Work toward selecting students to grade
by group(s).
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.448 loncom/homework/grades.pm:1.449
--- loncom/homework/grades.pm:1.448 Tue Oct 9 06:31:21 2007
+++ loncom/homework/grades.pm Tue Oct 9 15:33:56 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.448 2007/10/09 10:31:21 foxr Exp $
+# $Id: grades.pm,v 1.449 2007/10/09 19:33:56 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -475,7 +475,7 @@
#--- Dumps the class list with usernames,list of sections,
#--- section, ids and fullnames for each user.
sub getclasslist {
- my ($getsec,$filterlist) = @_;
+ my ($getsec,$filterlist,$getgroup) = @_;
my @getsec;
my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
if (!ref($getsec)) {
@@ -487,9 +487,10 @@
}
if (grep(/^all$/,@getsec)) { undef(@getsec); }
- my $classlist=&Apache::loncoursedata::get_classlist();
+ my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist();
# Bail out if we were unable to get the classlist
return if (! defined($classlist));
+ &Apache::loncoursedata::get_group_memberships($classlist,$keylist);
#
my %sections;
my %fullnames;
@@ -506,6 +507,8 @@
$classlist->{$student}->[&Apache::loncoursedata::CL_FULLNAME()];
my $status =
$classlist->{$student}->[&Apache::loncoursedata::CL_STATUS()];
+ my $group =
+ $classlist->{$student}->[&Apache::loncoursedata::CL_GROUP()];
# filter students according to status selected
if ($filterlist && (!($stu_status =~ /Any/))) {
if (!($stu_status =~ $status)) {
@@ -768,8 +771,8 @@
my $cdom = $env{"course.$env{'request.course.id'}.domain"};
my $cnum = $env{"course.$env{'request.course.id'}.num"};
my $getsec = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
+ my $getgroup = $env{'form.group'} eq '' ? 'all' : $env{'form.group'};
my $submitonly= $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'};
-
my $viewgrade = $env{'form.showgrading'} eq 'yes' ? 'View/Grade/Regrade' : 'View';
$env{'form.probTitle'} = $env{'form.probTitle'} eq '' ?
&Apache::lonnet::gettitle($symb) : $env{'form.probTitle'};
@@ -1784,7 +1787,6 @@
# --------------------------- show submissions of a student, option to grade
sub submission {
my ($request,$counter,$total) = @_;
-
my ($uname,$udom) = ($env{'form.student'},$env{'form.userdom'});
$udom = ($udom eq '' ? $env{'user.domain'} : $udom); #has form.userdom changed for a student?
my $usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'});