[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm lonprintout.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 08 Sep 2007 23:41:51 -0000


albertel		Sat Sep  8 19:41:51 2007 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm lonprintout.pm 
  Log:
  - for those using the perl mechanism of building the CHOICES array by hand,
    they need to take care of &mt() the label, use of the xml mechanism
    will auto mt for the user  (Which will result in not trying to translate
    problem titles)
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.163 loncom/interface/lonhelper.pm:1.164
--- loncom/interface/lonhelper.pm:1.163	Fri Aug 31 20:41:42 2007
+++ loncom/interface/lonhelper.pm	Sat Sep  8 19:41:49 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.163 2007/09/01 00:41:42 albertel Exp $
+# $Id: lonhelper.pm,v 1.164 2007/09/08 23:41:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1488,7 +1488,7 @@
             $choiceLabel = &$choiceLabel($helper, $self);
         }
         $result .= "/></td><td> ".qq{<label for="id$id">}.
-            &mtn($choiceLabel). "</label></td>";
+	    $choiceLabel. "</label></td>";
 	if ($choice->[4]) {
 	    $result .='<td><input type="text" size="5" name="'
 		.$choice->[4].'_forminput" value="'
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.508 loncom/interface/lonprintout.pm:1.509
--- loncom/interface/lonprintout.pm:1.508	Tue Sep  4 20:56:55 2007
+++ loncom/interface/lonprintout.pm	Sat Sep  8 19:41:49 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.508 2007/09/05 00:56:55 albertel Exp $
+# $Id: lonprintout.pm,v 1.509 2007/09/08 23:41:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2470,8 +2470,8 @@
     if ($perm{'pfo'} &&  !$is_published  &&
         ($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) { 
 
-        push @{$printChoices}, ['Selected <b>Problems</b> from <b>entire course</b>', 'all_problems', 'ALL_PROBLEMS'];
-	push @{$printChoices}, ['Selected <b>Resources</b> from <b>entire course</b>', 'all_resources', 'ALL_RESOURCES'];
+        push @{$printChoices}, [&mtn('Selected <b>Problems</b> from <b>entire course</b>'), 'all_problems', 'ALL_PROBLEMS'];
+	push @{$printChoices}, [&mtn('Selected <b>Resources</b> from <b>entire course</b>'), 'all_resources', 'ALL_RESOURCES'];
          &Apache::lonxml::xmlparse($r, 'helper', <<ALL_PROBLEMS);
   <state name="ALL_PROBLEMS" title="Select Problem(s) to print">
     <resource variable="RESOURCES" toponly='0' multichoice="1"
@@ -2823,7 +2823,7 @@
     # Allow the user to select any sequence in the course, feed it to
     # another resource selector for that sequence
     if (!$helper->{VARS}->{'construction'} && !$is_published) {
-	push @$printChoices, ["Selected <b>Resources</b> from <b>selected folder</b> in course",
+	push @$printChoices, [&mtn("Selected <b>Resources</b> from <b>selected folder</b> in course"),
 			      'select_sequences', 'CHOOSE_SEQUENCE'];
 	my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
 	#Escape apostrophes and backslashes for Perl