version 1.463, 2011/11/07 20:05:55
|
version 1.466, 2011/11/27 22:51:28
|
Line 2845 sub handler {
|
Line 2845 sub handler {
|
# |
# |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','pagepath', |
['folderpath','pagepath', |
'pagesymb','forcesupplement','forcestandard']); |
'pagesymb','forcesupplement','forcestandard', |
|
'symb','command']); |
|
|
# standard=1: this is a "new-style" course with an uploaded map as top level |
# standard=1: this is a "new-style" course with an uploaded map as top level |
# standard=2: this is a "old-style" course, and there is nothing we can do |
# standard=2: this is a "old-style" course, and there is nothing we can do |
Line 2872 sub handler {
|
Line 2873 sub handler {
|
my $containertag; |
my $containertag; |
my $uploadtag; |
my $uploadtag; |
|
|
|
# Do we directly jump somewhere? |
|
|
|
if ($env{'form.command'} eq 'direct') { |
|
my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'}); |
|
if ($resurl=~/\.(sequence|page)$/) { |
|
$mapurl=$resurl; |
|
} |
|
my $maptitle = &Apache::lonnet::gettitle($mapurl); |
|
$mapurl=~s{^.*/([^/]+)\.(\w+)$}{$1}; |
|
my $type=$2; |
|
my $path='default&'.&Apache::lonhtmlcommon::entity_encode('Main Course Documents'). |
|
'&default&...::::&'. |
|
&Apache::lonhtmlcommon::entity_encode($mapurl).'&'. |
|
&Apache::lonhtmlcommon::entity_encode($maptitle).'::::'; |
|
if ($type eq 'sequence') { |
|
$env{'form.folderpath'}=$path; |
|
$env{'form.pagepath'}=''; |
|
} else { |
|
$env{'form.pagepath'}=$path; |
|
$env{'form.folderpath'}=''; |
|
} |
|
} |
|
|
# Where do we store these for when we come back? |
# Where do we store these for when we come back? |
my $stored_folderpath='docs_folderpath'; |
my $stored_folderpath='docs_folderpath'; |
if ($supplementalflag) { |
if ($supplementalflag) { |
$stored_folderpath='docs_sup_folderpath'; |
$stored_folderpath='docs_sup_folderpath'; |
} |
} |
|
|
# No folderpath, no pagepath, see if we have something stored |
# No folderpath, no pagepath, see if we have something stored |
if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) { |
if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) { |
&Apache::loncommon::restore_course_settings($stored_folderpath, |
&Apache::loncommon::restore_course_settings($stored_folderpath, |