--- loncom/interface/londocs.pm 2008/05/22 17:47:33 1.306 +++ loncom/interface/londocs.pm 2008/05/28 14:21:30 1.307 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.306 2008/05/22 17:47:33 www Exp $ +# $Id: londocs.pm,v 1.307 2008/05/28 14:21:30 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2513,6 +2513,21 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['folderpath','pagepath', 'pagesymb']); +# No folderpath, no pagepath, see if we have something stored + if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) { + &Apache::loncommon::restore_course_settings('docs_folderpath', + {'folderpath' => 'scalar'}); + } + if (!$env{'form.folderpath'}) { + &Apache::loncommon::restore_course_settings('docs_folderpath', + {'pagepath' => 'scalar'}); + } + if ($env{'form.pagepath'}) { + $env{'form.folderpath'}=''; + } + &Apache::loncommon::store_course_settings('docs_folderpath', + {'pagepath' => 'scalar', + 'folderpath' => 'scalar'}); if ($env{'form.folderpath'}) { my (@folderpath)=split('&',$env{'form.folderpath'}); $env{'form.foldername'}=&unescape(pop(@folderpath));