version 1.95, 2006/03/15 19:41:26
|
version 1.99, 2006/05/18 01:08:52
|
Line 30 use Apache::lontexconvert;
|
Line 30 use Apache::lontexconvert;
|
use Apache::lonfeedback; |
use Apache::lonfeedback; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use Apache::longroup; |
|
|
# receives a file name and path stub from username/userfiles/portfolio/ |
# receives a file name and path stub from username/userfiles/portfolio/ |
# returns an anchor tag consisting encoding filename and currentpath |
# returns an anchor tag consisting encoding filename and currentpath |
Line 501 sub upload {
|
Line 502 sub upload {
|
} else { |
} else { |
my $result=&Apache::lonnet::userfileupload('uploaddoc','', |
my $result=&Apache::lonnet::userfileupload('uploaddoc','', |
$port_path.$env{'form.currentpath'}); |
$port_path.$env{'form.currentpath'}); |
print STDERR "result was $result for $port_path.$env{'form.currentpath'}\n"; |
|
if ($result !~ m|^/uploaded/|) { |
if ($result !~ m|^/uploaded/|) { |
$r->print('<font color="red"> An errror occured ('.$result. |
$r->print('<font color="red"> An errror occured ('.$result. |
') while trying to upload '.&display_file().'</font><br />'); |
') while trying to upload '.&display_file().'</font><br />'); |
Line 649 sub handler {
|
Line 649 sub handler {
|
$group = $env{'form.group'}; |
$group = $env{'form.group'}; |
$group =~ s/\W//g; |
$group =~ s/\W//g; |
if ($group) { |
if ($group) { |
my %curr_groups = (); |
|
($uname,$udom) = &get_name_dom($group); |
($uname,$udom) = &get_name_dom($group); |
if (&Apache::loncommon::coursegroups(\%curr_groups,$udom,$uname, |
my %curr_groups = &Apache::longroup::coursegroups($udom,$uname, |
$group)) { |
$group); |
|
if (%curr_groups) { |
if (($view_permission) || (&Apache::lonnet::allowed('rgf', |
if (($view_permission) || (&Apache::lonnet::allowed('rgf', |
$env{'request.course.id'}.'/'.$group))) { |
$env{'request.course.id'}.'/'.$group))) { |
$portfolio_root = &get_portfolio_root($group); |
$portfolio_root = &get_portfolio_root($group); |
Line 680 sub handler {
|
Line 680 sub handler {
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
# Give the LON-CAPA page header |
# Give the LON-CAPA page header |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.&Apache::loncommon::head($title)."\n"); |
|
if ($env{"form.mode"} eq 'selectfile'){ |
if ($env{"form.mode"} eq 'selectfile'){ |
$r->print(&Apache::loncommon::bodytag($title,undef,undef,1)); |
$r->print(&Apache::loncommon::start_page($title,undef, |
|
{'only_body' => 1})); |
} else { |
} else { |
$r->print(&Apache::loncommon::bodytag($title)); |
$r->print(&Apache::loncommon::start_page($title)); |
} |
} |
$r->rflush(); |
$r->rflush(); |
if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){ |
if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){ |