'.&mt("Unable to create new Excel file. ".
+ "This error has been logged. ".
+ "Please alert your LON-CAPA administrator").
+ '
');
+ return undef;
+ }
+ #
+ $workbook->set_tempdir('/home/httpd/perl/tmp');
+ #
+ # Define some potentially useful formats
+ my $format;
+ $format->{'header'} = $workbook->add_format(bold => 1,
+ bottom => 1,
+ align => 'center');
+ $format->{'bold'} = $workbook->add_format(bold=>1);
+ $format->{'h1'} = $workbook->add_format(bold=>1, size=>18);
+ $format->{'h2'} = $workbook->add_format(bold=>1, size=>16);
+ $format->{'h3'} = $workbook->add_format(bold=>1, size=>14);
+ $format->{'date'} = $workbook->add_format(num_format=>
+ 'mmm d yyyy hh:mm AM/PM');
+ #
+ # Create and populate main worksheets
+ my $problem_data_sheet = $workbook->addworksheet('Problem Data');
+ my $student_data_sheet = $workbook->addworksheet('Student Data');
+ my $response_data_sheet = $workbook->addworksheet('Response Data');
+ foreach my $sheet ($problem_data_sheet,$student_data_sheet,
+ $response_data_sheet) {
+ $sheet->write(0,0,$resource->{'title'},$format->{'h2'});
+ $sheet->write(1,0,$resource->{'src'},$format->{'h3'});
+ }
+ #
+ my $result;
+ $result = &build_problem_data_worksheet($problem_data_sheet,$format,
+ $Concepts,$ORdata);
+ if ($result ne 'okay') {
+ # Do something useful
+ }
+ $result = &build_student_data_worksheet($student_data_sheet,$format);
+ if ($result ne 'okay') {
+ # Do something useful
}
- return ''."\n";
$Str .= '';
$Str .= ''.&mt('Sections').' | ';
$Str .= ''.&mt('Enrollment Status').' | ';
- $Str .= ''.&mt('Sequences and Folders').' | ';
+# $Str .= ''.&mt('Sequences and Folders').' | ';
+ $Str .= ' | ';
$Str .= '
'."\n";
- #
+ ##
+ ##
$Str .= ''."\n";
$Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
- $Str .= ' | ';
+ $Str .= ' | ';
+ #
+ $Str .= '';
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
- $Str .= ' | ';
+ $Str .= ' | ';
+ #
+# $Str .= '';
my $only_seq_with_assessments = sub {
my $s=shift;
if ($s->{'num_assess'} < 1) {
@@ -290,17 +1172,64 @@ sub CreateInterface {
return 1;
}
};
- $Str .= &Apache::lonstatistics::MapSelect('Maps','multiple,all',5,
+ &Apache::lonstatistics::MapSelect('Maps','multiple,all',5,
$only_seq_with_assessments);
- $Str .= ' |
'."\n";
+ ##
+ ##
+ $Str .= '';
+ { # These braces are here to organize the code, not scope it.
+ {
+ $Str .= ''.&mt('Analyze Over ');
+ $Str .=' ';
+ }
+ {
+ $Str .= ''.&mt('Analyze as ');
+ $Str .=' ';
+ }
+ {
+ $Str .= ' '.&mt('Number of Plots:');
+ $Str .= '';
+ }
+ }
+ $Str .= ' | ';
+ ##
+ ##
+ $Str .= ''."\n";
$Str .= '
'."\n";
- $Str .= '