version 1.4, 2003/05/23 21:03:29
|
version 1.5, 2003/05/27 14:52:45
|
Line 51 use Apache::loncoursedata();
|
Line 51 use Apache::loncoursedata();
|
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::Spreadsheet; |
use Apache::Spreadsheet; |
use Apache::studentcalc; |
use Apache::studentcalc; |
|
use Apache::lonstatistics(); |
use HTML::Entities(); |
use HTML::Entities(); |
use Spreadsheet::WriteExcel; |
use Spreadsheet::WriteExcel; |
use Apache::lonnet; |
use Apache::lonnet; |
Line 61 use Time::HiRes;
|
Line 62 use Time::HiRes;
|
sub html_header { |
sub html_header { |
my $self = shift; |
my $self = shift; |
my ($toprow,$bottomrow); |
my ($toprow,$bottomrow); |
foreach (['Sections','Section selector goes here'], |
&Apache::lonstatistics::clear_classlist_variables(); |
|
foreach (['Sections',&Apache::lonstatistics::SectionSelect('Section','multpile',3)], |
['Enrollment Status',&Apache::lonhtmlcommon::StatusOptions(undef,undef,3)], |
['Enrollment Status',&Apache::lonhtmlcommon::StatusOptions(undef,undef,3)], |
['Output Format',&Apache::Spreadsheet::output_selector()]) { |
['Output Format',&Apache::Spreadsheet::output_selector()]) { |
my ($name,$selector) = @{$_}; |
my ($name,$selector) = @{$_}; |
Line 76 sub html_header {
|
Line 78 sub html_header {
|
|
|
sub get_classlist { |
sub get_classlist { |
my $self = shift; |
my $self = shift; |
# Retrieve the classlist |
# Retrieve the classlist and return it |
my @Students = (); |
return &Apache::lonstatistics::get_students(); |
my ($classlist,$field_names) = &Apache::loncoursedata::get_classlist |
|
($self->{'cid'},$self->{'cdom'},$self->{'cnum'}); |
|
while (my ($student,$student_data) = each (%$classlist)) { |
|
my $studenthash = (); |
|
for (my $i=0; $i< scalar(@$field_names);$i++) { |
|
my $field = $field_names->[$i]; |
|
$studenthash->{$field}=$student_data->[$i]; |
|
} |
|
# This is where we can skip students because they are in |
|
# the wrong section, have expired or pending roles, whatever... |
|
push (@Students,$studenthash); |
|
} |
|
my @SortedStudents = sort { $a->{'fullname'} cmp $b->{'fullname'} } @Students; |
|
return @SortedStudents; |
|
} |
} |
|
|
sub get_title { |
sub get_title { |