[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Fri, 11 Feb 2005 00:18:17 -0000
banghart Thu Feb 10 19:18:17 2005 EDT
Modified files:
/loncom/interface portfolio.pm
Log:
Address bug 3917. Suppress menu when portfolio in select mode
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.72 loncom/interface/portfolio.pm:1.73
--- loncom/interface/portfolio.pm:1.72 Tue Jan 18 12:45:06 2005
+++ loncom/interface/portfolio.pm Thu Feb 10 19:18:14 2005
@@ -121,7 +121,7 @@
} else {
$r->print('<td><input type="checkbox" name="selectfile" value="'.$filename.'" />
<a href="/adm/portfolio?rename='.$filename.'&currentpath='.$current_path.'">Rename</a></td>
- <td><a href="/adm/portfolio?meta='.$filename.'&currentpath='.$current_path.'">Meta</a>
+ <td><a href="/adm/portfolio'.$current_path.$filename.'.meta">Meta</a>
</td>');
}
$r->print('<td><img src="'.$iconpath.'unknown.gif"></td>');
@@ -499,9 +499,19 @@
sub handler {
# this handles file management
my $r = shift;
+ my $bodytag;
my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'},
$ENV{'user.name'}).
'/userfiles/portfolio';
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+ ['selectfile','currentpath','meta',
+ 'currentfile','action','fieldname','mode','rename']);
+ if ($ENV{"form.mode"} eq 'selectfile'){
+ $bodytag = &Apache::loncommon::bodytag('Portfolio Manager',undef,undef,1);
+ } else {
+ $bodytag = &Apache::loncommon::bodytag('Portfolio Manager');
+ }
+
&Apache::loncommon::no_cache($r);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -509,11 +519,8 @@
$r->print('<html><head><title>'.
&mt('Portfolio Manager').
"</title></head>\n".
- &Apache::loncommon::bodytag('Portfolio Manager'));
+ $bodytag);
$r->rflush();
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['selectfile','currentpath','meta',
- 'currentfile','action','fieldname','mode','rename']);
if (($ENV{'form.storeupl'} eq 'Upload') & (!$ENV{'form.uploaddoc.filename'})){
$r->print('<font color="red"> No file was selected to upload.'.
'To upload a file, click <strong>Browse...</strong>'.