version 1.107, 2004/12/10 16:52:53
|
version 1.111, 2005/02/11 21:25:53
|
Line 357 sub CreateInterface {
|
Line 357 sub CreateInterface {
|
$Str .= '<input type="submit" name="ClearCache" value="'. |
$Str .= '<input type="submit" name="ClearCache" value="'. |
&mt('Clear Caches').'" />'; |
&mt('Clear Caches').'" />'; |
$Str .= ' 'x5; |
$Str .= ' 'x5; |
|
$Str .= |
|
&mt('Status[_1]', |
|
'<input type="text" name="stats_status" size="60" value="" />'); |
$Str .= '<br />'; |
$Str .= '<br />'; |
return $Str; |
return $Str; |
} |
} |
Line 516 my @OutputDataOptions =
|
Line 519 my @OutputDataOptions =
|
maximum_row => 0, |
maximum_row => 0, |
shortdesc => 'Number of Tries before success on each Problem Part', |
shortdesc => 'Number of Tries before success on each Problem Part', |
longdesc =>'The number of tries before success on each problem part.', |
longdesc =>'The number of tries before success on each problem part.', |
|
non_html_notes => 'negative values indicate an incorrect problem', |
}, |
}, |
{ name =>'Parts Correct', |
{ name =>'Parts Correct', |
base =>'tries', |
base =>'tries', |
Line 951 sub excel_initialize {
|
Line 955 sub excel_initialize {
|
# Determine rows |
# Determine rows |
my $header_row = $rows_output++; |
my $header_row = $rows_output++; |
my $description_row = $rows_output++; |
my $description_row = $rows_output++; |
|
my $notes_row = $rows_output++; |
$rows_output++; # blank row |
$rows_output++; # blank row |
my $summary_header_row; |
my $summary_header_row; |
if ($chosen_output->{'summary_table'}) { |
if ($chosen_output->{'summary_table'}) { |
Line 1025 sub excel_initialize {
|
Line 1030 sub excel_initialize {
|
$cols_output = 0; |
$cols_output = 0; |
$excel_sheet->write($description_row,$cols_output++, |
$excel_sheet->write($description_row,$cols_output++, |
$chosen_output->{'shortdesc'}, |
$chosen_output->{'shortdesc'}, |
$format->{'h3'}); |
$format->{'b'}); |
|
# |
|
$cols_output = 0; |
|
$excel_sheet->write($notes_row,$cols_output++, |
|
$chosen_output->{'non_html_notes'}, |
|
$format->{'i'}); |
|
|
############################################## |
############################################## |
# Output headings for the raw data |
# Output headings for the raw data |
############################################## |
############################################## |
Line 1193 sub excel_initialize {
|
Line 1204 sub excel_initialize {
|
# |
# |
if ($chosen_output->{'sequence_sum'} && |
if ($chosen_output->{'sequence_sum'} && |
$chosen_output->{'every_problem'}) { |
$chosen_output->{'every_problem'}) { |
my %replaceCells; |
my %replaceCells= |
$replaceCells{$seq->{'Excel:startcell'}} = |
('^'.$seq->{'Excel:startcell'}.':'. |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
$seq->{'Excel:endcell'}.'$' => |
($maximum_data_row,$seq->{'Excel:startcol'}); |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$seq->{'Excel:startcol'}).':'. |
$replaceCells{$seq->{'Excel:endcell'}} = |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$seq->{'Excel:endcol'})); |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
|
($maximum_data_row,$seq->{'Excel:endcol'}); |
|
$excel_sheet->repeat_formula($maximum_data_row,$cols_output++, |
$excel_sheet->repeat_formula($maximum_data_row,$cols_output++, |
$seq->{'Excel:sum'},undef, |
$seq->{'Excel:sum'},undef, |
%replaceCells); |
%replaceCells); |
|
|
} elsif ($chosen_output->{'sequence_sum'}) { |
} elsif ($chosen_output->{'sequence_sum'}) { |
$excel_sheet->write($maximum_data_row,$cols_output++,$max); |
$excel_sheet->write($maximum_data_row,$cols_output++,$max); |
} |
} |
Line 1291 sub excel_initialize {
|
Line 1301 sub excel_initialize {
|
# Initialize progress window |
# Initialize progress window |
%prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
%prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
($r,'Excel File Compilation Status', |
($r,'Excel File Compilation Status', |
'Excel File Compilation Progress', $studentcount); |
'Excel File Compilation Progress', $studentcount, |
|
'inline',undef,'Statistics','stats_status'); |
# |
# |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state, |
&Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state, |
'Processing first student'); |
'Processing first student'); |
Line 1371 sub excel_outputstudent {
|
Line 1382 sub excel_outputstudent {
|
if ($chosen_output->{'sequence_sum'} && |
if ($chosen_output->{'sequence_sum'} && |
$chosen_output->{'every_problem'}) { |
$chosen_output->{'every_problem'}) { |
# Write a formula for the sum of this sequence |
# Write a formula for the sum of this sequence |
my %replaceCells; |
my %replaceCells= |
$replaceCells{$seq->{'Excel:startcell'}} = |
('^'.$seq->{'Excel:startcell'}.':'.$seq->{'Excel:endcell'}.'$' |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
=> |
($rows_output,$seq->{'Excel:startcol'}); |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($rows_output,$seq->{'Excel:startcol'}).':'. |
$replaceCells{$seq->{'Excel:endcell'}} = |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($rows_output,$seq->{'Excel:endcol'}) |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
); |
($rows_output,$seq->{'Excel:endcol'}); |
# The undef is for the format |
# The undef is for the format |
$excel_sheet->repeat_formula($rows_output,$cols_output++, |
if (scalar(keys(%replaceCells)) == 1) { |
$seq->{'Excel:sum'},undef, |
$excel_sheet->repeat_formula($rows_output,$cols_output++, |
%replaceCells); |
$seq->{'Excel:sum'},undef, |
|
%replaceCells,%replaceCells); |
|
} else { |
|
$excel_sheet->repeat_formula($rows_output,$cols_output++, |
|
$seq->{'Excel:sum'},undef, |
|
%replaceCells); |
|
} |
|
} elsif ($chosen_output->{'sequence_sum'}) { |
} elsif ($chosen_output->{'sequence_sum'}) { |
if ($score eq ' ') { |
if ($score eq ' ') { |
$cols_output++; |
$cols_output++; |
Line 1492 END
|
Line 1496 END
|
my $studentcount = scalar(@Apache::lonstatistics::Students); |
my $studentcount = scalar(@Apache::lonstatistics::Students); |
%prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
%prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
($r,'CSV File Compilation Status', |
($r,'CSV File Compilation Status', |
'CSV File Compilation Progress', $studentcount); |
'CSV File Compilation Progress', $studentcount, |
|
'inline',undef,'Statistics','stats_status'); |
# |
# |
# Open a file |
# Open a file |
$filename = '/prtspool/'. |
$filename = '/prtspool/'. |
Line 1511 END
|
Line 1516 END
|
print $outputfile '"'.&Apache::loncommon::csv_translate($description).'",'. |
print $outputfile '"'.&Apache::loncommon::csv_translate($description).'",'. |
'"'.&Apache::loncommon::csv_translate(scalar(localtime(time))).'"'. |
'"'.&Apache::loncommon::csv_translate(scalar(localtime(time))).'"'. |
"\n"; |
"\n"; |
|
foreach my $item ('shortdesc','non_html_notes') { |
|
next if (! exists($chosen_output->{$item})); |
|
print $outputfile |
|
'"'.&Apache::loncommon::csv_translate($chosen_output->{$item}).'"'. |
|
"\n"; |
|
} |
# |
# |
# Print out the headings |
# Print out the headings |
my $sequence_row = ''; |
my $sequence_row = ''; |
Line 1768 sub StudentTriesOnSequence {
|
Line 1779 sub StudentTriesOnSequence {
|
} |
} |
} |
} |
# |
# |
if (! defined($tries) || $symbol eq '.') { |
if (! defined($tries)) { |
$tries = $symbol; |
$tries = 0; |
|
} |
|
if ($status =~ /^(incorrect|ungraded)/) { |
|
# Bug 3390: show '-' for tries on incorrect problems |
|
# (csv & excel only) |
|
push(@TriesData,-$tries); |
|
} else { |
|
push (@TriesData,$tries); |
} |
} |
push (@TriesData,$tries); |
|
# |
# |
if ( ($links eq 'yes' && $symbol ne ' ') || |
if ( ($links eq 'yes' && $symbol ne ' ') || |
($links eq 'all')) { |
($links eq 'all')) { |
Line 1876 sub StudentPerformanceOnSequence {
|
Line 1893 sub StudentPerformanceOnSequence {
|
$max -= $weight; # Do not count 'excused' problems. |
$max -= $weight; # Do not count 'excused' problems. |
} |
} |
$hasdata = 1; |
$hasdata = 1; |
} else { |
} elsif (!exists($resource_data->{'resource.'.$part.'.awarded'})){ |
# Unsolved. Did they try? |
# Unsolved. Did they try? |
if (exists($resource_data->{'resource.'.$part.'.tries'})){ |
if (exists($resource_data->{'resource.'.$part.'.tries'})){ |
$symbol = '.'; |
$symbol = '.'; |