version 1.247, 2025/03/05 05:24:42
|
version 1.248, 2025/03/07 02:13:40
|
Line 103 sub languagechanger {
|
Line 103 sub languagechanger {
|
{ href => '/adm/preferences?action=changelanguages', |
{ href => '/adm/preferences?action=changelanguages', |
text => 'Change Language'}); |
text => 'Change Language'}); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language'). |
|
'<div class="LC_landmark" role="main">'); |
my %userenv = &Apache::lonnet::get('environment',['languages']); |
my %userenv = &Apache::lonnet::get('environment',['languages']); |
my $language=$userenv{'languages'}; |
my $language=$userenv{'languages'}; |
|
|
$r->print( |
$r->print( |
'<form name="prefs" action="/adm/preferences" method="post">'."\n". |
'<form name="prefs" action="/adm/preferences" method="post">'."\n". |
'<input type="hidden" name="action" value="verify_and_change_languages" />'. |
'<input type="hidden" name="action" value="verify_and_change_languages" />'. |
'<br /><span class="LC_nobreak">'.&mt('Preferred language').': '. |
'<br /><span class="LC_nobreak"><label>'.&mt('Preferred language').': '. |
&Apache::loncommon::select_language('language',$language,1).'</span>'."\n". |
&Apache::loncommon::select_language('language',$language,1).'</label></span>'."\n". |
'<br /><input type="submit" value="'.&mt('Save').'" /></form>' |
'<br /><input type="submit" value="'.&mt('Save').'" /></form></div>' |
); |
); |
} |
} |
|
|
Line 192 sub texenginechanger {
|
Line 193 sub texenginechanger {
|
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_texengine" /> |
<input type="hidden" name="action" value="verify_and_change_texengine" /> |
<p> |
<p> |
$lt{'preftxt'}: $selectionbox |
<label>$lt{'preftxt'}: $selectionbox |
<br /> |
</label><br /> |
<input type="submit" value="$lt{'change'}" /> |
<input type="submit" value="$lt{'change'}" /> |
</p> |
</p> |
</form> |
</form> |
Line 275 sub rolesprefchanger {
|
Line 276 sub rolesprefchanger {
|
{ href => '/adm/preferences?action=changerolespref', |
{ href => '/adm/preferences?action=changerolespref', |
text => $brtext}); |
text => $brtext}); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle)); |
$r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle). |
|
'<div class="LC_landmark" role="main">'); |
my $hotlist_flag=$userenv{'recentroles'}; |
my $hotlist_flag=$userenv{'recentroles'}; |
my $hotlist_n=$userenv{'recentrolesn'}; |
my $hotlist_n=$userenv{'recentrolesn'}; |
my ($checkedon,$checkedoff); |
my ($checkedon,$checkedoff); |
Line 294 sub rolesprefchanger {
|
Line 296 sub rolesprefchanger {
|
} |
} |
|
|
# Get list of recent roles and display with checkbox in front |
# Get list of recent roles and display with checkbox in front |
my $roles_check_list = ''; |
my $roles_check_list; |
my $role_key=''; |
|
if ($env{'environment.recentroles'}) { |
if ($env{'environment.recentroles'}) { |
my %recent_roles = |
my %recent_roles = |
&Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'}); |
&Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'}); |
my %frozen_roles = |
my %frozen_roles = |
&Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'}); |
&Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'}); |
|
|
my %role_text = &rolespref_get_role_text([keys(%recent_roles)]); |
my %role_text = &rolespref_get_role_text([keys(%recent_roles)]); |
my @sorted_roles = sort {$role_text{$a} cmp $role_text{$b}} keys(%role_text); |
my @sorted_roles = sort {$role_text{$a} cmp $role_text{$b}} keys(%role_text); |
|
|
$roles_check_list .= |
if (@sorted_roles) { |
&Apache::loncommon::start_data_table(). |
$roles_check_list = |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table(). |
"<th>".&mt('Freeze '.$role)."</th>". |
&Apache::loncommon::start_data_table_header_row(). |
"<th>".&mt($role)."</th>". |
"<th>".&mt('Freeze '.$role)."</th>". |
&Apache::loncommon::end_data_table_header_row(). |
"<th>".&mt($role)."</th>". |
"\n"; |
&Apache::loncommon::end_data_table_header_row()."\n"; |
my $count; |
my $count = 0; |
foreach $role_key (@sorted_roles) { |
foreach my $role_key (@sorted_roles) { |
my $checked = ""; |
my $checked = ""; |
my $value = $recent_roles{$role_key}; |
my $value = $recent_roles{$role_key}; |
if ($frozen_roles{$role_key}) { |
if ($frozen_roles{$role_key}) { |
$checked = ' checked="checked"'; |
$checked = ' checked="checked"'; |
} |
} |
$count++; |
$count++; |
$roles_check_list .= |
$roles_check_list .= |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td class="LC_table_cell_checkbox">'. |
'<td class="LC_table_cell_checkbox">'. |
"<input type=\"checkbox\"$checked name=\"freezeroles\"". |
"<input type=\"checkbox\"$checked name=\"freezeroles\"". |
" id=\"freezeroles$count\" value=\"$role_key\" /></td>". |
" id=\"freezeroles$count\" value=\"$role_key\" /></td>". |
"<td><label for=\"freezeroles$count\">". |
"<td><label for=\"freezeroles$count\">". |
"$role_text{$role_key}</label></td>". |
"$role_text{$role_key}</label></td>". |
&Apache::loncommon::end_data_table_row(). "\n"; |
&Apache::loncommon::end_data_table_row(). "\n"; |
|
} |
|
$roles_check_list .= &Apache::loncommon::end_data_table."\n"; |
} |
} |
$roles_check_list .= "</table>\n"; |
|
} |
} |
|
|
my $actionurl = '/adm/preferences'; |
my $actionurl = '/adm/preferences'; |
if ($env{'form.returnurl'} eq '/adm/roles') { |
if ($env{'form.returnurl'} eq '/adm/roles') { |
$actionurl = '/adm/roles'; |
$actionurl = '/adm/roles'; |
} |
} |
$r->print('<h3>'.&mt('Recent Roles Hotlist').'</h3>'); |
$r->print('<h2 class="LC_heading_2">'.&mt('Recent Roles Hotlist').'</h2>'); |
unless ($checkedon) { |
unless ($checkedon) { |
$r->print(&mt('LON-CAPA users with several '.$lc_role.'s may wish to enable the Hotlist.').'<br />'); |
$r->print(&mt('LON-CAPA users with several '.$lc_role.'s may wish to enable the Hotlist.').'<br />'); |
} |
} |
Line 344 sub rolesprefchanger {
|
Line 346 sub rolesprefchanger {
|
<form name="prefs" action="'.$actionurl.'" method="post"> |
<form name="prefs" action="'.$actionurl.'" method="post"> |
<input type="hidden" name="action" value="verify_and_change_rolespref" /> |
<input type="hidden" name="action" value="verify_and_change_rolespref" /> |
<input type="hidden" name="returnurl" value="'.$env{'form.returnurl'}.'" /> |
<input type="hidden" name="returnurl" value="'.$env{'form.returnurl'}.'" /> |
<div class="LC_left_float"><h4>'.&mt('Hotlist options').'</h4> |
<div class="LC_left_float"><h3 class="LC_heading_3">'.&mt('Hotlist options').'</h3> |
<p>'. |
<p>'. |
&mt('When enabled, the Hotlist keeps track of the last N '.$lc_role.'s visited.').'<br />'. |
&mt('When enabled, the Hotlist keeps track of the last N '.$lc_role.'s visited.').'<br />'. |
&mt('Those N '.$lc_role.'s are then shown in a table at the top of the '.$lc_role.'s page.').'</p>'. |
&mt('Those N '.$lc_role.'s are then shown in a table at the top of the '.$lc_role.'s page.').'</p>'. |
Line 365 $options.'
|
Line 367 $options.'
|
</div>'); |
</div>'); |
if ($roles_check_list) { |
if ($roles_check_list) { |
$r->print('<div class="LC_left_float"> |
$r->print('<div class="LC_left_float"> |
<h4>'.&mt('Freeze Roles').'</h4> |
<h3 class="LC_heading_3">'.&mt('Freeze Roles').'</h3> |
<p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'. |
<p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'. |
&mt('Those '.$lc_role.'s marked frozen will not be removed from the list, even if not recently used.').' |
&mt('Those '.$lc_role.'s marked frozen will not be removed from the list, even if not recently used.').' |
</p> |
</p> |
Line 378 $options.'
|
Line 380 $options.'
|
$r->print(' |
$r->print(' |
<br clear="all" /> |
<br clear="all" /> |
<input type="submit" value="'.&mt('Save').'" /> |
<input type="submit" value="'.&mt('Save').'" /> |
</form>'); |
</form></div>'); |
} |
} |
|
|
sub rolespref_get_role_text { |
sub rolespref_get_role_text { |
Line 491 sub screennamechanger {
|
Line 493 sub screennamechanger {
|
text => 'Change Screen Name'}); |
text => 'Change Screen Name'}); |
$r->print(Apache::loncommon::start_page('Personal Data')); |
$r->print(Apache::loncommon::start_page('Personal Data')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name')); |
$r->print('<div class="LC_landmark" role="main"><p>' |
$r->print('<div class="LC_landmark" role="main">'); |
.&mt('Change the name that is displayed in your posts.') |
my $caption = &mt('Name displayed in posts you make').':'; |
.'</p>' |
|
); |
|
$r->print('<form name="prefs" action="/adm/preferences" method="post">' |
$r->print('<form name="prefs" action="/adm/preferences" method="post">' |
.'<input type="hidden" name="action" value="verify_and_change_screenname" />' |
.'<p><input type="hidden" name="action" value="verify_and_change_screenname" />' |
.&Apache::lonhtmlcommon::start_pick_box() |
.&Apache::lonhtmlcommon::start_pick_box(undef,undef,$caption,'LC_caption_prefs') |
.&Apache::lonhtmlcommon::row_title('<label for="screenname">'.&mt('Screenname').'</label> '.&mt('(shown if you post anonymously)')) |
.&Apache::lonhtmlcommon::row_title('<label for="screenname">'.&mt('Screenname').'</label> '.&mt('(shown if you post anonymously)')) |
.'<input type="text" size="20" value="'.$screenname.'" name="screenname" id="screenname" />' |
.'<input type="text" size="20" value="'.$screenname.'" name="screenname" id="screenname" />' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
Line 508 sub screennamechanger {
|
Line 508 sub screennamechanger {
|
.'<input type="submit" value="'.&mt('Save').'" />' |
.'<input type="submit" value="'.&mt('Save').'" />' |
.&Apache::lonhtmlcommon::row_closure(1) |
.&Apache::lonhtmlcommon::row_closure(1) |
.&Apache::lonhtmlcommon::end_pick_box() |
.&Apache::lonhtmlcommon::end_pick_box() |
.'</form></div>' |
.'</p></form></div>' |
); |
); |
} |
} |
|
|
Line 556 sub iconchanger {
|
Line 556 sub iconchanger {
|
{ href => '/adm/preferences?action=changeicons', |
{ href => '/adm/preferences?action=changeicons', |
text => 'Change Menu Display'}); |
text => 'Change Menu Display'}); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Menu Display')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Menu Display'). |
|
'<div class="LC_landmark" role="main">'); |
|
|
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
Line 591 sub iconchanger {
|
Line 592 sub iconchanger {
|
'<ul>'. |
'<ul>'. |
$iconic_preview. |
$iconic_preview. |
'</ul></li></ul>'; |
'</ul></li></ul>'; |
|
my $title = &mt('Use of icons and text'); |
$r->print(<<ENDSCREEN); |
$r->print(<<ENDSCREEN); |
$classic |
$classic |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_icons" /> |
<input type="hidden" name="action" value="verify_and_change_icons" /> |
|
<fieldset style="display:inline;"><legend>$title</legend> |
<label><input type="radio" name="menumode" value="iconic" $iconic /> $lt{'iconic'}</label>$iconic_preview<br /> |
<label><input type="radio" name="menumode" value="iconic" $iconic /> $lt{'iconic'}</label>$iconic_preview<br /> |
<label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $lt{'iconsonly'}</label>$iconsonly_preview<br /> |
<label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $lt{'iconsonly'}</label>$iconsonly_preview<br /> |
|
</fieldset> |
|
<p> |
<input type="submit" value="$change" /> |
<input type="submit" value="$change" /> |
</form> |
</p> |
|
</form></div> |
ENDSCREEN |
ENDSCREEN |
} |
} |
|
|
Line 657 sub clickerchanger {
|
Line 663 sub clickerchanger {
|
{ href => '/adm/preferences?action=changeclicker', |
{ href => '/adm/preferences?action=changeclicker', |
text => 'Register Clicker'}); |
text => 'Register Clicker'}); |
$r->print(Apache::loncommon::start_page('Other')); |
$r->print(Apache::loncommon::start_page('Other')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker'). |
|
'<div class="LC_landmark" role="main">'); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
my %userenv = &Apache::lonnet::get |
my %userenv = &Apache::lonnet::get |
Line 668 sub clickerchanger {
|
Line 675 sub clickerchanger {
|
my $change=&mt('Save'); |
my $change=&mt('Save'); |
my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID')); |
my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID')); |
$r->print(<<ENDSCREEN); |
$r->print(<<ENDSCREEN); |
|
<br /> |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_clicker" /> |
<input type="hidden" name="action" value="verify_and_change_clicker" /> |
<label>$helplink<br /><br />$text<br /> |
<label>$helplink<br /><br />$text<br /> |
<textarea name="clickers" rows="5" cols="20">$clickers</textarea> |
<textarea name="clickers" rows="5" cols="20">$clickers</textarea> |
</label> |
</label> |
<br /> |
<p> |
<input type="submit" value="$change" /> |
<input type="submit" value="$change" /> |
|
</p> |
</form> |
</form> |
|
</div> |
ENDSCREEN |
ENDSCREEN |
} |
} |
|
|
Line 848 sub msgforwardchanger {
|
Line 858 sub msgforwardchanger {
|
notv => 'is not a valid e-mail address', |
notv => 'is not a valid e-mail address', |
toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one", |
toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one", |
prme => 'Back', |
prme => 'Back', |
|
acti => 'Action', |
|
type => 'Types of message for which notification is sent', |
|
nota => 'Notification address', |
|
exce => 'Excerpt retains HTML tags in message', |
|
modi => 'Modify', |
|
dele => 'Delete', |
|
addn => 'Add new address', |
|
yes => 'Yes', |
|
no => 'No', |
); |
); |
$lt{'foad_exmpl'} = &mt('e.g. [_1]userA:domain1,userB:domain2,...[_2]','<tt>','</tt>'); |
$lt{'foad_exmpl'} = &mt('e.g. [_1]userA:domain1,userB:domain2,...[_2]','<tt>','</tt>'); |
$lt{'mnot_exmpl'} = &mt('e.g. [_1]joe@doe.com[_2]','<tt>','</tt>'); |
$lt{'mnot_exmpl'} = &mt('e.g. [_1]joe@doe.com[_2]','<tt>','</tt>'); |
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changemsgforward', |
{ href => '/adm/preferences?action=changemsgforward', |
text => 'Messages & Notifications'}); |
text => 'Messages & Notifications'}); |
$r->print(Apache::loncommon::start_page('Messages & Notifications')); |
$r->print(Apache::loncommon::start_page('Messages & Notifications')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Messages & Notifications')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Messages & Notifications'). |
|
'<div class="LC_landmark" role="main">'); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification"); |
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification"); |
my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message"); |
my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message"); |
Line 924 $validatescript
|
Line 944 $validatescript
|
$r->print(<<ENDMSG); |
$r->print(<<ENDMSG); |
$jscript |
$jscript |
$message |
$message |
<h3>$lt{'fwdm'} $forwardingHelp</h3> |
<h2 class="LC_heading_2">$lt{'fwdm'} $forwardingHelp</h2> |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_msgforward" /> |
<input type="hidden" name="action" value="verify_and_change_msgforward" /> |
$lt{'foad'} ($lt{'foad_exmpl'}): |
<label for="msgforward">$lt{'foad'}</label> ($lt{'foad_exmpl'}): |
<input type="text" size="40" value="$msgforward" name="msgforward" /> |
<input type="text" size="40" value="$msgforward" name="msgforward" id="msgforward" /> |
<br /><br /> |
<p /> |
<h3>$lt{'noti'} $notificationHelp</h3> |
<h2 class="LC_heading_2">$lt{'noti'} $notificationHelp</h2> |
$lt{'mnot'} ($lt{'mnot_exmpl'}):<br /> |
<span id="LC_email_notify">$lt{'mnot'}</span> ($lt{'mnot_exmpl'}):<br /> |
ENDMSG |
ENDMSG |
my @sortforwards = sort (keys(%allnot)); |
my @sortnotify = sort (keys(%allnot)); |
my $output = &Apache::loncommon::start_data_table(). |
my $output = &Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table_header_row(). |
'<th> </th>'. |
'<th>#</th>'. |
'<th>'.&mt('Action').'</th>'. |
'<th>'.$lt{'acti'}.'</th>'. |
'<th>'.&mt('Notification address').'</th><th>'. |
'<th>'.$lt{'nota'}.'</th><th>'. |
&mt('Types of message for which notification is sent'). |
$lt{'type'}. |
$criticalMessageHelp.'</th><th>'. |
$criticalMessageHelp.'</th><th>'. |
&mt('Excerpt retains HTML tags in message').'</th>'. |
$lt{'exce'}.'</th>'. |
&Apache::loncommon::end_data_table_header_row(); |
&Apache::loncommon::end_data_table_header_row(); |
my $num = 0; |
my $num = 0; |
my $counter = 1; |
my $counter = 1; |
foreach my $item (@sortforwards) { |
foreach my $item (@sortnotify) { |
$output .= &Apache::loncommon::start_data_table_row(). |
$output .= &Apache::loncommon::start_data_table_row('LC_prefs_row'). |
'<td><b>'.$counter.'</b></td>'. |
'<td><b>'.$counter.'</b></td>'. |
'<td><span class="LC_nobreak"><label>'. |
'<td><span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="modify_notify_'. |
'<input type="checkbox" name="modify_notify_'. |
$num.'" onclick="javscript:modify_address('."'$num'".')" />'. |
$num.'" onclick="javscript:modify_address('."'$num'".')" />'. |
&mt('Modify').'</label></span> '. |
$lt{'modi'}.'</label></span> '.(' ' x2). |
'<span class="LC_nobreak"><label>'. |
'<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="del_notify_'.$num. |
'<input type="checkbox" name="del_notify_'.$num. |
'" onclick="javscript:delete_address('."'$num'".')" />'. |
'" onclick="javscript:delete_address('."'$num'".')" />'. |
&mt('Delete').'</label></span></td>'. |
$lt{'dele'}.'</label></span></td>'. |
'<td><input type="text" value="'.$item.'" name="address_'. |
'<td><span style="padding: 10px;"><input type="text" value="'.$item.'" name="address_'. |
$num.'" onfocus="javascript:address_changes('."'$num'". |
$num.'" onfocus="javascript:address_changes('."'$num'". |
')" /></td><td>'; |
')" aria-labelledby="LC_email_notify" /></span></td><td>'; |
my %chk; |
my %chk; |
if (defined($allnot{$item}{'crit'})) { |
if (defined($allnot{$item}{'crit'})) { |
if (defined($allnot{$item}{'reg'})) { |
if (defined($allnot{$item}{'reg'})) { |
Line 969 ENDMSG
|
Line 989 ENDMSG
|
} else { |
} else { |
$chk{'reg'} = 'checked="checked" '; |
$chk{'reg'} = 'checked="checked" '; |
} |
} |
|
$output .= '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'type'}.'</legend>'; |
foreach my $type ('all','crit','reg') { |
foreach my $type ('all','crit','reg') { |
$output .= '<span class="LC_nobreak"><label>'. |
$output .= '<span class="LC_nobreak"><label>'. |
'<input type="radio" name="notify_type_'.$num. |
'<input type="radio" name="notify_type_'.$num. |
'" value="'.$type.'" '.$chk{$type}. |
'" value="'.$type.'" '.$chk{$type}. |
' onchange="javascript:address_changes('."'$num'".')" />'. |
' onchange="javascript:address_changes('."'$num'".')" />'. |
$lt{$type}.'</label></span>'.(' ' x4); |
$lt{$type}.'</label></span> '.(' ' x2); |
} |
} |
|
$output .= '</fieldset>'; |
my $htmlon = ''; |
my $htmlon = ''; |
my $htmloff = ''; |
my $htmloff = ''; |
if (grep/^\Q$item\E/,@allow_html) { |
if (grep/^\Q$item\E/,@allow_html) { |
Line 983 ENDMSG
|
Line 1005 ENDMSG
|
} else { |
} else { |
$htmloff = 'checked="checked" '; |
$htmloff = 'checked="checked" '; |
} |
} |
$output .= '</td><td><label><input type="radio" name="html_'.$num. |
$output .= '</td><td>'. |
|
'<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'exce'}.'</legend>'. |
|
'<label><input type="radio" name="html_'.$num. |
'" value="1" '.$htmlon. |
'" value="1" '.$htmlon. |
' onchange="javascript:address_changes('."'$num'".')" />'. |
' onchange="javascript:address_changes('."'$num'".')" />'. |
&mt('Yes').'</label>'.(' ' x3). |
$lt{'yes'}.'</label> '.(' ' x2). |
'<label><input type="radio" name="html_'.$num.'" value="0" '. |
'<label><input type="radio" name="html_'.$num.'" value="0" '. |
$htmloff. ' onchange="javascript:address_changes('."'$num'". |
$htmloff. ' onchange="javascript:address_changes('."'$num'". |
')" />'. |
')" />'. |
&mt('No').'</label></td>'. |
$lt{'no'}.'</label></fieldset></td>'. |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row(); |
$num ++; |
$num ++; |
$counter ++; |
$counter ++; |
Line 1000 ENDMSG
|
Line 1024 ENDMSG
|
crit => '', |
crit => '', |
reg => '', |
reg => '', |
); |
); |
$output .= &Apache::loncommon::start_data_table_row(). |
$output .= &Apache::loncommon::start_data_table_row('LC_prefs_row'). |
'<td><b>'.$counter.'</b></td>'. |
'<td><b>'.$counter.'</b></td>'. |
'<td><span class="LC_nobreak"><label>'. |
'<td><span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="add_notify_'.$num. |
'<input type="checkbox" name="add_notify_'.$num. |
'" value="1" />'.&mt('Add new address').'</label></span></td>'. |
'" value="1" />'.$lt{'addn'}.'</label></span></td>'. |
'<td><input type="text" value="" name="address_'.$num. |
'<td><span style="padding: 10px;"><input type="text" value="" name="address_'.$num. |
'" onfocus="javascript:new_address('."'$num'".')" /></td><td>'; |
'" onfocus="javascript:new_address('."'$num'".')" aria-labelledby="LC_email_notify" /></span></td><td>'; |
|
$output .= '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'type'}.'</legend>'; |
foreach my $type ('all','crit','reg') { |
foreach my $type ('all','crit','reg') { |
$output .= '<span class="LC_nobreak"><label>'. |
$output .= '<span class="LC_nobreak"><label>'. |
'<input type="radio" name="notify_type_'.$num. |
'<input type="radio" name="notify_type_'.$num. |
'" value="'.$type.'" '.$defchk{$type}.'/>'. |
'" value="'.$type.'" '.$defchk{$type}.'/>'. |
$lt{$type}.'</label></span>'.(' ' x4); |
$lt{$type}.'</label></span> '.(' ' x2); |
} |
} |
$output .= '</td><td><label><input type="radio" name="html_'.$num. |
$output .= '</fieldset></td><td>'. |
'" value="1" />'.&mt('Yes').'</label>'.(' ' x3). |
'<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'exce'}.'</legend>'. |
|
'<label><input type="radio" name="html_'.$num. |
|
'" value="1" />'.$lt{'yes'}.'</label> '.(' ' x2). |
'<label><input type="radio" name="html_'.$num.'" value="0" '. |
'<label><input type="radio" name="html_'.$num.'" value="0" '. |
' checked="checked" />'. |
' checked="checked" />'. |
&mt('No').'</label></td>'. |
$lt{'no'}.'</label></fieldset></td>'. |
&Apache::loncommon::end_data_table_row(). |
&Apache::loncommon::end_data_table_row(). |
&Apache::loncommon::end_data_table(); |
&Apache::loncommon::end_data_table(); |
$num ++; |
$num ++; |
Line 1027 ENDMSG
|
Line 1054 ENDMSG
|
<input type="hidden" name="numnotify" value="$num" /> |
<input type="hidden" name="numnotify" value="$num" /> |
<input type="button" value="$lt{'prme'}" onclick="location.href='/adm/preferences'" /> |
<input type="button" value="$lt{'prme'}" onclick="location.href='/adm/preferences'" /> |
<input type="button" value="$lt{'chg'}" onclick="javascript:validate()" /> |
<input type="button" value="$lt{'chg'}" onclick="javascript:validate()" /> |
</form> |
</form></div> |
|); |
|); |
|
|
} |
} |
Line 1161 sub colorschanger {
|
Line 1188 sub colorschanger {
|
{ href => '/adm/preferences?action=changecolors', |
{ href => '/adm/preferences?action=changecolors', |
text => 'Change Colors'}); |
text => 'Change Colors'}); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors'). |
|
'<div class="LC_landmark" role="main">'); |
# figure out colors |
# figure out colors |
my $function=&Apache::loncommon::get_users_function(); |
my $function=&Apache::loncommon::get_users_function(); |
my $domain=&Apache::loncommon::determinedomain(); |
my $domain=&Apache::loncommon::determinedomain(); |
Line 1175 sub colorschanger {
|
Line 1203 sub colorschanger {
|
'vlink' => 'Visited Link Color', |
'vlink' => 'Visited Link Color', |
'alink' => 'Active Link Color', |
'alink' => 'Active Link Color', |
); |
); |
my $start_data_table = &Apache::loncommon::start_data_table(); |
my $start_data_table = &Apache::loncommon::start_data_table(). |
|
&Apache::loncommon::data_table_caption(&mt('Colors for LON-CAPA pages')). |
|
&Apache::loncommon::start_data_table_header_row(). |
|
'<th>'.&mt('Page Element').'</th><th>'.&mt('Color').'</th>'. |
|
&Apache::loncommon::end_data_table_header_row(); |
my $chtable=''; |
my $chtable=''; |
foreach my $item (sort(keys(%colortypes))) { |
foreach my $item (sort(keys(%colortypes))) { |
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); |
my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); |
$chtable.=&Apache::loncommon::start_data_table_row(). |
$chtable.=&Apache::loncommon::start_data_table_row(). |
'<td>'.$colortypes{$item}.'<td><input name="'.$item. |
'<td><label for="'.$item.'">'.$colortypes{$item}.'</label></td>'. |
'" class="colorchooser" size="10" value="'.$curcol. |
'<td><input name="'.$item. |
|
'" class="colorchooser" id="'.$item.'" size="10" value="'.$curcol. |
'" /></td>'. |
'" /></td>'. |
&Apache::loncommon::end_data_table_row()."\n"; |
&Apache::loncommon::end_data_table_row()."\n"; |
} |
} |
Line 1203 sub colorschanger {
|
Line 1236 sub colorschanger {
|
<input type="hidden" name="pres_type" /> |
<input type="hidden" name="pres_type" /> |
<input type="hidden" name="pres_value" /> |
<input type="hidden" name="pres_value" /> |
</form> |
</form> |
|
<br /> |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_colors" /> |
<input type="hidden" name="action" value="verify_and_change_colors" /> |
$start_data_table |
$start_data_table |
Line 1213 $end_data_table
|
Line 1247 $end_data_table
|
<input type="submit" value="$savebutton" /> |
<input type="submit" value="$savebutton" /> |
<input type="submit" name="resetall" value="$resetbutton" title="$resetbuttondesc" /> |
<input type="submit" name="resetall" value="$resetbutton" title="$resetbuttondesc" /> |
</p> |
</p> |
</form> |
</form></div> |
ENDCOL |
ENDCOL |
} |
} |
|
|
Line 1288 sub passwordchanger {
|
Line 1322 sub passwordchanger {
|
my ($blocked,$blocktext) = |
my ($blocked,$blocktext) = |
&Apache::loncommon::blocking_status('passwd',$clientip); |
&Apache::loncommon::blocking_status('passwd',$clientip); |
if ($blocked) { |
if ($blocked) { |
$r->print('<p class="LC_warning">'.$blocktext.'</p>'); |
$r->print('<p class="LC_warning">'.$blocktext.'</p></div>'); |
return; |
return; |
} |
} |
} elsif ($caller eq 'reset_by_email') { |
} elsif ($caller eq 'reset_by_email') { |
Line 1338 sub passwordchanger {
|
Line 1372 sub passwordchanger {
|
$r->print( |
$r->print( |
'<p class="LC_error">' |
'<p class="LC_error">' |
.&mt('Page requested in unexpected context') |
.&mt('Page requested in unexpected context') |
.'</p>' |
.'</p></div>' |
); |
); |
return; |
return; |
} |
} |
my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain); |
my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain); |
# Check for authentication types that allow changing of the password. |
# Check for authentication types that allow changing of the password. |
return if ($currentauth !~ /^(unix|internal):/); |
if ($currentauth !~ /^(unix|internal):/) { |
|
unless ($caller eq 'reset_by_email') { |
|
$r->print('</div>'); |
|
} |
|
return; |
|
} |
# |
# |
# Generate keys |
# Generate keys |
my ($lkey_cpass ,$ukey_cpass ) = &Apache::loncommon::des_keys(); |
my ($lkey_cpass ,$ukey_cpass ) = &Apache::loncommon::des_keys(); |
Line 1383 $errormessage
|
Line 1422 $errormessage
|
ENDFORM |
ENDFORM |
$r->print(&server_form($logtoken,$caller,$mailtoken,$extrafields)); |
$r->print(&server_form($logtoken,$caller,$mailtoken,$extrafields)); |
$r->print(&client_form($caller,\%hexkey,$currentpass,$domain,$extrafields)); |
$r->print(&client_form($caller,\%hexkey,$currentpass,$domain,$extrafields)); |
|
unless ($caller eq 'reset_by_email') { |
|
$r->print('</div>'); |
|
} |
# |
# |
return; |
return; |
} |
} |
Line 1853 sub discussionchanger {
|
Line 1894 sub discussionchanger {
|
{ href => '/adm/preferences?action=changediscussions', |
{ href => '/adm/preferences?action=changediscussions', |
text => 'Change Discussion Preferences'}); |
text => 'Change Discussion Preferences'}); |
$r->print(Apache::loncommon::start_page('Change Discussion Preferences')); |
$r->print(Apache::loncommon::start_page('Change Discussion Preferences')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences'). |
|
'<div class="LC_landmark" role="main">'); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
my %userenv = &Apache::lonnet::get |
my %userenv = &Apache::lonnet::get |
Line 1921 END
|
Line 1963 END
|
|
|
$r->print('<p class="LC_info">'.$lt{'thde'}.'</p>'); |
$r->print('<p class="LC_info">'.$lt{'thde'}.'</p>'); |
|
|
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table(). |
|
&Apache::loncommon::start_data_table_header_row()); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<tr> |
|
<th>$lt{'pref'}</th> |
<th>$lt{'pref'}</th> |
<th>$lt{'curr'}</th> |
<th>$lt{'curr'}</th> |
<th>$lt{'actn'}?</th> |
<th>$lt{'actn'}?</th> |
</tr> |
|
END |
END |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_header_row(). |
|
&Apache::loncommon::start_data_table_row()); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<td>$lt{'disa'}</td> |
<td>$lt{'disa'}</td> |
<td>$lt{$discdisp}</td> |
<td>$lt{$discdisp}</td> |
Line 1941 END
|
Line 1983 END
|
<td>$lt{'npmr'}</td> |
<td>$lt{'npmr'}</td> |
<td>$lt{$discmark}</td> |
<td>$lt{$discmark}</td> |
<td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" /> $lt{'chgt'} "$markchange"</label></td> |
<td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" /> $lt{'chgt'} "$markchange"</label></td> |
</tr> |
|
END |
END |
$r->print(&Apache::loncommon::end_data_table_row(). |
$r->print(&Apache::loncommon::end_data_table_row(). |
&Apache::loncommon::end_data_table()); |
&Apache::loncommon::end_data_table()); |
|
|
$r->print('<br />' |
$r->print('<br />' |
.'<input type="submit" name="sub" value="'.&mt('Save').'" />' |
.'<input type="submit" name="sub" value="'.&mt('Save').'" />' |
.'</form>' |
.'</form></div>' |
); |
); |
} |
} |
|
|
Line 2180 sub author_space_settings {
|
Line 2221 sub author_space_settings {
|
$divsty = 'display:inline-block'; |
$divsty = 'display:inline-block'; |
} |
} |
$r->print(<<"END"); |
$r->print(<<"END"); |
<h4><span class="LC_nobreak">$titles{$item}</span></h4> |
<h3 class="LC_heading_3"><span class="LC_nobreak">$titles{$item}</span></h3> |
<p class="LC_nobreak">$lt{'curd'}: <span style="font-style:italic">$domdefdisplay</span></p> |
<p class="LC_nobreak">$lt{'curd'}: <span style="font-style:italic">$domdefdisplay</span></p> |
<p class="LC_nobreak"> |
<p class="LC_nobreak"> |
<label><input type="radio" name="$item" value="dom" onclick="toggleOptions(this.form,'$item','user_$item');"$checkeddom />$lt{'used'}</label> |
<label><input type="radio" name="$item" value="dom" onclick="toggleOptions(this.form,'$item','user_$item');"$checkeddom />$lt{'used'}</label> |
Line 2521 sub timezonechanger {
|
Line 2562 sub timezonechanger {
|
{ href => '/adm/preferences?action=', |
{ href => '/adm/preferences?action=', |
text => 'Set Your Time Zone'}); |
text => 'Set Your Time Zone'}); |
$r->print(Apache::loncommon::start_page('Set Your Time Zone',$js,$args)); |
$r->print(Apache::loncommon::start_page('Set Your Time Zone',$js,$args)); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Set Your Time Zone')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Set Your Time Zone'). |
|
'<div class="LC_landmark" role="main">'); |
my %userenv = &Apache::lonnet::get('environment',['timezone']); |
my %userenv = &Apache::lonnet::get('environment',['timezone']); |
my $timezone = $userenv{'timezone'}; |
my $timezone = $userenv{'timezone'}; |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
|
tztu => 'Time Zone in use', |
lctz => 'Use Time Zone set by LON-CAPA', |
lctz => 'Use Time Zone set by LON-CAPA', |
owntz => 'Use Time Zone set by you', |
owntz => 'Use Time Zone set by you', |
save => 'Save', |
save => 'Save', |
Line 2542 sub timezonechanger {
|
Line 2585 sub timezonechanger {
|
$r->print(<<"END"); |
$r->print(<<"END"); |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
<input type="hidden" name="action" value="verify_and_change_timezone" /> |
<input type="hidden" name="action" value="verify_and_change_timezone" /> |
|
<fieldset style="display:inline; padding: 5px;"><legend>$lt{'tztu'}</legend> |
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
<label><input type="radio" name="settimezone" value="0"$checked{'lctz'}$onclick /> |
<label><input type="radio" name="settimezone" value="0"$checked{'lctz'}$onclick /> |
$lt{'lctz'}</label> |
$lt{'lctz'}</label></span><br /> |
|
<span class="LC_nobreak"> |
<label><input type="radio" name="settimezone" value="1"$checked{'owntz'}$onclick /> |
<label><input type="radio" name="settimezone" value="1"$checked{'owntz'}$onclick /> |
$lt{'owntz'}</label><div style="display:$tzsty" id="LC_timezone_selector"> |
$lt{'owntz'}</label></span><div style="display:$tzsty" id="LC_timezone_selector"> |
$selector |
$selector |
</div></span><br /><br /> |
</div></fieldset><p> |
<input type="submit" value="$lt{'save'}" /> |
<input type="submit" value="$lt{'save'}" /> |
</form> |
</p></form></div> |
END |
END |
} |
} |
return; |
return; |
Line 2703 my @menu=
|
Line 2748 my @menu=
|
permission => 'F', |
permission => 'F', |
#help => 'Change_Discussion_Display', |
#help => 'Change_Discussion_Display', |
icon => 'chat.png', |
icon => 'chat.png', |
alttext => 'Discussions Icon', |
alttext => 'Discussions Icon', |
linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.' |
linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.' |
}, |
}, |
] |
] |
Line 2758 push(@menu,
|
Line 2803 push(@menu,
|
permission => 'F', |
permission => 'F', |
#help => 'Change_Password', |
#help => 'Change_Password', |
icon => 'emblem-readonly.png', |
icon => 'emblem-readonly.png', |
alttext => 'Secure Icon', |
alttext => 'Secure Icon', |
linktitle => 'Change your password.', |
linktitle => 'Change your password.', |
}); |
}); |
} |
} |
Line 2797 push(@{ $menu[-1]->{items} }, {
|
Line 2842 push(@{ $menu[-1]->{items} }, {
|
permission => 'F', |
permission => 'F', |
#help => '', |
#help => '', |
icon => 'blog.png', |
icon => 'blog.png', |
alttext => 'Debugging Icon', |
alttext => 'Debugging Icon', |
linktitle => 'Toggle Debug Messages.', |
linktitle => 'Toggle Debug Messages.', |
}); |
}); |
} |
} |
Line 2858 sub handler {
|
Line 2903 sub handler {
|
$ended = 1; |
$ended = 1; |
}elsif($env{'form.action'} eq 'changepass'){ |
}elsif($env{'form.action'} eq 'changepass'){ |
&passwordchanger($r); |
&passwordchanger($r); |
$r->print('</div>'); |
|
}elsif($env{'form.action'} eq 'verify_and_change_pass'){ |
}elsif($env{'form.action'} eq 'verify_and_change_pass'){ |
&verify_and_change_password($r,'preferences','','','',\$ended); |
&verify_and_change_password($r,'preferences','','','',\$ended); |
}elsif($env{'form.action'} eq 'changescreenname'){ |
}elsif($env{'form.action'} eq 'changescreenname'){ |