--- loncom/interface/lonpreferences.pm 2008/05/12 23:47:43 1.118
+++ loncom/interface/lonpreferences.pm 2008/05/28 01:45:48 1.122
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.118 2008/05/12 23:47:43 www Exp $
+# $Id: lonpreferences.pm,v 1.122 2008/05/28 01:45:48 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -210,7 +210,7 @@ sub texenginechanger {
Examples:
TeX to HTML
-
+
jsMath
$jsMath_start
@@ -230,12 +230,12 @@ if (jsMath.nofonts == 1) {
+'');
}
-
+
Convert to Images
-
+
ENDLSCREEN
if ($env{'environment.texengine'} ne 'jsMath') {
@@ -609,6 +609,44 @@ sub verify_and_change_clicker {
$r->print(&mt('Registering clickers: [_1]',$newclickers));
}
+################################################################
+# Domcoord Access Subroutines #
+################################################################
+
+sub domcoordchanger {
+ my $r = shift;
+ my $user = $env{'user.name'};
+ my $domain = $env{'user.domain'};
+ my %userenv = &Apache::lonnet::get
+ ('environment',['domcoord.author']);
+ my $constchecked='';
+ if ($userenv{'domcoord.author'} eq 'blocked') {
+ $constchecked='checked="checked"';
+ }
+ my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
+ my $construction=&mt('Block access to construction space');
+ my $change=&mt('Change');
+ $r->print(<
+
+$text
+
+
+
+ENDSCREEN
+}
+
+sub verify_and_change_domcoord {
+ my $r = shift;
+ my $user = $env{'user.name'};
+ my $domain = $env{'user.domain'};
+ my %domcoord=('domcoord.author' => '');
+ if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; }
+ &Apache::lonnet::put('environment',\%domcoord);
+ &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}});
+ $r->print(&mt('Registering Domain Coordinator access restrictions.'));
+}
+
#################################################################
## Lock Subroutines #
#################################################################
@@ -1871,6 +1909,23 @@ sub handler {
text => 'Register Clicker'},
printmenu => 'yes',
}));
+ if ($env{'user.adv'}) {
+ push (@Options,({ action => 'changedomcoord',
+ linktext => 'Restrict Domain Coordinator Access',
+ href => '/adm/preferences',
+ subroutine => \&domcoordchanger,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changedomcoord',
+ text => 'Restrict Domain Coordinator Access'},
+ },
+ { action => 'verify_and_change_domcoord',
+ subroutine => \&verify_and_change_domcoord,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changedomcoord',
+ text => 'Restrict Domain Coordinator Access'},
+ printmenu => 'yes',
+ }));
+ }
push (@Options,({ action => 'lockwarning',
subroutine => \&lockwarning,
@@ -1906,7 +1961,7 @@ sub handler {
}));
}
- if ($env{'user.name'} =~ /^(albertel|fox|foxr|koretemey|korte|hallmat3|turtle|raeburn)$/) {
+ if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {
push (@Options,({ action => 'debugtoggle',
printmenu => 'yes',
subroutine => \&toggle_debug,