[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 24 Jun 2008 16:44:23 -0000
bisitz Tue Jun 24 12:44:23 2008 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Localization: Added missing &mt() call
- Changed number of samples from 3 to 5 which helps to better differentiate between first name and last name of users from foreign countries
(It could be an option for a later version to allow the CC to choose how many samples should be shown)
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.661 loncom/interface/loncommon.pm:1.662
--- loncom/interface/loncommon.pm:1.661 Mon Jun 16 19:34:12 2008
+++ loncom/interface/loncommon.pm Tue Jun 24 12:44:22 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.661 2008/06/16 23:34:12 raeburn Exp $
+# $Id: loncommon.pm,v 1.662 2008/06/24 16:44:22 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7491,7 +7491,7 @@
######################################################
sub csv_print_samples {
my ($r,$records) = @_;
- my $samples = &get_samples($records,3);
+ my $samples = &get_samples($records,5);
$r->print(&mt('Samples').'<br />'.&start_data_table().
&start_data_table_header_row());
@@ -7546,7 +7546,7 @@
foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) {
$r->print('<option value="'.$sample.'"'.
($sample eq $defaultcol ? ' selected="selected" ' : '').
- '>Column '.($sample+1).'</option>');
+ '>'.&mt('Column [_1]',($sample+1)).'</option>');
}
$r->print('</select></td>'.&end_data_table_row()."\n");
$i++;
@@ -7577,7 +7577,8 @@
my ($r,$records,$d) = @_;
my $i=0;
#
- my $samples = &get_samples($records,3);
+ my $max_samples = 5;
+ my $samples = &get_samples($records,$max_samples);
$r->print(&start_data_table().
&start_data_table_header_row().'<th>'.
&mt('Field').'</th><th>'.&mt('Samples').'</th>'.
@@ -7593,7 +7594,7 @@
$display.'</option>');
}
$r->print('</select></td><td>');
- foreach my $line (0..2) {
+ foreach my $line (0..($max_samples-1)) {
if (defined($samples->[$line]{$key})) {
$r->print($samples->[$line]{$key}."<br />\n");
}