version 1.536, 2012/12/06 13:54:47
|
version 1.539, 2013/05/05 00:10:16
|
Line 1536 sub inserteditinfo {
|
Line 1536 sub inserteditinfo {
|
</script> |
</script> |
FULLPAGE |
FULLPAGE |
if ($filetype eq 'html') { |
if ($filetype eq 'html') { |
if ($symb || $folderpath) { |
my $context; |
$deps_button = &Apache::lonhtmlcommon::dependencies_button()."\n"; |
if ($env{'request.course.id'}) { |
$initialize .= |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
&Apache::lonhtmlcommon::dependencycheck_js($symb,$itemtitle, |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
undef,$folderpath,$uri)."\n"; |
if ($uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E}) { |
|
$context = 'syllabus'; |
|
$deps_button = &Apache::lonhtmlcommon::dependencies_button()."\n"; |
|
$initialize .= |
|
&Apache::lonhtmlcommon::dependencycheck_js(undef,&mt('Syllabus'), |
|
$uri,undef, |
|
"/public/$cdom/$cnum/syllabus"). |
|
"\n"; |
|
} |
|
} |
|
unless ($context eq 'syllabus') { |
|
if ($symb || $folderpath) { |
|
$deps_button = &Apache::lonhtmlcommon::dependencies_button()."\n"; |
|
$initialize .= |
|
&Apache::lonhtmlcommon::dependencycheck_js($symb,$itemtitle, |
|
undef,$folderpath,$uri)."\n"; |
|
} |
} |
} |
$dragmath_button = '<span id="math_filecont">'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'</span>'; |
$dragmath_button = '<span id="math_filecont">'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'</span>'; |
$initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); |
$initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); |
Line 1667 sub handler {
|
Line 1683 sub handler {
|
my ($filetype,$breadcrumbtext); |
my ($filetype,$breadcrumbtext); |
if ($file =~ /\.(sty|css|js|txt|tex)$/) { |
if ($file =~ /\.(sty|css|js|txt|tex)$/) { |
$filetype=$1; |
$filetype=$1; |
$env{'request.uri'}=$request->uri; |
|
} else { |
} else { |
$filetype='html'; |
$filetype='html'; |
|
} |
|
unless ($env{'request.uri'}) { |
$env{'request.uri'}=$request->uri; |
$env{'request.uri'}=$request->uri; |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['todocs']); |
} |
} |
if ($filetype eq 'sty') { |
if ($filetype eq 'sty') { |
$breadcrumbtext = 'Style File Editor'; |
$breadcrumbtext = 'Style File Editor'; |
Line 1803 ENDNOTFOUND
|
Line 1822 ENDNOTFOUND
|
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/\Esupplemental/}) { |
if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','title']); |
['folderpath','title']); |
|
} elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) { |
|
$displayfile = &mt('Syllabus file: [_1]',$1); |
|
$itemtitle = &mt('Syllabus'); |
} |
} |
} |
} |
($symb,$itemtitle,$displayfile) = |
unless ($itemtitle) { |
&get_courseupload_hierarchy($request->uri, |
($symb,$itemtitle,$displayfile) = |
$env{'form.folderpath'},$env{'form.title'}); |
&get_courseupload_hierarchy($request->uri, |
|
$env{'form.folderpath'}, |
|
$env{'form.title'}); |
|
} |
} else { |
} else { |
$displayfile=~s/^\/[^\/]*//; |
$displayfile=~s/^\/[^\/]*//; |
} |
} |
Line 1877 sub get_courseupload_hierarchy {
|
Line 1902 sub get_courseupload_hierarchy {
|
while (@folders) { |
while (@folders) { |
my $folder=shift(@folders); |
my $folder=shift(@folders); |
my $foldername=shift(@folders); |
my $foldername=shift(@folders); |
|
$foldername =~ s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//; |
push(@pathitems,&unescape($foldername)); |
push(@pathitems,&unescape($foldername)); |
} |
} |
if ($title) { |
if ($title) { |