--- loncom/interface/lonpreferences.pm 2008/05/14 18:21:40 1.119
+++ loncom/interface/lonpreferences.pm 2008/07/18 12:36:11 1.125
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.119 2008/05/14 18:21:40 www Exp $
+# $Id: lonpreferences.pm,v 1.125 2008/07/18 12:36:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -108,9 +108,14 @@ sub wysiwygchanger {
}
my $switchoff=&mt('Disable WYSIWYG editor');
my $switchon=&mt('Enable WYSIWYG editor');
+ my $warning='';
+ if ($env{'user.adv'}) {
+ $warning.="
".&mt("The WYSIWYG editor only supports simple HTML and is in many cases unsuited for advanced authoring. In a number of cases, it may destroy advanced authoring involving LaTeX and script function calls.")."
";
+ }
$r->print(<
+$warning
@@ -189,35 +194,45 @@ sub texenginechanger {
my %userenv = &Apache::lonnet::get('environment',['texengine']);
my $texengine=$userenv{'texengine'};
- my $pref=&mt('Preferred method to display Math');
my %mathchoices=('' => 'Default',
- 'tth' => 'TeX to HTML',
+ 'tth' => 'tth (TeX to HTML)',
#'ttm' => 'TeX to MathML',
'jsMath' => 'jsMath',
- 'mimetex' => 'Convert to Images'
+ 'mimetex' => 'mimetex (Convert to Images)'
);
my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine',
%mathchoices);
my $jsMath_start=&Apache::lontexconvert::jsMath_header();
- my $change=&mt('Change');
- $r->print(<
+ my %lt=&Apache::lonlocal::texthash(
+ 'headline' => 'Change Math Preferences',
+ 'preftxt' => 'Preferred method to display Math',
+ 'change' => 'Change',
+ 'exmpl' => 'Examples',
+ 'jsmath' => 'jsMath:',
+ 'tth' => 'tth (TeX to HTML):',
+ 'mimetex' => 'mimetex (Convert to Images):',
+ );
+ $r->print(<$lt{'headline'}
-Examples:
-
TeX to HTML
-
+
+$lt{'preftxt'}:
+$selectionbox
-
jsMath
+
+
+
+$lt{'exmpl'}
+
+
$lt{'jsmath'}
+
$jsMath_start
-
+
+
+
$lt{'mimetex'}
+
+
-
Convert to Images
-
-
+
+
$lt{'tth'}
+
+
ENDLSCREEN
if ($env{'environment.texengine'} ne 'jsMath') {
@@ -618,25 +638,19 @@ sub domcoordchanger {
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
- ('environment',['domcoord.author','domcoord.cc']);
+ ('environment',['domcoord.author']);
my $constchecked='';
- my $courseschecked='';
if ($userenv{'domcoord.author'} eq 'blocked') {
$constchecked='checked="checked"';
}
- if ($userenv{'domcoord.cc'} eq 'blocked') {
- $courseschecked='checked="checked"';
- }
- my $text=&mt('By default, the Domain Coordinator can enter your courses and construction space.');
+ my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
my $construction=&mt('Block access to construction space');
- my $courses=&mt('Block access to courses');
my $change=&mt('Change');
$r->print(<
$text
-
ENDSCREEN
@@ -646,12 +660,10 @@ sub verify_and_change_domcoord {
my $r = shift;
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
- my %domcoord=('domcoord.author' => '','domcoord.cc' => '');
+ my %domcoord=('domcoord.author' => '');
if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; }
- if ($env{'form.courses'}) { $domcoord{'domcoord.cc'}='blocked'; }
&Apache::lonnet::put('environment',\%domcoord);
- &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'},
- 'environment.domcoord.cc' => $domcoord{'domcoord.cc'}});
+ &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}});
$r->print(&mt('Registering Domain Coordinator access restrictions.'));
}
@@ -1917,7 +1929,8 @@ sub handler {
text => 'Register Clicker'},
printmenu => 'yes',
}));
- if ($env{'user.adv'}) {
+ my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']);
+ if (keys(%author_roles) > 0) {
push (@Options,({ action => 'changedomcoord',
linktext => 'Restrict Domain Coordinator Access',
href => '/adm/preferences',