--- loncom/interface/lonpreferences.pm 2011/10/10 22:38:20 1.186.2.8 +++ loncom/interface/lonpreferences.pm 2011/05/16 00:55:53 1.192 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.186.2.8 2011/10/10 22:38:20 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.192 2011/05/16 00:55:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -620,7 +620,7 @@ sub iconchanger { my ($inlinetools,$toolsorder) = &icon_previews(); if ((ref($inlinetools) eq 'HASH') && (ref($toolsorder) eq 'ARRAY')) { foreach my $tool (@{$toolsorder}) { - my ($command,$row,$col,$img,$top,$bot,$act,$desc) = + my ($command,$row,$col,$img,$top,$bot,$act,$desc) = split(/\&/,$inlinetools->{$tool}); $iconic_preview .= '
  • '.$desc.''.$top.(' ' x 2).'
  • '; $iconsonly_preview .= '
  • '.$desc.' 
  • '; @@ -633,7 +633,7 @@ sub iconchanger { $iconic_preview = ''; + ''; $r->print(< @@ -663,17 +663,16 @@ sub verify_and_change_icons { } sub icon_options { - my %lt = &Apache::lonlocal::texthash( - iconic => 'Use icons and text', - iconsonly => 'Use icons only', - ); - return %lt; + return &Apache::lonlocal::texthash( + iconic => 'Use icons and text', + iconsonly => 'Use icons only', + ); } sub icon_previews { my %icon_text = ( annotate => 'Notes', - bookmark => 'Bookmark', + wishlist => 'Wishlist', catalog => 'Info', evaluate => 'Evaluate', feedback => 'Communicate', @@ -681,13 +680,13 @@ sub icon_previews { ); my %inlinetools = ( printout => "s&8&3&prt.png&$icon_text{'printout'}&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document", - bookmark => "s&9&1&sbkm.png&$icon_text{'bookmark'}&bookmark[_2]&set_bookmark()&Set a bookmark for this resource", + wishlist => "s&9&1&wishlist-link.png&$icon_text{'wishlist'}&wishlistlink[_2]&set_wishlistlink()&Set a link for this resource to wishlist", evaluate => "s&8&1&eval.png&$icon_text{'evaluate'}&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource", feedback => "s&8&2&fdbk.png&$icon_text{'feedback'}&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource", annotate => "s&9&3&anot.png&$icon_text{'annotate'}&tations[_1]&annotate()&Make notes and annotations about this resource", catalog => "s&6&3&catalog.png&$icon_text{'catalog'}&info[_1]&catalog_info()&Show Metadata", ); - my @toolsorder = qw(annotate bookmark evaluate feedback printout catalog); + my @toolsorder = qw(annotate wishlist evaluate feedback printout catalog); return (\%inlinetools,\@toolsorder); } @@ -1288,7 +1287,7 @@ sub passwordchanger { # This function is a bit of a mess.... # Passwords are encrypted using londes.js (DES encryption) $errormessage = ($errormessage || ''); - my ($user,$domain,$currentpass); + my ($user,$domain,$currentpass,$defdom); &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/preferences?action=changepass', text => 'Change Password'}); @@ -1303,6 +1302,7 @@ sub passwordchanger { $caller = 'preferences'; } } elsif ($caller eq 'reset_by_email') { + $defdom = $r->dir_config('lonDefDomain'); my %data = &Apache::lonnet::tmpget($mailtoken); if (keys(%data) == 0) { $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.' @@ -1323,9 +1323,6 @@ sub passwordchanger { $r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'
    '); return; } - if (&Apache::lonnet::domain($domain) eq '') { - $domain = $r->dir_config('lonDefDomain'); - } } else { $r->print(&mt('Page requested in unexpected context').'
    '); return; @@ -1370,7 +1367,7 @@ $errormessage crappy browser --> ENDFORM $r->print(&server_form($logtoken,$caller,$mailtoken)); - $r->print(&client_form($caller,\%hexkey,$currentpass,$domain)); + $r->print(&client_form($caller,\%hexkey,$currentpass,$defdom)); # return; @@ -1704,13 +1701,13 @@ sub discussionchanger { 'sdpf' => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.', 'prca' => 'Preferences can be set that determine', 'whpo' => 'Which posts are displayed when you display a discussion board or resource, and', - 'unwh' => 'Under what circumstances posts are identified as "NEW"', + 'unwh' => 'Under what circumstances posts are identfied as "New"', 'allposts' => 'All posts', 'unread' => 'New posts only', 'ondisp' => 'Once displayed', - 'onmark' => 'Once marked not NEW', + 'onmark' => 'Once marked as read', 'disa' => 'Posts displayed?', - 'npmr' => 'New posts cease to be identified as "NEW"?', + 'npmr' => 'New posts cease to be identified as "New"?', 'thde' => 'The preferences you set here can be overridden within each individual discussion.', 'chgt' => 'Change to ' ); @@ -1795,7 +1792,7 @@ sub verify_and_change_discussion { &Apache::lonnet::put('environment',{'discmarkread' => $newmark}); &Apache::lonnet::appenv({'environment.discmarkread' => $newmark}); } else { - $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as not "NEW".')).'
    '; + $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).'
    '; &Apache::lonnet::del('environment',['discmarkread']); &Apache::lonnet::delenv('environment.discmarkread'); } @@ -2097,26 +2094,6 @@ push(@{ $menu[0]->{items} }, { linktitle => 'Change your password.', }); } - if ($env{'environment.remote'} eq 'off') { -push(@{ $menu[1]->{items} }, { - linktext => 'Launch Remote Control', - url => '/adm/remote?url=/adm/preferences&action=launch', - permission => 'F', - #help => '', - icon => 'remotecontrol.png', - linktitle => 'Launch the remote control for LON-CAPA.', - }); - }else{ -push(@{ $menu[1]->{items} }, { - linktext => 'Collapse Remote Control', - url => '/adm/remote?url=/adm/preferences&action=collapse', - permission => 'F', - #help => '', - icon => 'remotecontrol.png', - linktitle => 'Collapse the remote control for LON-CAPA.', - }); - } - if (&can_toggle_namelocking()) { push(@{ $menu[0]->{items} }, {