[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 18 Nov 2003 22:21:00 -0000
albertel Tue Nov 18 17:21:00 2003 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- Mark Lucas fix for BUG#2153
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.136 loncom/interface/lonparmset.pm:1.137
--- loncom/interface/lonparmset.pm:1.136 Tue Nov 18 17:18:42 2003
+++ loncom/interface/lonparmset.pm Tue Nov 18 17:21:00 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.136 2003/11/18 22:18:42 albertel Exp $
+# $Id: lonparmset.pm,v 1.137 2003/11/18 22:21:00 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -285,7 +285,7 @@
sub startpage {
- my ($r,$id,$udom,$csec,$uname,$have_assesments)=@_;
+ my ($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader)=@_;
my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',
'onUnload="pclose()"');
@@ -354,7 +354,9 @@
$selscript
</head>
$bodytag
+ENDHEAD
+ unless ($trimheader) {$r->print(<<ENDHEAD2);
<form method="post" action="/adm/parmset" name="envform">
<h4>$lt{'cep'}</h4>
<input type="submit" name="crsenv" value="$lt{'scep'}" />
@@ -370,9 +372,12 @@
<input type="submit" name="overview" value="$lt{'mcap'}" />
</form>
<hr />
+ENDHEAD2
+}
+ $r->print(<<ENDHEAD3);
<form method="post" action="/adm/parmset" name="parmform">
<h4>$lt{'captm'}</h4>
-ENDHEAD
+ENDHEAD3
if (!$have_assesments) {
$r->print('<font color="red">'.&mt('There are no assesment parameters in this course to set.').'</font><br />');
@@ -689,6 +694,7 @@
my $pssymb='';
my $parmlev='';
+ my $trimheader='';
my $prevvisit=$ENV{'form.prevvisit'};
# unless ($parmlev==$ENV{'form.parmlev'}) {
@@ -711,11 +717,13 @@
if (!@pscat) { @pscat=('all'); }
$pschp='';
$parmlev = 'full';
+ $trimheader='yes';
} elsif ($ENV{'form.symb'}) {
$pssymb=$ENV{'form.symb'};
if (!@pscat) { @pscat=('all'); }
$pschp='';
$parmlev = 'full';
+ $trimheader='yes';
} else {
$ENV{'form.url'}='';
}
@@ -905,7 +913,7 @@
my $have_assesments=1;
if (scalar(keys(%allkeys)) eq 0) { $have_assesments=0; }
- &startpage($r,$id,$udom,$csec,$uname,$have_assesments);
+ &startpage($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader);
if (!$have_assesments) {
untie(%bighash);