--- loncom/interface/statistics/lonstudentassessment.pm 2005/03/21 19:47:54 1.120
+++ loncom/interface/statistics/lonstudentassessment.pm 2005/04/07 06:56:24 1.121
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.120 2005/03/21 19:47:54 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.121 2005/04/07 06:56:24 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -153,10 +153,10 @@ sub BuildStudentAssessmentPage {
&Apache::lonstatistics::PrepareClasslist();
#
$single_student_mode = 0;
- $single_student_mode = 1 if ($ENV{'form.SelectedStudent'});
+ $single_student_mode = 1 if ($env{'form.SelectedStudent'});
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['selectstudent']);
- if ($ENV{'form.selectstudent'}) {
+ if ($env{'form.selectstudent'}) {
&Apache::lonstatistics::DisplayClasslist($r);
return;
}
@@ -167,10 +167,10 @@ sub BuildStudentAssessmentPage {
$r->print(&CreateInterface());
$r->print('');
$r->print('');
+ $env{'form.sort'}.'" />');
$r->rflush();
#
- if (! exists($ENV{'form.notfirstrun'}) && ! $single_student_mode) {
+ if (! exists($env{'form.notfirstrun'}) && ! $single_student_mode) {
return;
}
$r->print('
'.
@@ -234,7 +234,7 @@ sub BuildStudentAssessmentPage {
sub next_and_previous_buttons {
my $Str = '';
$Str .= '';
+ $env{'form.SelectedStudent'}.'" />';
#
# Build the previous student link
my $previous = &Apache::lonstatistics::previous_student();
@@ -431,11 +431,11 @@ sub CreateAndParseOutputSelector {
#
# Format for output options is 'mode, restrictions';
my $selected = 'html, without links';
- if (exists($ENV{'form.'.$elementname})) {
- if (ref($ENV{'form.'.$elementname} eq 'ARRAY')) {
- $selected = $ENV{'form.'.$elementname}->[0];
+ if (exists($env{'form.'.$elementname})) {
+ if (ref($env{'form.'.$elementname} eq 'ARRAY')) {
+ $selected = $env{'form.'.$elementname}->[0];
} else {
- $selected = $ENV{'form.'.$elementname};
+ $selected = $env{'form.'.$elementname};
}
}
#
@@ -552,11 +552,11 @@ sub CreateAndParseOutputDataSelector {
my $elementname = 'chartoutputdata';
#
my $selected = 'scores';
- if (exists($ENV{'form.'.$elementname})) {
- if (ref($ENV{'form.'.$elementname} eq 'ARRAY')) {
- $selected = $ENV{'form.'.$elementname}->[0];
+ if (exists($env{'form.'.$elementname})) {
+ if (ref($env{'form.'.$elementname} eq 'ARRAY')) {
+ $selected = $env{'form.'.$elementname}->[0];
} else {
- $selected = $ENV{'form.'.$elementname};
+ $selected = $env{'form.'.$elementname};
}
}
#
@@ -652,7 +652,7 @@ sub html_initialize {
'');
}
#
- $r->print("".$ENV{'course.'.$ENV{'request.course.id'}.'.description'}.
+ $r->print("".$env{'course.'.$env{'request.course.id'}.'.description'}.
" ".localtime(time)."
");
#
if ($chosen_output->{'base'} !~ /^final table/) {
@@ -747,7 +747,7 @@ sub html_outputstudent {
my %StudentsData;
my @tmp = &Apache::loncoursedata::get_current_state
($student->{'username'},$student->{'domain'},undef,
- $ENV{'request.course.id'});
+ $env{'request.course.id'});
if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) {
%StudentsData = @tmp;
}
@@ -1039,13 +1039,13 @@ sub excel_initialize {
return if (! defined($excel_workbook));
#
# Add a worksheet
- my $sheetname = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+ my $sheetname = $env{'course.'.$env{'request.course.id'}.'.description'};
$sheetname = &Apache::loncommon::clean_excel_name($sheetname);
$excel_sheet = $excel_workbook->addworksheet($sheetname);
#
# Put the course description in the header
$excel_sheet->write($header_row,$cols_output++,
- $ENV{'course.'.$ENV{'request.course.id'}.'.description'},
+ $env{'course.'.$env{'request.course.id'}.'.description'},
$format->{'h1'});
$cols_output += 3;
#
@@ -1314,7 +1314,7 @@ sub excel_initialize {
#
# Let the user know what we are doing
my $studentcount = scalar(@Apache::lonstatistics::Students);
- if ($ENV{'form.SelectedStudent'}) {
+ if ($env{'form.SelectedStudent'}) {
$studentcount = '1';
}
if ($studentcount > 1) {
@@ -1361,7 +1361,7 @@ sub excel_outputstudent {
my @tmp = &Apache::loncoursedata::get_current_state($student->{'username'},
$student->{'domain'},
undef,
- $ENV{'request.course.id'});
+ $env{'request.course.id'});
if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) {
%StudentsData = @tmp;
}
@@ -1549,7 +1549,7 @@ END
if (! defined($outputfile)) { return ''; }
#
# Datestamp
- my $description = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+ my $description = $env{'course.'.$env{'request.course.id'}.'.description'};
print $outputfile '"'.&Apache::loncommon::csv_translate($description).'",'.
'"'.&Apache::loncommon::csv_translate(scalar(localtime(time))).'"'.
"\n";
@@ -1639,7 +1639,7 @@ sub csv_outputstudent {
my @tmp = &Apache::loncoursedata::get_current_state($student->{'username'},
$student->{'domain'},
undef,
- $ENV{'request.course.id'});
+ $env{'request.course.id'});
if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) {
%StudentsData = @tmp;
}