version 1.121, 2012/03/15 20:53:18
|
version 1.122, 2012/05/03 11:21:33
|
Line 741 sub BuildProblemStatisticsPage {
|
Line 741 sub BuildProblemStatisticsPage {
|
return; |
return; |
} |
} |
if (exists($env{'form.Excel'})) { |
if (exists($env{'form.Excel'})) { |
$r->print('<h4>'. |
$r->print('<p>'. |
&Apache::lonstatistics::section_and_enrollment_description(). |
&Apache::lonstatistics::section_and_enrollment_description(). |
'</h4>'); |
'</p>'); |
&Excel_output($r); |
&Excel_output($r); |
} else { |
} else { |
$r->print('<input type="submit" name="Excel" value="'. |
$r->print('<input type="submit" name="Excel" value="'. |
&mt('Produce Excel Output').'" />'.' 'x5); |
&mt('Produce Excel Output').'" />'.' 'x5); |
$r->rflush(); |
$r->rflush(); |
$r->print('<h4>'. |
$r->print('<p>'. |
&Apache::lonstatistics::section_and_enrollment_description(). |
&Apache::lonstatistics::section_and_enrollment_description(). |
'</h4>'); |
'</p>'); |
my $count = 0; |
my $count = 0; |
foreach my $seq (@sequences) { |
foreach my $seq (@sequences) { |
my @resources = |
my @resources = |
Line 795 sub output_sequence_statistics {
|
Line 795 sub output_sequence_statistics {
|
$r->print('<h2>'.&mt('Sequence Statistics'). |
$r->print('<h2>'.&mt('Sequence Statistics'). |
&Apache::loncommon::help_open_topic('Statistics_Sequence'). |
&Apache::loncommon::help_open_topic('Statistics_Sequence'). |
'</h2>'); |
'</h2>'); |
$r->print('<table border="0"><tr><td bgcolor="#777777">'."\n". |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row()); |
'<table border="0" cellpadding="3">'."\n". |
|
'<tr bgcolor="#FFFFE6">'); |
|
$r->print(&sequence_html_header()); |
$r->print(&sequence_html_header()); |
|
$r->print(&Apache::loncommon::end_data_table_header_row()); |
foreach my $seq (@sequences) { |
foreach my $seq (@sequences) { |
last if ($c->aborted); |
last if ($c->aborted); |
&compute_sequence_statistics($seq); |
&compute_sequence_statistics($seq); |
$r->print(&sequence_html_output($seq)); |
$r->print(&sequence_html_output($seq)); |
} |
} |
$r->print('</table>'); |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print('</table>'); |
|
$r->rflush(); |
$r->rflush(); |
return; |
return; |
} |
} |
Line 821 sub output_sequence_statistics {
|
Line 819 sub output_sequence_statistics {
|
sub output_html_by_sequence { |
sub output_html_by_sequence { |
my ($r) = @_; |
my ($r) = @_; |
my $c = $r->connection(); |
my $c = $r->connection(); |
$r->print(&html_preamble()); |
$r->print('<br>'.&html_preamble()); |
# |
# |
foreach my $seq (@sequences) { |
foreach my $seq (@sequences) { |
last if ($c->aborted); |
last if ($c->aborted); |
$r->print("<h3>".$seq->compTitle."</h3>". |
$r->print("<h3>".$seq->compTitle."</h3>". |
'<table border="0"><tr><td bgcolor="#777777">'."\n". |
&Apache::loncommon::start_data_table(). |
'<table border="0" cellpadding="3">'."\n". |
&Apache::loncommon::start_data_table_header_row(). |
'<tr bgcolor="#FFFFE6">'. |
&statistics_table_header('no container'). |
&statistics_table_header('no container')."</tr>\n"); |
&Apache::loncommon::end_data_table_header_row()."\n"); |
my @Data = &compute_statistics_on_sequence($seq); |
my @Data = &compute_statistics_on_sequence($seq); |
foreach my $data (@Data) { |
foreach my $data (@Data) { |
$r->print('<tr>'.&statistics_html_table_data($data, |
$r->print(&Apache::loncommon::start_data_table_row(). |
'no container'). |
&statistics_html_table_data($data,'no container'). |
"</tr>\n"); |
&Apache::loncommon::end_data_table_row()."\n"); |
} |
} |
$r->print('</table>'."\n".'</table>'."\n"); |
$r->print(&Apache::loncommon::end_data_table()."\n"); |
$r->rflush(); |
$r->rflush(); |
} |
} |
return; |
return; |
Line 851 sub output_html_stats {
|
Line 849 sub output_html_stats {
|
my $count=0; |
my $count=0; |
foreach my $data (@StatsArray) { |
foreach my $data (@StatsArray) { |
if ($count++ % 50 == 0) { |
if ($count++ % 50 == 0) { |
$r->print("</table>\n</table>\n"); |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print('<table border="0"><tr><td bgcolor="#777777">'."\n". |
$r->print(&Apache::loncommon::start_data_table(). |
'<table border="0" cellpadding="3">'."\n". |
&Apache::loncommon::start_data_table_row(). |
'<tr bgcolor="#FFFFE6">'. |
&statistics_table_header(). |
'<tr bgcolor="#FFFFE6">'. |
&Apache::loncommon::end_data_table_row()); |
&statistics_table_header(). |
} |
"</tr>\n"); |
$r->print(&Apache::loncommon::start_data_table_row(). |
} |
&statistics_html_table_data($data). |
$r->print('<tr>'.&statistics_html_table_data($data)."</tr>\n"); |
&Apache::loncommon::end_data_table_row()); |
} |
} |
$r->print("</table>\n</table>\n"); |
$r->print(&Apache::loncommon::end_data_table_row()); |
return; |
return; |
} |
} |
|
|
Line 878 sub html_preamble {
|
Line 876 sub html_preamble {
|
&Apache::lonlocal::locallocaltime($endtime) |
&Apache::lonlocal::locallocaltime($endtime) |
).'</h3>'; |
).'</h3>'; |
} |
} |
$Str .= "<h3>".&mt('Compiled on [_1]', |
$Str .= "<p>".&mt('Compiled on [_1]', |
&Apache::lonlocal::locallocaltime(time))."</h3>"; |
&Apache::lonlocal::locallocaltime(time))."</p>"; |
return $Str; |
return $Str; |
} |
} |
|
|
Line 897 sub statistics_html_table_data {
|
Line 895 sub statistics_html_table_data {
|
foreach my $field (@Fields) { |
foreach my $field (@Fields) { |
next if ($options =~ /no $field->{'name'}/); |
next if ($options =~ /no $field->{'name'}/); |
next if ($field->{'selected'} ne 'yes'); |
next if ($field->{'selected'} ne 'yes'); |
$row .= '<td bgcolor="'.$field->{'color'}.'"'; |
$row .= '<td style="background-color:'.$field->{'color'}.'"'; |
if (exists($field->{'align'})) { |
if (exists($field->{'align'})) { |
$row .= ' align="'.$field->{'align'}.'"'; |
$row .= ' align="'.$field->{'align'}.'"'; |
} |
} |