version 1.449, 2007/10/09 19:33:56
|
version 1.450, 2007/10/09 23:03:22
|
Line 477 COMMONJSFUNCTIONS
|
Line 477 COMMONJSFUNCTIONS
|
sub getclasslist { |
sub getclasslist { |
my ($getsec,$filterlist,$getgroup) = @_; |
my ($getsec,$filterlist,$getgroup) = @_; |
my @getsec; |
my @getsec; |
|
my @getgroup; |
my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); |
my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); |
if (!ref($getsec)) { |
if (!ref($getsec)) { |
if ($getsec ne '' && $getsec ne 'all') { |
if ($getsec ne '' && $getsec ne 'all') { |
Line 486 sub getclasslist {
|
Line 487 sub getclasslist {
|
@getsec=@{$getsec}; |
@getsec=@{$getsec}; |
} |
} |
if (grep(/^all$/,@getsec)) { undef(@getsec); } |
if (grep(/^all$/,@getsec)) { undef(@getsec); } |
|
if (!ref($getgroup)) { |
|
if ($getgroup ne '' && $getgroup ne 'all') { |
|
@getgroup=($getgroup); |
|
} |
|
} else { |
|
@getgroup=@{$getgroup}; |
|
} |
|
if (grep(/^all$/,@getgroup)) { undef(@getgroup); } |
|
|
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist(); |
my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist(); |
# Bail out if we were unable to get the classlist |
# Bail out if we were unable to get the classlist |
Line 512 sub getclasslist {
|
Line 521 sub getclasslist {
|
# filter students according to status selected |
# filter students according to status selected |
if ($filterlist && (!($stu_status =~ /Any/))) { |
if ($filterlist && (!($stu_status =~ /Any/))) { |
if (!($stu_status =~ $status)) { |
if (!($stu_status =~ $status)) { |
delete ($classlist->{$student}); |
delete($classlist->{$student}); |
next; |
next; |
} |
} |
} |
} |
|
# filter students according to groups selected |
|
if (@getgroup) { |
|
my $exclude = 1; |
|
foreach my $grp(@getgroup) { |
|
if ($group eq $grp) { |
|
$exclude = 0; |
|
} |
|
} |
|
if ($exclude) { |
|
delete($classlist->{$student}); |
|
} |
|
} |
$section = ($section ne '' ? $section : 'none'); |
$section = ($section ne '' ? $section : 'none'); |
if (&canview($section)) { |
if (&canview($section)) { |
if (!@getsec || grep(/^\Q$section\E$/,@getsec)) { |
if (!@getsec || grep(/^\Q$section\E$/,@getsec)) { |
$sections{$section}++; |
$sections{$section}++; |
$fullnames{$student}=$fullname; |
if ($classlist->{$student}) { |
|
$fullnames{$student}=$fullname; |
|
} |
} else { |
} else { |
delete($classlist->{$student}); |
delete($classlist->{$student}); |
} |
} |
Line 872 LISTJAVASCRIPT
|
Line 895 LISTJAVASCRIPT
|
'value="Next->" /> <br />'."\n"; |
'value="Next->" /> <br />'."\n"; |
$gradeTable.=&check_buttons(); |
$gradeTable.=&check_buttons(); |
$gradeTable.='<label><input type="checkbox" name="checkPlag" checked="checked" />Check For Plagiarism</label>'; |
$gradeTable.='<label><input type="checkbox" name="checkPlag" checked="checked" />Check For Plagiarism</label>'; |
my ($classlist, undef, $fullname) = &getclasslist($getsec,'1'); |
my ($classlist, undef, $fullname) = &getclasslist($getsec,'1',$getgroup); |
$gradeTable.='<table border="0"><tr><td bgcolor="#777777">'. |
$gradeTable.='<table border="0"><tr><td bgcolor="#777777">'. |
'<table border="0"><tr bgcolor="#e6ffff">'; |
'<table border="0"><tr bgcolor="#e6ffff">'; |
my $loop = 0; |
my $loop = 0; |