version 1.32, 2003/03/03 22:54:05
|
version 1.34, 2003/03/04 16:10:09
|
Line 143 the button marked "Update Disp
|
Line 143 the button marked "Update Disp
|
</font> |
</font> |
</p> |
</p> |
ENDMSG |
ENDMSG |
|
# $r->print(&OutputDescriptions()); |
return; |
return; |
} |
} |
# |
# |
Line 273 sub CreateInterface {
|
Line 274 sub CreateInterface {
|
my @OutputOptions = |
my @OutputOptions = |
({ name => 'HTML, with links', |
({ name => 'HTML, with links', |
value => 'html, with links', |
value => 'html, with links', |
description => ''}, |
description => 'Output HTML with each symbol linked to the problem '. |
|
'which generated it.'}, |
{ name => 'HTML, without links', |
{ name => 'HTML, without links', |
value => 'html, without links', |
value => 'html, without links', |
description => ''}, |
description => 'Output HTML. By not including links, the size of the'. |
{ name => 'HTML, totals', |
' web page is greatly reduced. If your browser crashes on the '. |
value => 'html, totals', |
'full display, try this.'}, |
description => ''}, |
|
{ name => 'HTML, scores only', |
{ name => 'HTML, scores only', |
value => 'html, scores only', |
value => 'html, scores only', |
description => ''}, |
description => 'Output HTML, only showing the total number of correct'. |
|
' problems (or problem parts) and not the maximum possible for '. |
|
'each student'}, |
|
{ name => 'HTML, totals', |
|
value => 'html, totals', |
|
description => 'Output HTML, but only the summary statistics for each'. |
|
' sequence selected.'}, |
|
{ name => 'Excel, scores only', |
|
value => 'excel, scores only', |
|
description => 'Output an Excel file (compatable with Excel 95), '. |
|
'with a single column for each sequence showing the students '. |
|
'score.'}, |
|
# { name => 'Excel, everything', |
|
# value => 'excel, everything', |
|
# description => 'Output an Excel file (compatable with Excel 95), '. |
|
# 'with a seperate worksheet for each sequence you have selected '. |
|
# 'the data for each problem part '. |
|
# '(number of tries, status, points awarded) '. |
|
# 'will be listed.'}, |
{ name => 'Excel, totals', |
{ name => 'Excel, totals', |
value => 'excel, totals', |
value => 'excel, totals', |
|
description => 'Output an Excel file (compatable with Excel 95), '. |
|
'with two columns for each sequence, the students score on the '. |
|
'sequence and the students maximum possible on the sequence'}, |
|
{ name => 'CSV, everything', |
|
value => 'csv, everything', |
description => ''}, |
description => ''}, |
{ name => 'Excel, scores only', |
{ name => 'CSV, scores only', |
value => 'excel, scores only', |
value => 'csv, scores only', |
description => ''}, |
description => ''}, |
{ name => 'CSV, totals', |
{ name => 'CSV, totals', |
value => 'csv, totals', |
value => 'csv, totals', |
description => ''}, |
description => ''}, |
{ name => 'CSV, scores only', |
|
value => 'csv, scores only', |
|
description => ''}, |
|
{ name => 'CSV, everything', |
|
value => 'csv, everything', |
|
description => ''} |
|
); |
); |
|
|
|
sub OutputDescriptions { |
|
my $Str = ''; |
|
$Str .= "<h2>Output Modes</h2>\n"; |
|
$Str .= "<dl>\n"; |
|
foreach my $outputmode (@OutputOptions) { |
|
$Str .=" <dt>".$outputmode->{'name'}."</dt>\n"; |
|
$Str .=" <dd>".$outputmode->{'description'}."</dd>\n"; |
|
} |
|
$Str .= "</dl>\n"; |
|
return $Str; |
|
} |
|
|
sub CreateAndParseOutputSelector { |
sub CreateAndParseOutputSelector { |
my $Str = ''; |
my $Str = ''; |
my $elementname = 'outputmode'; |
my $elementname = 'outputmode'; |
Line 551 sub excel_initialize {
|
Line 581 sub excel_initialize {
|
$excel_workbook->set_tempdir($Apache::lonnet::tmpdir); |
$excel_workbook->set_tempdir($Apache::lonnet::tmpdir); |
# |
# |
# Add a worksheet |
# Add a worksheet |
$excel_sheet = $excel_workbook->addworksheet |
my $sheetname = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
($ENV{'course.'.$ENV{'request.course.id'}.'.description'}); |
if (length($sheetname) > 31) { |
|
$sheetname = substr($sheetname,0,31); |
|
} |
|
$excel_sheet = $excel_workbook->addworksheet($sheetname); |
|
# |
|
# Put the course description in the header |
|
$excel_sheet->write($rows_output,$cols_output++, |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.description'}); |
|
$cols_output += 3; |
|
# |
|
# Put a description of the sections listed |
|
my $sectionstring = ''; |
|
my @Sections = @Apache::lonstatistics::SelectedSections; |
|
if (scalar(@Sections) > 1) { |
|
if (scalar(@Sections) > 2) { |
|
my $last = pop(@Sections); |
|
$sectionstring = "Sections ".join(', ',@Sections).', and '.$last; |
|
} else { |
|
$sectionstring = "Sections ".join(' and ',@Sections); |
|
} |
|
} else { |
|
if ($Sections[0] eq 'all') { |
|
$sectionstring = "All sections"; |
|
} else { |
|
$sectionstring = "Section ".$Sections[0]; |
|
} |
|
} |
|
$excel_sheet->write($rows_output,$cols_output++,$sectionstring); |
|
$cols_output += scalar(@Sections); |
|
# |
|
# Put the date in there too |
|
$excel_sheet->write($rows_output,$cols_output++, |
|
'Compiled on '.localtime(time)); |
|
# |
|
$rows_output++; |
# |
# |
# Add the student headers |
# Add the student headers |
|
$cols_output = 0; |
foreach my $field (&get_student_fields_to_show()) { |
foreach my $field (&get_student_fields_to_show()) { |
$excel_sheet->write(1,$cols_output++,$field); |
$excel_sheet->write($rows_output,$cols_output++,$field); |
} |
} |
# |
# |
# Add the Sequence Headers |
# Add the Sequence Headers |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&get_sequences_to_show) { |
$excel_sheet->write(0,$cols_output,$seq->{'title'}); |
$excel_sheet->write($rows_output,$cols_output,$seq->{'title'}); |
if ($show eq 'totals') { |
if ($show eq 'totals') { |
$excel_sheet->write(1,$cols_output,'score'); |
$excel_sheet->write($rows_output+1,$cols_output,'score'); |
$excel_sheet->write(1,$cols_output+1,'maximum'); |
$excel_sheet->write($rows_output+1,$cols_output+1,'maximum'); |
$cols_output += 2; |
$cols_output += 2; |
} else { |
} else { |
$cols_output++; |
$cols_output++; |
Line 573 sub excel_initialize {
|
Line 638 sub excel_initialize {
|
# |
# |
# Bookkeeping |
# Bookkeeping |
if ($show eq 'totals') { |
if ($show eq 'totals') { |
$rows_output = 2; |
$rows_output += 2; |
} else { |
} else { |
$rows_output = 1; |
$rows_output += 1; |
} |
} |
# |
# |
# Let the user know what we are doing |
# Let the user know what we are doing |
Line 648 sub excel_outputstudent {
|
Line 713 sub excel_outputstudent {
|
$r->print($num_students.' out of '. |
$r->print($num_students.' out of '. |
(scalar(@Apache::lonstatistics::Students)). |
(scalar(@Apache::lonstatistics::Students)). |
" students processed. ". |
" students processed. ". |
$time_est." remain. <br />\n"); |
$time_est." remain. Elapsed: ".(time - $start_time). |
|
"<br />\n"); |
$r->rflush(); |
$r->rflush(); |
} |
} |
return; |
return; |