version 1.141, 2008/09/16 15:40:15
|
version 1.143, 2008/11/10 13:20:14
|
Line 38 lonstatistics
|
Line 38 lonstatistics
|
|
|
Main handler for statistics and chart. |
Main handler for statistics and chart. |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
=over 4 |
=over 4 |
|
|
=cut |
=cut |
Line 462 sub section_and_enrollment_description {
|
Line 465 sub section_and_enrollment_description {
|
$description = §ion_or_group_text($mode,'section',@sections). |
$description = §ion_or_group_text($mode,'section',@sections). |
' '.§ion_or_group_text($mode,'group',@groups); |
' '.§ion_or_group_text($mode,'group',@groups); |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$description .= &mt(' [_1] access status.',$env{'form.Status'}); |
$description .= ' '.&mt($env{'form.Status'}.' access status.'); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$description .= ' '.$env{'form.Status'}.' access status.'; |
$description .= ' '.$env{'form.Status'}.' access status.'; |
} |
} |
Line 488 sub section_or_group_text {
|
Line 491 sub section_or_group_text {
|
); |
); |
if (scalar(@items) == 1 && $items[0] ne 'all') { |
if (scalar(@items) == 1 && $items[0] ne 'all') { |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$text = &mt('[_1] [_2].',$phrases{$type}{single},$items[0]); |
$text = &mt($phrases{$type}{single}.' [_1].',$items[0]); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$text = $phrases{$type}{single}.' '.$items[0].'.'; |
$text = $phrases{$type}{single}.' '.$items[0].'.'; |
|
|
} |
} |
} elsif (scalar(@items) && $items[0] eq 'all') { |
} elsif (scalar(@items) && $items[0] eq 'all') { |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$text = &mt('[_1].',$phrases{$type}{all}); |
$text = &mt($phrases{$type}{all}.'.'); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$text = $phrases{$type}{all}.'.'; |
$text = $phrases{$type}{all}.'.'; |
} |
} |
} elsif (scalar(@items)) { |
} elsif (scalar(@items)) { |
my $lastitem = pop(@items); |
my $lastitem = pop(@items); |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$text = &mt('[_1] [_2] and [_3].',$phrases{$type}{plural}, |
$text = &mt($phrases{$type}{plural}.' [_1] and [_2].', |
join(', ',@items),$lastitem); |
join(', ',@items),$lastitem); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$text = $phrases{$type}{plural}.' '.join(', ',@items).' and '. |
$text = $phrases{$type}{plural}.' '.join(', ',@items).' and '. |