version 1.173, 2009/10/08 19:54:37
|
version 1.177, 2009/10/17 00:04:01
|
Line 42 use Apache::loncommon();
|
Line 42 use Apache::loncommon();
|
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use LONCAPA::lonauthcgi(); |
use LONCAPA(); |
use LONCAPA(); |
|
|
# |
# |
Line 205 sub texenginechanger {
|
Line 206 sub texenginechanger {
|
my $r = shift; |
my $r = shift; |
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changetexenginepref', |
{ href => '/adm/preferences?action=changetexenginepref', |
text => 'Change How Math Equations Are Displayed'}); |
text => 'Math display settings'}); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change How Math Equations Are Displayed')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Math display settings')); |
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('environment',['texengine']); |
my %userenv = &Apache::lonnet::get('environment',['texengine']); |
Line 224 sub texenginechanger {
|
Line 225 sub texenginechanger {
|
%mathchoices); |
%mathchoices); |
my $jsMath_start=&Apache::lontexconvert::jsMath_header(); |
my $jsMath_start=&Apache::lontexconvert::jsMath_header(); |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'headline' => 'Change Math Preferences', |
'headline' => 'Change how math is displayed', |
'preftxt' => 'Preferred method to display Math', |
'preftxt' => 'Preferred method to display math', |
'change' => 'Save', |
'change' => 'Save', |
'exmpl' => 'Examples', |
'exmpl' => 'Examples', |
'jsmath' => 'jsMath:', |
'jsmath' => 'jsMath:', |
Line 280 if (jsMath.nofonts == 1) {
|
Line 281 if (jsMath.nofonts == 1) {
|
|
|
<h3>$lt{'tth'}</h3> |
<h3>$lt{'tth'}</h3> |
<p> |
<p> |
<iframe src="/res/adm/pages/math_example.tex?inhibitmenu=yes&texengine=tth" width="400" height="200"></iframe> |
<iframe src="/res/adm/pages/math_example.tex?inhibitmenu=yes&texengine=tth" width="400" height="220"></iframe> |
</p> |
</p> |
ENDLSCREEN |
ENDLSCREEN |
if ($env{'environment.texengine'} ne 'jsMath') { |
if ($env{'environment.texengine'} ne 'jsMath') { |
Line 778 sub msgforwardchanger {
|
Line 779 sub msgforwardchanger {
|
all => 'All', |
all => 'All', |
crit => 'Critical only', |
crit => 'Critical only', |
reg => 'Non-critical only', |
reg => 'Non-critical only', |
foad => 'Forwarding Address(es)', |
foad => 'Forward to account(s)', |
noti => 'Notification E-mail Address(es)', |
fwdm => 'Forward messages to other account(s) in LON-CAPA', |
|
noti => 'E-mail notification of LON-CAPA messages', |
foad_exmpl => 'e.g. <tt>userA:domain1,userB:domain2,...</tt>', |
foad_exmpl => 'e.g. <tt>userA:domain1,userB:domain2,...</tt>', |
mnot => 'E-mail Address(es) which should be notified about new LON-CAPA messages', |
mnot => 'E-mail address(es) which should be notified about new LON-CAPA messages', |
# old: 'Message Notification Email Address(es)', |
|
mnot_exmpl => 'e.g. <tt>joe@doe.com</tt>', |
mnot_exmpl => 'e.g. <tt>joe@doe.com</tt>', |
chg => 'Save', |
chg => 'Save', |
email => 'The e-mail address entered in row ', |
email => 'The e-mail address entered in row ', |
Line 792 sub msgforwardchanger {
|
Line 793 sub msgforwardchanger {
|
); |
); |
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changemsgforward', |
{ href => '/adm/preferences?action=changemsgforward', |
text => 'Change Message Forwarding/Notification'}); |
text => 'Messages & Notifications'}); |
$r->print(Apache::loncommon::start_page('Message Management')); |
$r->print(Apache::loncommon::start_page('Message Management')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification')); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
Line 860 $validatescript
|
Line 861 $validatescript
|
$r->print(<<ENDMSG); |
$r->print(<<ENDMSG); |
$jscript |
$jscript |
$message |
$message |
<h3>$lt{'foad'} $forwardingHelp</h3> |
<h3>$lt{'fwdm'} $forwardingHelp</h3> |
<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'}): |
$lt{'foad'} ($lt{'foad_exmpl'}): |
<input type="text" size="40" value="$msgforward" name="msgforward" /><br /> |
<input type="text" size="40" value="$msgforward" name="msgforward" /> |
|
<br /><br /> |
<h3>$lt{'noti'} $notificationHelp</h3> |
<h3>$lt{'noti'} $notificationHelp</h3> |
$lt{'mnot'} ($lt{'mnot_exmpl'}):<br /> |
$lt{'mnot'} ($lt{'mnot_exmpl'}):<br /> |
ENDMSG |
ENDMSG |
Line 909 ENDMSG
|
Line 911 ENDMSG
|
'<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> '; |
$lt{$type}.'</label></span>'.(' ' x4); |
} |
} |
my $htmlon = ''; |
my $htmlon = ''; |
my $htmloff = ''; |
my $htmloff = ''; |
Line 921 ENDMSG
|
Line 923 ENDMSG
|
$output .= '</td><td><label><input type="radio" name="html_'.$num. |
$output .= '</td><td><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> '. |
&mt('Yes').'</label>'.(' ' x3). |
'<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'". |
')" />'. |
')" />'. |
Line 946 ENDMSG
|
Line 948 ENDMSG
|
$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> '; |
$lt{$type}.'</label></span>'.(' ' x4); |
} |
} |
$output .= '</td><td><label><input type="radio" name="html_'.$num. |
$output .= '</td><td><label><input type="radio" name="html_'.$num. |
'" value="1" />'.&mt('Yes').'</label> '. |
'" value="1" />'.&mt('Yes').'</label>'.(' ' x3). |
'<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>'. |
&mt('No').'</label></td>'. |
Line 1896 my @menu=
|
Line 1898 my @menu=
|
icon => 'sctr.png', |
icon => 'sctr.png', |
linktitle => 'Configure the roles hotlist.' |
linktitle => 'Configure the roles hotlist.' |
}, |
}, |
{ linktext => 'Display of Scientific Equations', |
{ linktext => 'Math display settings', |
url => '/adm/preferences?action=changetexenginepref', |
url => '/adm/preferences?action=changetexenginepref', |
permission => 'F', |
permission => 'F', |
#help => '', |
#help => '', |
icon => 'stat.png', |
icon => 'stat.png', |
linktitle => 'Change how Scientific Equations are displayed.' |
linktitle => 'Change how math is displayed.' |
}, |
}, |
] |
] |
}, |
}, |
Line 1990 push(@{ $menu[4]->{items} }, {
|
Line 1992 push(@{ $menu[4]->{items} }, {
|
}); |
}); |
|
|
} |
} |
if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { |
if (&can_toggle_debug()) { |
push(@{ $menu[4]->{items} }, { |
push(@{ $menu[4]->{items} }, { |
linktext => 'Toggle Debug Messages (Current:'.$env{'user.debug'}.')', |
linktext => 'Toggle Debug Messages (Currently '.($env{'user.debug'} ? 'on)' : 'off)'), |
url => '/adm/preferences?action=debugtoggle', |
url => '/adm/preferences?action=debugtoggle', |
permission => 'F', |
permission => 'F', |
#help => '', |
#help => '', |
Line 2091 sub handler {
|
Line 2093 sub handler {
|
}elsif($env{'form.action'} eq 'verify_and_change_coursepage'){ |
}elsif($env{'form.action'} eq 'verify_and_change_coursepage'){ |
&verify_and_change_coursepage($r); |
&verify_and_change_coursepage($r); |
}elsif($env{'form.action'} eq 'debugtoggle'){ |
}elsif($env{'form.action'} eq 'debugtoggle'){ |
&toggle_debug(); |
if (&can_toggle_debug()) { |
|
&toggle_debug(); |
|
} |
&print_main_menu($r); |
&print_main_menu($r); |
} |
} |
|
|
Line 2114 sub toggle_debug {
|
Line 2118 sub toggle_debug {
|
} |
} |
} |
} |
|
|
|
sub can_toggle_debug { |
|
my $can_toggle = 0; |
|
my $page = 'toggledebug'; |
|
if (&LONCAPA::lonauthcgi::can_view($page)) { |
|
$can_toggle = 1; |
|
} elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) { |
|
$can_toggle = 1; |
|
} |
|
return $can_toggle; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |