[LON-CAPA-cvs] cvs: loncom /interface londocs.pm lonpreferences.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 21 May 2003 00:48:27 -0000
www Tue May 20 20:48:27 2003 EDT
Modified files:
/loncom/interface londocs.pm lonpreferences.pm
Log:
Disable "New Problem" function in DOCS unless $ENV{'user.debug'} is on.
For 0.99.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.55 loncom/interface/londocs.pm:1.56
--- loncom/interface/londocs.pm:1.55 Tue May 13 11:41:20 2003
+++ loncom/interface/londocs.pm Tue May 20 20:48:27 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.55 2003/05/13 15:41:20 www Exp $
+# $Id: londocs.pm,v 1.56 2003/05/21 00:48:27 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -539,7 +539,13 @@
$iconpath = $r->dir_config('lonIconsURL') . "/";
my $now=time;
-
+#
+# FIXME: hack to disable new problem
+#
+ my $noeggforyou='';
+ unless ($ENV{'user.debug'}) {
+ $noeggforyou='alert("Sorry, not implemented yet."); return 0;';
+ }
# print screen
$r->print(<<ENDDOCUMENT);
<html>
@@ -575,6 +581,7 @@
}
function makesmpproblem() {
+ $noeggforyou
var title=prompt('Listed Title for the Problem');
if (title) {
this.document.forms.newsmpproblem.importdetail.value=
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.23 loncom/interface/lonpreferences.pm:1.24
--- loncom/interface/lonpreferences.pm:1.23 Wed Apr 30 11:49:45 2003
+++ loncom/interface/lonpreferences.pm Tue May 20 20:48:27 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.23 2003/04/30 15:49:45 matthew Exp $
+# $Id: lonpreferences.pm,v 1.24 2003/05/21 00:48:27 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -651,7 +651,9 @@
} elsif ($ENV{'form.action'} eq 'verify_and_change_colors') {
&verify_and_change_colors($r);
} elsif ($ENV{'form.action'} eq 'debugtoggle') {
- if ($ENV{'user.name'} eq 'albertel' ) {
+ if (($ENV{'user.name'} eq 'albertel' ) ||
+ ($ENV{'user.name'} eq 'kortemey' ) ||
+ ($ENV{'user.name'} eq 'korte')) {
if ($ENV{'user.debug'}) {
&Apache::lonnet::delenv('user\.debug');
} else {
@@ -706,7 +708,9 @@
</form>
ENDCOLORFORM
- if ($ENV{'user.name'} eq 'albertel') {
+ if (($ENV{'user.name'} eq 'albertel' ) ||
+ ($ENV{'user.name'} eq 'kortemey' ) ||
+ ($ENV{'user.name'} eq 'korte')) {
$r->print(<<ENDDEBUG);
<form name="client" action="/adm/preferences" method="post">
<input type="hidden" name="action" value="debugtoggle" />