[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 30 May 2005 17:56:43 -0000
albertel Mon May 30 13:56:43 2005 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- style police came over for the holidays
- Really Really want ENV here for these elements not env
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.193 loncom/interface/lonparmset.pm:1.194
--- loncom/interface/lonparmset.pm:1.193 Mon May 30 13:50:18 2005
+++ loncom/interface/lonparmset.pm Mon May 30 13:56:39 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.193 2005/05/30 17:50:18 albertel Exp $
+# $Id: lonparmset.pm,v 1.194 2005/05/30 17:56:39 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -385,8 +385,7 @@
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',
'onUnload="pclose()"');
- my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Table');
+ my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table');
my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '.
&Apache::loncommon::selectstudent_link('parmform','uname','udom');
my $selscript=&Apache::loncommon::studentbrowser_javascript();
@@ -843,7 +842,7 @@
if (($env{'form.command'} eq 'set') && ($env{'form.url'})
&& (!$env{'form.dis'})) {
my $url=$env{'form.url'};
- $url=~s-^http://($env{'SERVER_NAME'}|$env{'HTTP_HOST'})--;
+ $url=~s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--;
$pssymb=&Apache::lonnet::symbread($url);
if (!@pscat) { @pscat=('all'); }
$pschp='';
@@ -1514,8 +1513,8 @@
my $setoutput='';
my $bodytag=&Apache::loncommon::bodytag(
'Set Course Environment Parameters');
- my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Edit Course Environment');
+ my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,
+ 'Edit Course Environment');
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -1850,8 +1849,7 @@
'Set/Modify Course Assessment Parameters');
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
- my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Overview');
+ my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview');
my $html=&Apache::lonxml::xmlbegin();
$r->print(<<ENDOVER);
$html
@@ -2166,7 +2164,7 @@
return OK;
}
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['action','state']);
+ ['action','state']);
# ----------------------------------------------------------- Clear out garbage
@@ -2183,21 +2181,16 @@
%maptitles=();
&Apache::lonhtmlcommon::clear_breadcrumbs();
- &Apache::lonhtmlcommon::add_breadcrumb
- ({href=>"/adm/parmset",
- text=>"Parameter Manager",
- faq=>9,bug=>'Instructor Interface',});
+ &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset",
+ text=>"Parameter Manager",
+ faq=>9,
+ bug=>'Instructor Interface'});
# ----------------------------------------------------- Needs to be in a course
- if (($env{'request.course.id'}) &&
- (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||
+ my $parm_permission =
+ (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||
&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'.
- $env{'request.course.sec'})
- )) {
-
- my $parm_permission =
- (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) ||
- &Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'.
$env{'request.course.sec'}));
+ if ($env{'request.course.id'} && $parm_permission) {
# Start Page
&Apache::loncommon::content_type($r,'text/html');
@@ -2214,25 +2207,22 @@
} elsif (! exists($env{'form.action'})) {
$r->print(&header());
- $r->print(&Apache::lonhtmlcommon::breadcrumbs
- (undef,'Parameter Manager'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs(undef,
+ 'Parameter Manager'));
&print_main_menu($r,$parm_permission);
} elsif ($env{'form.action'} eq 'crsenv' && $parm_permission) {
- &Apache::lonhtmlcommon::add_breadcrumb
- ({href=>'/adm/parmset?action=crsenv',
- text=>"Course Environment"});
- $r->print(&Apache::lonhtmlcommon::breadcrumbs
- (undef,'Edit Course Environment'));
+ &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=crsenv',
+ text=>"Course Environment"});
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs(undef,
+ 'Edit Course Environment'));
&crsenv($r);
} elsif ($env{'form.action'} eq 'setoverview' && $parm_permission) {
- &Apache::lonhtmlcommon::add_breadcrumb
- ({href=>'/adm/parmset?action=setoverview',
- text=>"Overview Mode"});
+ &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview',
+ text=>"Overview Mode"});
&overview($r);
} elsif ($env{'form.action'} eq 'settable' && $parm_permission) {
- &Apache::lonhtmlcommon::add_breadcrumb
- ({href=>'/adm/parmset?action=settable',
- text=>"Table Mode"});
+ &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',
+ text=>"Table Mode"});
&assessparms($r);
}