version 1.68, 2003/05/12 22:07:17
|
version 1.70, 2003/05/13 14:30:26
|
Line 230 sub PrepareClasslist {
|
Line 230 sub PrepareClasslist {
|
} |
} |
} |
} |
# |
# |
|
# Deal with instructors with restricted section access |
|
if ($ENV{'request.course.sec'} !~ /^\s*$/) { |
|
@SelectedSections = ($ENV{'request.course.sec'}); |
|
} |
|
# |
# Set up %StudentData |
# Set up %StudentData |
@StudentDataOrder = qw/fullname username domain id section status/; |
@StudentDataOrder = qw/fullname username domain id section status/; |
foreach my $field (@StudentDataOrder) { |
foreach my $field (@StudentDataOrder) { |
Line 238 sub PrepareClasslist {
|
Line 243 sub PrepareClasslist {
|
$StudentData{$field}->{'width'} = |
$StudentData{$field}->{'width'} = |
$StudentData{$field}->{'base_width'}; |
$StudentData{$field}->{'base_width'}; |
} |
} |
|
|
# |
# |
# get the status requested |
# get the status requested |
my $requested_status = 'Active'; |
my $requested_status = 'Active'; |
Line 282 sub PrepareClasslist {
|
Line 286 sub PrepareClasslist {
|
} |
} |
# |
# |
# Put the consolidated section data in the right place |
# Put the consolidated section data in the right place |
@Sections = sort {$a cmp $b} keys(%Sections); |
if ($ENV{'request.course.sec'} !~ /^\s*$/) { |
unshift(@Sections,'all'); # Put 'all' at the front of the list |
@Sections = ($ENV{'request.course.sec'}); |
|
} else { |
|
@Sections = sort {$a cmp $b} keys(%Sections); |
|
unshift(@Sections,'all'); # Put 'all' at the front of the list |
|
} |
# |
# |
# Sort the Students |
# Sort the Students |
my $sortby = 'fullname'; |
my $sortby = 'fullname'; |
Line 883 sub handler {
|
Line 891 sub handler {
|
if ($loaderror) { return $loaderror; } |
if ($loaderror) { return $loaderror; } |
# |
# |
# Check for access |
# Check for access |
unless(&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { |
if (! &Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { |
$ENV{'user.error.msg'}= |
$ENV{'user.error.msg'}= |
$r->uri.":vgr:0:0:Cannot view grades for complete course"; |
$r->uri.":vgr:0:0:Cannot view grades for complete course"; |
return HTTP_NOT_ACCEPTABLE; |
if (! &Apache::lonnet::allowed('vgr', |
|
$ENV{'request.course.id'}.'/'.$ENV{'request.course.sec'})) { |
|
$ENV{'user.error.msg'}= |
|
$r->uri.":vgr:0:0:Cannot view grades with given role"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
} |
} |
# |
# |
# Set document type for header only |
# Set document type for header only |