version 1.186.2.8.2.2, 2012/02/17 03:32:34
|
version 1.192, 2011/05/16 00:55:53
|
Line 620 sub iconchanger {
|
Line 620 sub iconchanger {
|
my ($inlinetools,$toolsorder) = &icon_previews(); |
my ($inlinetools,$toolsorder) = &icon_previews(); |
if ((ref($inlinetools) eq 'HASH') && (ref($toolsorder) eq 'ARRAY')) { |
if ((ref($inlinetools) eq 'HASH') && (ref($toolsorder) eq 'ARRAY')) { |
foreach my $tool (@{$toolsorder}) { |
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}); |
split(/\&/,$inlinetools->{$tool}); |
$iconic_preview .= '<li><a title="'.$desc.'" class="LC_menubuttons_link" href=""><img alt="'.$desc.'" src="/res/adm/pages/'.$img.'" class="LC_icon" /><span class="LC_menubuttons_inline_text">'.$top.(' ' x 2).'</span></a></li>'; |
$iconic_preview .= '<li><a title="'.$desc.'" class="LC_menubuttons_link" href=""><img alt="'.$desc.'" src="/res/adm/pages/'.$img.'" class="LC_icon" /><span class="LC_menubuttons_inline_text">'.$top.(' ' x 2).'</span></a></li>'; |
$iconsonly_preview .= '<li><a title="'.$desc.'" class="LC_menubuttons_link" href=""><img alt="'.$desc.'" src="/res/adm/pages/'.$img.'" class="LC_icon" /> </a></li>'; |
$iconsonly_preview .= '<li><a title="'.$desc.'" class="LC_menubuttons_link" href=""><img alt="'.$desc.'" src="/res/adm/pages/'.$img.'" class="LC_icon" /> </a></li>'; |
Line 633 sub iconchanger {
|
Line 633 sub iconchanger {
|
$iconic_preview = '<ul class="LC_breadcrumb_tools_outerlist"><li>'. |
$iconic_preview = '<ul class="LC_breadcrumb_tools_outerlist"><li>'. |
'<ul>'. |
'<ul>'. |
$iconic_preview. |
$iconic_preview. |
'</ul></li></ul>'; |
'</ul></li></ul>'; |
$r->print(<<ENDSCREEN); |
$r->print(<<ENDSCREEN); |
$classic |
$classic |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
Line 663 sub verify_and_change_icons {
|
Line 663 sub verify_and_change_icons {
|
} |
} |
|
|
sub icon_options { |
sub icon_options { |
my %lt = &Apache::lonlocal::texthash( |
return &Apache::lonlocal::texthash( |
iconic => 'Use icons and text', |
iconic => 'Use icons and text', |
iconsonly => 'Use icons only', |
iconsonly => 'Use icons only', |
); |
); |
return %lt; |
|
} |
} |
|
|
sub icon_previews { |
sub icon_previews { |
my %icon_text = ( |
my %icon_text = ( |
annotate => 'Notes', |
annotate => 'Notes', |
bookmark => 'Bookmark', |
wishlist => 'Wishlist', |
catalog => 'Info', |
catalog => 'Info', |
evaluate => 'Evaluate', |
evaluate => 'Evaluate', |
feedback => 'Communicate', |
feedback => 'Communicate', |
Line 681 sub icon_previews {
|
Line 680 sub icon_previews {
|
); |
); |
my %inlinetools = ( |
my %inlinetools = ( |
printout => "s&8&3&prt.png&$icon_text{'printout'}&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document", |
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", |
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", |
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", |
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", |
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); |
return (\%inlinetools,\@toolsorder); |
} |
} |
|
|
Line 1288 sub passwordchanger {
|
Line 1287 sub passwordchanger {
|
# This function is a bit of a mess.... |
# This function is a bit of a mess.... |
# Passwords are encrypted using londes.js (DES encryption) |
# Passwords are encrypted using londes.js (DES encryption) |
$errormessage = ($errormessage || ''); |
$errormessage = ($errormessage || ''); |
my ($user,$domain,$currentpass); |
my ($user,$domain,$currentpass,$defdom); |
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changepass', |
{ href => '/adm/preferences?action=changepass', |
text => 'Change Password'}); |
text => 'Change Password'}); |
Line 1303 sub passwordchanger {
|
Line 1302 sub passwordchanger {
|
$caller = 'preferences'; |
$caller = 'preferences'; |
} |
} |
} elsif ($caller eq 'reset_by_email') { |
} elsif ($caller eq 'reset_by_email') { |
|
$defdom = $r->dir_config('lonDefDomain'); |
my %data = &Apache::lonnet::tmpget($mailtoken); |
my %data = &Apache::lonnet::tmpget($mailtoken); |
if (keys(%data) == 0) { |
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.' |
$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.' |
Line 1323 sub passwordchanger {
|
Line 1323 sub passwordchanger {
|
$r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'<br />'); |
$r->print(&mt('Sorry, the URL generated when you requested reset of your password contained incomplete information.').'<br />'); |
return; |
return; |
} |
} |
if (&Apache::lonnet::domain($domain) eq '') { |
|
$domain = $r->dir_config('lonDefDomain'); |
|
} |
|
} else { |
} else { |
$r->print(&mt('Page requested in unexpected context').'<br />'); |
$r->print(&mt('Page requested in unexpected context').'<br />'); |
return; |
return; |
Line 1360 sub passwordchanger {
|
Line 1357 sub passwordchanger {
|
my $jsh=Apache::File->new($include."/londes.js"); |
my $jsh=Apache::File->new($include."/londes.js"); |
$r->print(<$jsh>); |
$r->print(<$jsh>); |
} |
} |
$r->print(&jscript_send($caller,$domain)); |
$r->print(&jscript_send($caller)); |
$r->print(<<ENDFORM); |
$r->print(<<ENDFORM); |
$errormessage |
$errormessage |
|
|
Line 1370 $errormessage
|
Line 1367 $errormessage
|
crappy browser --> |
crappy browser --> |
ENDFORM |
ENDFORM |
$r->print(&server_form($logtoken,$caller,$mailtoken)); |
$r->print(&server_form($logtoken,$caller,$mailtoken)); |
$r->print(&client_form($caller,\%hexkey,$currentpass,$domain)); |
$r->print(&client_form($caller,\%hexkey,$currentpass,$defdom)); |
|
|
# |
# |
return; |
return; |
} |
} |
|
|
sub jscript_send { |
sub jscript_send { |
my ($caller,$domain) = @_; |
my ($caller) = @_; |
my $output = qq| |
my $output = qq| |
<script type="text/javascript" language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
|
Line 1405 sub jscript_send {
|
Line 1402 sub jscript_send {
|
$output .= qq| |
$output .= qq| |
this.document.pserver.elements.uname.value = |
this.document.pserver.elements.uname.value = |
this.document.client.elements.uname.value; |
this.document.client.elements.uname.value; |
|; |
|
if ($domain eq 'relate') { |
|
$output .= qq| |
|
this.document.pserver.elements.udom.value = |
|
this.document.client.elements.udom.value; |
|
|; |
|
} else { |
|
$output .= qq| |
|
this.document.pserver.elements.udom.value = |
this.document.pserver.elements.udom.value = |
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value; |
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value; |
|; |
|
} |
|
$output .= qq| |
|
this.document.pserver.elements.email.value = |
this.document.pserver.elements.email.value = |
this.document.client.elements.email.value; |
this.document.client.elements.email.value; |
|; |
|; |
Line 1450 sub client_form {
|
Line 1436 sub client_form {
|
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title( |
.&Apache::lonhtmlcommon::row_title( |
'<label for="uname">'.$lt{'username'}.'</label>') |
'<label for="uname">'.$lt{'username'}.'</label>') |
.'<input type="text" name="uname" size="30" />' |
.'<input type="text" name="uname" size="15" />' |
.'<input type="hidden" name="currentpass" value="'.$currentpass.'" />'; |
.'<input type="hidden" name="currentpass" value="'.$currentpass.'" />' |
if ($defdom eq 'relate') { |
.&Apache::lonhtmlcommon::row_closure() |
$output .= '<input type="hidden" name="udom" value="'.$defdom.'" />' |
.&Apache::lonhtmlcommon::row_title( |
.&Apache::lonhtmlcommon::row_closure(); |
'<label for="udom">'.$lt{'domain'}.'</label>') |
} else { |
.&Apache::loncommon::select_dom_form($defdom,'udom') |
$output .= &Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure(); |
.&Apache::lonhtmlcommon::row_title( |
|
'<label for="udom">'.$lt{'domain'}.'</label>') |
|
.&Apache::loncommon::select_dom_form($defdom,'udom') |
|
.&Apache::lonhtmlcommon::row_closure(); |
|
} |
|
} else { |
} else { |
$output .= &Apache::lonhtmlcommon::row_title( |
$output .= &Apache::lonhtmlcommon::row_title( |
'<label for="currentpass">'.$lt{'currentpass'}.'</label>') |
'<label for="currentpass">'.$lt{'currentpass'}.'</label>') |
Line 1720 sub discussionchanger {
|
Line 1701 sub discussionchanger {
|
'sdpf' => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.', |
'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', |
'prca' => 'Preferences can be set that determine', |
'whpo' => 'Which posts are displayed when you display a discussion board or resource, and', |
'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', |
'allposts' => 'All posts', |
'unread' => 'New posts only', |
'unread' => 'New posts only', |
'ondisp' => 'Once displayed', |
'ondisp' => 'Once displayed', |
'onmark' => 'Once marked not NEW', |
'onmark' => 'Once marked as read', |
'disa' => 'Posts displayed?', |
'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.', |
'thde' => 'The preferences you set here can be overridden within each individual discussion.', |
'chgt' => 'Change to ' |
'chgt' => 'Change to ' |
); |
); |
Line 1811 sub verify_and_change_discussion {
|
Line 1792 sub verify_and_change_discussion {
|
&Apache::lonnet::put('environment',{'discmarkread' => $newmark}); |
&Apache::lonnet::put('environment',{'discmarkread' => $newmark}); |
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark}); |
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark}); |
} else { |
} else { |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as not "NEW".')).'<br />'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).'<br />'; |
&Apache::lonnet::del('environment',['discmarkread']); |
&Apache::lonnet::del('environment',['discmarkread']); |
&Apache::lonnet::delenv('environment.discmarkread'); |
&Apache::lonnet::delenv('environment.discmarkread'); |
} |
} |
Line 2113 push(@{ $menu[0]->{items} }, {
|
Line 2094 push(@{ $menu[0]->{items} }, {
|
linktitle => 'Change your password.', |
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()) { |
if (&can_toggle_namelocking()) { |
push(@{ $menu[0]->{items} }, { |
push(@{ $menu[0]->{items} }, { |