version 1.43, 2003/10/20 20:42:39
|
version 1.44, 2003/10/21 16:00:30
|
Line 91 sub BuildProblemAnalysisPage {
|
Line 91 sub BuildProblemAnalysisPage {
|
# |
# |
my $resource = &get_resource_from_symb($symb); |
my $resource = &get_resource_from_symb($symb); |
if (defined($resource)) { |
if (defined($resource)) { |
|
$r->print('<h1>'.$resource->{'title'}.'</h1>'); |
$r->print('<h3>'.$resource->{'src'}.'</h3>'); |
$r->print('<h3>'.$resource->{'src'}.'</h3>'); |
|
$r->rflush(); |
my %Data = &get_problem_data($resource->{'src'}); |
my %Data = &get_problem_data($resource->{'src'}); |
my $PerformanceData = |
my $PerformanceData = |
&Apache::loncoursedata::get_optionresponse_data |
&Apache::loncoursedata::get_optionresponse_data |
Line 118 sub BuildProblemAnalysisPage {
|
Line 120 sub BuildProblemAnalysisPage {
|
$rendered_problem. |
$rendered_problem. |
'</td></tr></table>'); |
'</td></tr></table>'); |
$r->rflush(); |
$r->rflush(); |
## |
if (! exists($ENV{'form.ExcelOutput'})) { |
## Analyze the problem |
## |
if (defined($PerformanceData) && |
## Analyze the problem |
ref($PerformanceData) eq 'ARRAY') { |
if (defined($PerformanceData) && |
if ($ENV{'form.AnalyzeOver'} eq 'Tries') { |
ref($PerformanceData) eq 'ARRAY') { |
my $analysis_html = &tries_analysis($r,$PerformanceData, |
if ($ENV{'form.AnalyzeOver'} eq 'Tries') { |
$ORdata); |
my $analysis_html = &tries_analysis($r, |
$r->print($analysis_html); |
$PerformanceData, |
$r->rflush(); |
$ORdata); |
} elsif ($ENV{'form.AnalyzeOver'} eq 'Time') { |
$r->print($analysis_html); |
my $analysis_html = &time_analysis($PerformanceData, |
$r->rflush(); |
$ORdata); |
} elsif ($ENV{'form.AnalyzeOver'} eq 'Time') { |
$r->print($analysis_html); |
my $analysis_html = &time_analysis($PerformanceData, |
$r->rflush(); |
$ORdata); |
|
$r->print($analysis_html); |
|
$r->rflush(); |
|
} else { |
|
$r->print('<h2>'. |
|
&mt('The analysis you have selected is '. |
|
'not supported at this time'). |
|
'</h2>'); |
|
} |
} else { |
} else { |
$r->print('<h2>'. |
$r->print('<h2>'. |
&mt('The analysis you have selected is '. |
&mt('There is no student data for this problem.'). |
'not supported at this time'). |
|
'</h2>'); |
'</h2>'); |
} |
} |
} else { |
|
$r->print('<h2>'. |
|
&mt('There is no student data for this problem.'). |
|
'</h2>'); |
|
} |
} |
} else { |
} else { |
$r->print('resource is undefined'); |
$r->print('resource is undefined'); |
Line 735 sub Concept_Time_Analysis {
|
Line 740 sub Concept_Time_Analysis {
|
## |
## |
######################################################### |
######################################################### |
######################################################### |
######################################################### |
|
|
sub prepare_excel_sheet { |
sub prepare_excel_sheet { |
my ($r,$resource,$PerformanceData,$ORdata) = @_; |
my ($r,$resource,$PerformanceData,$ORdata) = @_; |
my $response = '<h2>'.&mt('Excel Spreadsheet Creation').'</h2>'; |
my $response = ''; |
my (undef,$Foils,$Concepts) = &build_foil_index($ORdata); |
my (undef,$Foils,$Concepts) = &build_foil_index($ORdata); |
# |
# |
# Create excel worksheet |
# Create excel worksheet |
Line 761 sub prepare_excel_sheet {
|
Line 765 sub prepare_excel_sheet {
|
my $format; |
my $format; |
$format->{'header'} = $workbook->add_format(bold => 1, |
$format->{'header'} = $workbook->add_format(bold => 1, |
bottom => 1, |
bottom => 1, |
# text_wrap => 1, |
|
align => 'center'); |
align => 'center'); |
$format->{'bold'} = $workbook->add_format(bold=>1); |
$format->{'bold'} = $workbook->add_format(bold=>1); |
$format->{'h1'} = $workbook->add_format(bold=>1, size=>18); |
$format->{'h1'} = $workbook->add_format(bold=>1, size=>18); |
Line 796 sub prepare_excel_sheet {
|
Line 799 sub prepare_excel_sheet {
|
if ($result ne 'okay') { |
if ($result ne 'okay') { |
# Do something useful |
# Do something useful |
} |
} |
$response_data_sheet->activate(); |
$response_data_sheet->activate(); |
# |
# |
# Close the excel file |
# Close the excel file |
$workbook->close(); |
$workbook->close(); |
# |
# |
# Write a link to allow them to download it |
# Write a link to allow them to download it |
$result .= '<br />'. |
$result .= '<h2>'.&mt('Excel Raw Data Output').'</h2>'. |
'<a href="'.$filename.'">Your Excel spreadsheet.</a>'."\n"; |
'<p><a href="'.$filename.'">'. |
|
&mt('Your Excel spreadsheet.'). |
|
'</a></p>'."\n"; |
return $result; |
return $result; |
} |
} |
|
|