version 1.432, 2010/08/14 04:28:21
|
version 1.433, 2010/08/16 00:30:47
|
Line 2721 sub handler {
|
Line 2721 sub handler {
|
'<input type="hidden" name="pagesymb" value="" />'; |
'<input type="hidden" name="pagesymb" value="" />'; |
$uploadtag = '<input type="hidden" name="pagepath" value="'.&HTML::Entities::encode($env{'form.pagepath'},'<>&"').'" />'. |
$uploadtag = '<input type="hidden" name="pagepath" value="'.&HTML::Entities::encode($env{'form.pagepath'},'<>&"').'" />'. |
'<input type="hidden" name="pagesymb" value="'.&HTML::Entities::encode($env{'form.pagesymb'},'<>&"').'" />'; |
'<input type="hidden" name="pagesymb" value="'.&HTML::Entities::encode($env{'form.pagesymb'},'<>&"').'" />'; |
|
} else { |
|
my $folderpath=$env{'form.folderpath'}; |
|
if (!$folderpath) { |
|
if ($env{'form.folder'} eq '' || |
|
$env{'form.folder'} eq 'supplemental') { |
|
$folderpath='default&'. |
|
&escape(&mt('Main '.$crstype.' Documents')); |
|
} |
|
} |
|
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
|
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
} |
} |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
$showdoc='/'.$1; |
$showdoc='/'.$1; |
Line 3013 ERFORM
|
Line 3024 ERFORM
|
'sl' => 'Show Log' |
'sl' => 'Show Log' |
); |
); |
|
|
my $folderpath=$env{'form.folderpath'}; |
|
if (!$folderpath) { |
|
if ($env{'form.folder'} eq '' || |
|
$env{'form.folder'} eq 'supplemental') { |
|
$folderpath='default&'. |
|
&escape(&mt('Main '.$crstype.' Documents')); |
|
} |
|
} |
|
unless ($env{'form.pagepath'}) { |
|
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
|
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
|
} |
|
$r->print(<<HIDDENFORM); |
$r->print(<<HIDDENFORM); |
<form name="renameform" method="post" action="/adm/coursedocs"> |
<form name="renameform" method="post" action="/adm/coursedocs"> |
<input type="hidden" name="title" /> |
<input type="hidden" name="title" /> |
Line 3589 sub editing_js {
|
Line 3588 sub editing_js {
|
p_ctr2b => '?[_98]' |
p_ctr2b => '?[_98]' |
); |
); |
|
|
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $docs_folderpath = $env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.folderpath'}; |
|
my $docs_pagepath = $env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.pagepath'}; |
|
my $toplevelmain = 'default&Main%20'.$crstype.'%20Documents'; |
|
my $toplevelsupp = 'supplemental&Supplemental%20'.$crstype.'%20Documents'; |
|
|
return <<ENDNEWSCRIPT; |
return <<ENDNEWSCRIPT; |
function makenewfolder(targetform,folderseq) { |
function makenewfolder(targetform,folderseq) { |
var foldername=prompt('$lt{"p_mnf"}','$lt{"t_mnf"}'); |
var foldername=prompt('$lt{"p_mnf"}','$lt{"t_mnf"}'); |
Line 3817 function showPage(current, pageId, nav,
|
Line 3822 function showPage(current, pageId, nav,
|
current.className = 'active'; |
current.className = 'active'; |
currentData = document.getElementById(pageId); |
currentData = document.getElementById(pageId); |
currentData.style.display = 'block'; |
currentData.style.display = 'block'; |
|
if (nav == 'mainnav') { |
|
var storedpath = "$docs_folderpath"; |
|
if (storedpath == '') { |
|
storedpath = "$docs_pagepath"; |
|
} |
|
var reg = new RegExp("^supplemental"); |
|
if (pageId == 'mainCourseDocuments') { |
|
if (reg.test(storedpath)) { |
|
document.simpleedit.folderpath.value = '$toplevelmain'; |
|
document.uploaddocument.folderpath.value = '$toplevelmain'; |
|
document.newext.folderpath.value = '$toplevelmain'; |
|
} |
|
} else { |
|
if (!reg.test(storedpath)) { |
|
document.simpleedit.folderpath.value = '$toplevelsupp'; |
|
document.supuploaddocument.folderpath.value = '$toplevelsupp'; |
|
document.supnewext.folderpath.value = '$toplevelsupp'; |
|
} |
|
} |
|
} |
return false; |
return false; |
} |
} |
|
|