--- loncom/interface/lonpreferences.pm 2003/11/07 23:22:21 1.32 +++ loncom/interface/lonpreferences.pm 2004/03/08 17:31:37 1.36 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.32 2003/11/07 23:22:21 www Exp $ +# $Id: lonpreferences.pm,v 1.36 2004/03/08 17:31:37 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -63,7 +63,7 @@ use Apache::lonlocal; ################################################## sub des_keys { # Make a new key for DES encryption. - # Each key has two parts which are returned seperately. + # Each key has two parts which are returned separately. # Please note: Each key must be passed through the &hex function # before it is output to the web browser. The hex versions cannot # be used to decrypt. @@ -112,18 +112,22 @@ sub languagechanger { ('environment',['languages']); my $language=$userenv{'languages'}; - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Language Preferences'); + my $pref=&mt('Preferred language'); + my %langchoices=('' => 'No language preference'); + foreach (&Apache::loncommon::languageids()) { + if (&Apache::loncommon::supportedlanguagecode($_)) { + $langchoices{&Apache::loncommon::supportedlanguagecode($_)} + = &Apache::loncommon::plainlanguagedescription($_); + } + } + my $selectionbox=&Apache::loncommon::select_form($language,'language', + %langchoices); $r->print(< -$bodytag -
-
Preferred language: - +
$pref: $selectionbox ENDLSCREEN - $r->print('
'); + $r->print('
'); } @@ -144,14 +148,9 @@ sub verify_and_change_languages { &Apache::lonnet::delenv('environment\.languages'); $message='Reset preferred language'; } - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Language Preferences'); $r->print(< -$bodytag

$message - ENDVCSCREEN } @@ -167,12 +166,7 @@ sub screennamechanger { ('environment',['screenname','nickname']); my $screenname=$userenv{'screenname'}; my $nickname=$userenv{'nickname'}; - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Nickname and Anonymous Screen Name'); $r->print(< -$bodytag -

New screenname (shown if you post anonymously): @@ -181,8 +175,6 @@ $bodytag
- - ENDSCREEN } @@ -217,14 +209,9 @@ sub verify_and_change_screenname { $message.='Reset nickname'; } - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Nickname and Anonymous Screen Name'); $r->print(< -$bodytag

$message - ENDVCSCREEN } @@ -240,8 +227,6 @@ sub msgforwardchanger { my $msgforward=$userenv{'msgforward'}; my $notification=$userenv{'notification'}; my $critnotification=$userenv{'critnotification'}; - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Message Forwarding and Notification'); my $forwardingHelp = Apache::loncommon::help_open_topic("Prefs_Forwarding", "What are forwarding ". "and notification ". @@ -250,8 +235,6 @@ sub msgforwardchanger { "What are critical messages"); $r->print(< -$bodytag $forwardingHelp
@@ -263,8 +246,6 @@ New Critical Message Notification Email $criticalMessageHelp
- - ENDMSG } @@ -318,14 +299,9 @@ sub verify_and_change_msgforward { &Apache::lonnet::delenv('environment\.critnotification'); $message.='Reset critical message notification
'; } - my $bodytag=&Apache::loncommon::bodytag( - 'Change Your Message Forwarding and Notifications'); $r->print(< -$bodytag

$message - ENDVCMSG } @@ -335,9 +311,6 @@ ENDVCMSG sub colorschanger { my $r = shift; - my $bodytag=&Apache::loncommon::bodytag( - 'Change Color Scheme for Current Role Type','', - 'onUnload="pclose();"'); # figure out colors my $function='student'; if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) { @@ -370,7 +343,6 @@ sub colorschanger { } my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); $r->print(< -$bodytag
@@ -411,8 +382,6 @@ $chtable
- - ENDCOL } @@ -453,18 +422,12 @@ sub verify_and_change_colors { $message.='Reset '.$colortypes{$item}.'
'; } } - my $bodytag=&Apache::loncommon::bodytag( - 'Change Color Scheme for Current Role Type'); $r->print(< -$bodytag

$message
-
- ENDVCCOL } @@ -510,12 +473,7 @@ sub passwordchanger { my $jsh=Apache::File->new($include."/londes.js"); $r->print(<$jsh>); } - my $bodytag=&Apache::loncommon::bodytag('Change Password','', - 'onLoad="init();"'); $r->print(< -$bodytag -