--- loncom/interface/lonhelper.pm 2003/10/09 16:27:26 1.57 +++ loncom/interface/lonhelper.pm 2004/03/08 17:31:37 1.65 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.57 2003/10/09 16:27:26 albertel Exp $ +# $Id: lonhelper.pm,v 1.65 2004/03/08 17:31:37 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -230,7 +230,7 @@ my $paramHash; # In the debugger, this means that breakpoints are ignored until you step into # a function and get out of what must be a "faked up scope" in the Apache-> # mod_perl connection. In this code, it was manifesting itself in the existence -# of two seperate file-scoped $helper variables, one set to the value of the +# of two separate file-scoped $helper variables, one set to the value of the # helper in the helper constructor, and one referenced by the handler on the # "$helper->process()" line. Using the debugger, one could actually # see the two different $helper variables, as hashes at completely @@ -1291,8 +1291,8 @@ sub postprocess { my $chosenValue = $ENV{'form.' . $self->{'variable'} . '.forminput'}; if (!defined($chosenValue) && !$self->{'allowempty'}) { - $self->{ERROR_MSG} = "You must choose one or more choices to" . - " continue."; + $self->{ERROR_MSG} = + &mt("You must choose one or more choices to continue."); return 0; } @@ -1595,25 +1595,28 @@ sub render { # Display Hours and Minutes if they are called for if ($self->{'hoursminutes'}) { + # This needs parameterization for times. + my $am = &mt('a.m.'); + my $pm = &mt('p.m.'); # Build hour $result .= " - - - + + +   +
BUTTONS } @@ -2163,14 +2170,14 @@ BUTTONS } } - my $name = $self->{'coursepersonnel'} ? 'Name' : 'Student Name'; + my $name = &mt($self->{'coursepersonnel'} ? 'Name' : 'Student Name'); my $type = 'radio'; if ($self->{'multichoice'}) { $type = 'checkbox'; } $result .= "\n"; $result .= "". - "" . + "" . "" . - "" . + "" . ""; my $checked = 0; @@ -2208,8 +2215,8 @@ sub postprocess { my $result = $ENV{'form.' . $self->{'variable'} . '.forminput'}; if (!$result) { - $self->{ERROR_MSG} = 'You must choose at least one student '. - 'to continue.'; + $self->{ERROR_MSG} = + &mt('You must choose at least one student to continue.'); return 0; } @@ -2275,6 +2282,7 @@ viewing the files. no strict; @ISA = ("Apache::lonhelper::element"); use strict; +use Apache::lonlocal; use Apache::lonpubdir; # for getTitleString @@ -2393,16 +2401,20 @@ sub render { } SCRIPT + my $selectAllFiles = &mt("Select All Files"); + my $unselectAllFiles = &mt("Unselect All Files"); $buttons = <   - - + + BUTTONS + my $selectAllPublished = &mt("Select All Published"); + my $unselectAllPublished= &mt("UnselectAllPublished"); if ($helper->{VARS}->{'construction'}) { $buttons .= < - + +
  BUTTONS } @@ -2893,7 +2905,7 @@ the old values taking effect. no strict; @ISA = ("Apache::lonhelper::element"); use strict; - +use Apache::lonlocal; BEGIN { &Apache::lonhelper::register('Apache::lonhelper::final', ('final', 'exitpage')); @@ -2978,7 +2990,8 @@ sub render { } if (!@results) { - $result .= '
  • No changes were made to current settings.
  • '; + $result .= '
  • ' . + &mt('No changes were made to current settings.') . '
  • '; } $result .= ''; @@ -2986,16 +2999,24 @@ sub render { if ($self->{'restartCourse'}) { my $targetURL = '/adm/menu'; + if ($ENV{'course.'.$ENV{'request.course.id'}.'.url'}=~/^uploaded/) { + $targetURL = '/adm/coursedocs'; + } else { + $targetURL = '/adm/navmaps'; + } if ($ENV{'course.'.$ENV{'request.course.id'}.'.clonedfrom'}) { $targetURL = '/adm/parmset?overview=1'; } + my $previous = HTML::Entities::encode(&mt("<- Previous"), '<>&"'); + my $next = HTML::Entities::encode(&mt("Next ->"), '<>&"'); $result .= "
    \n" . "
    \n" . - "" . + "" . "" . "\n" . "\n\n" . + "' value='1' />\n\n" . "
    "; } @@ -3098,7 +3119,7 @@ sub render { } my $result = "
    \n"; - $result .= '

    Confirm that this information is correct, then click "Finish Wizard" to complete setting the parameter.

    $nameSection" . &mt('Section') . "StatusRole" . &mt("Role") . "
    Username:Domain