version 1.1075.2.11, 2012/08/01 04:34:00
|
version 1.1085, 2012/07/06 22:46:06
|
Line 5060 sub bodytag {
|
Line 5060 sub bodytag {
|
|
|
|
|
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { |
unless ($env{'request.noversionuri'} =~ m{/res/adm/pages/bookmarkmenu/}) { |
if ($dc_info) { |
if ($dc_info) { |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
$dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|; |
} |
} |
$bodytag .= qq|<div id="LC_nav_bar">$name $role<br /> |
$bodytag .= qq|<div id="LC_nav_bar">$name $role<br /> |
<em>$realm</em> $dc_info</div>|; |
<em>$realm</em> $dc_info</div>|; |
|
} |
|
return $bodytag; |
return $bodytag; |
} |
} |
|
|
Line 6554 ul#LC_secondary_menu {
|
Line 6552 ul#LC_secondary_menu {
|
margin: 0; |
margin: 0; |
width: 100%; |
width: 100%; |
text-align: left; |
text-align: left; |
float: left; |
|
} |
} |
|
|
ul#LC_secondary_menu li { |
ul#LC_secondary_menu li { |
font-weight: bold; |
font-weight: bold; |
line-height: 1.8em; |
line-height: 1.8em; |
border-right: 1px solid black; |
|
vertical-align: middle; |
|
float: left; |
|
} |
|
|
|
ul#LC_secondary_menu li.LC_hoverable:hover, ul#LC_secondary_menu li.hover { |
|
background-color: $data_table_light; |
|
} |
|
|
|
ul#LC_secondary_menu li a { |
|
padding: 0 0.8em; |
padding: 0 0.8em; |
} |
|
|
|
ul#LC_secondary_menu li ul { |
|
display: none; |
|
} |
|
|
|
ul#LC_secondary_menu li:hover ul, ul#LC_secondary_menu li.hover ul { |
|
display: block; |
|
position: absolute; |
|
margin: 0; |
|
padding: 0; |
|
list-style:none; |
|
float: none; |
|
background-color: $data_table_light; |
|
z-index: 2; |
|
margin-left: -1px; |
|
} |
|
|
|
ul#LC_secondary_menu li ul li { |
|
font-size: 90%; |
|
vertical-align: top; |
|
border-left: 1px solid black; |
|
border-right: 1px solid black; |
border-right: 1px solid black; |
background-color: $data_table_light |
display: inline; |
list-style:none; |
vertical-align: middle; |
float: none; |
|
} |
|
|
|
ul#LC_secondary_menu li ul li:hover, ul#LC_secondary_menu li ul li.hover { |
|
background-color: $data_table_dark; |
|
} |
} |
|
|
ul.LC_TabContent { |
ul.LC_TabContent { |
Line 9404 sub ask_for_embedded_content {
|
Line 9364 sub ask_for_embedded_content {
|
$toplevel = $url; |
$toplevel = $url; |
if ($args->{'context'} eq 'paste') { |
if ($args->{'context'} eq 'paste') { |
($cdom,$cnum) = ($url =~ m{^\Q/uploaded/\E($match_domain)/($match_courseid)/}); |
($cdom,$cnum) = ($url =~ m{^\Q/uploaded/\E($match_domain)/($match_courseid)/}); |
($path) = |
($path) = |
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
$fileloc = &Apache::lonnet::filelocation('',$toplevel); |
$fileloc = &Apache::lonnet::filelocation('',$toplevel); |
$fileloc =~ s{^/}{}; |
$fileloc =~ s{^/}{}; |
} |
} |
} |
} |
} elsif ($actionurl eq '/adm/dependencies') { |
} elsif ($actionurl eq '/adm/dependencies') { |
if ($env{'request.course.id'} ne '') { |
if ($env{'request.course.id'} ne '') { |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
Line 9598 sub ask_for_embedded_content {
|
Line 9558 sub ask_for_embedded_content {
|
($args->{'context'} eq 'paste')) { |
($args->{'context'} eq 'paste')) { |
$counter = scalar(keys(%existing)); |
$counter = scalar(keys(%existing)); |
$numpathchg = scalar(keys(%pathchanges)); |
$numpathchg = scalar(keys(%pathchanges)); |
return ($output,$counter,$numpathchg,\%existing); |
return ($output,$counter,$numpathchg,\%existing); |
} |
} |
foreach my $embed_file (sort {lc($a) cmp lc($b)} keys(%newfiles)) { |
foreach my $embed_file (sort {lc($a) cmp lc($b)} keys(%newfiles)) { |
if ($actionurl eq '/adm/dependencies') { |
if ($actionurl eq '/adm/dependencies') { |
Line 11247 sub process_extracted_files {
|
Line 11207 sub process_extracted_files {
|
my (%referrer,%orphaned,%todelete,%todeletedir,%newdest,%newseqid); |
my (%referrer,%orphaned,%todelete,%todeletedir,%newdest,%newseqid); |
if ($numitems) { |
if ($numitems) { |
for (my $i=1; $i<=$numitems; $i++) { |
for (my $i=1; $i<=$numitems; $i++) { |
next if ($env{'form.archive_'.$i} eq 'dependency'); |
|
my $path = $env{'form.archive_content_'.$i}; |
my $path = $env{'form.archive_content_'.$i}; |
if ($path =~ /^\Q$pathtocheck\E/) { |
if ($path =~ /^\Q$pathtocheck\E/) { |
if ($env{'form.archive_'.$i} eq 'discard') { |
if ($env{'form.archive_'.$i} eq 'discard') { |
Line 11298 sub process_extracted_files {
|
Line 11257 sub process_extracted_files {
|
my ($outtext,$errtext) = |
my ($outtext,$errtext) = |
&LONCAPA::map::storemap('/uploaded/'.$docudom.'/'. |
&LONCAPA::map::storemap('/uploaded/'.$docudom.'/'. |
$docuname.'/'.$folders{$outer}. |
$docuname.'/'.$folders{$outer}. |
'.'.$containers{$outer},1,1); |
'.'.$containers{$outer},1); |
$newseqid{$i} = $newidx; |
$newseqid{$i} = $newidx; |
unless ($errtext) { |
unless ($errtext) { |
$result .= '<li>'.&mt('Folder: [_1] added to course',$docstitle).'</li>'."\n"; |
$result .= '<li>'.&mt('Folder: [_1] added to course',$docstitle).'</li>'."\n"; |
Line 11331 sub process_extracted_files {
|
Line 11290 sub process_extracted_files {
|
my ($outtext,$errtext)= |
my ($outtext,$errtext)= |
&LONCAPA::map::storemap('/uploaded/'.$docudom.'/'. |
&LONCAPA::map::storemap('/uploaded/'.$docudom.'/'. |
$docuname.'/'.$folders{$outer}. |
$docuname.'/'.$folders{$outer}. |
'.'.$containers{$outer},1,1); |
'.'.$containers{$outer},1); |
unless ($errtext) { |
unless ($errtext) { |
if (-e "$prefix$dir/$docstype/$mapinner{$outer}/$newidx/$title") { |
if (-e "$prefix$dir/$docstype/$mapinner{$outer}/$newidx/$title") { |
$result .= '<li>'.&mt('File: [_1] added to course',$docstitle).'</li>'."\n"; |
$result .= '<li>'.&mt('File: [_1] added to course',$docstitle).'</li>'."\n"; |
Line 11339 sub process_extracted_files {
|
Line 11298 sub process_extracted_files {
|
} |
} |
} |
} |
} |
} |
} |
} elsif ($env{'form.archive_'.$i} eq 'dependency') { |
} else { |
my ($title) = ($path =~ m{/([^/]+)$}); |
$warning .= &mt('Item extracted from archive: [_1] has unexpected path.',$path).'<br />'; |
$referrer{$i} = $env{'form.archive_dependent_on_'.$i}; |
} |
if ($env{'form.archive_'.$referrer{$i}} eq 'display') { |
} |
if (ref($dirorder{$i}) eq 'ARRAY') { |
for (my $i=1; $i<=$numitems; $i++) { |
my ($itemidx,$fullpath,$relpath); |
next unless ($env{'form.archive_'.$i} eq 'dependency'); |
|
my $path = $env{'form.archive_content_'.$i}; |
|
if ($path =~ /^\Q$pathtocheck\E/) { |
|
my ($title) = ($path =~ m{/([^/]+)$}); |
|
$referrer{$i} = $env{'form.archive_dependent_on_'.$i}; |
|
if ($env{'form.archive_'.$referrer{$i}} eq 'display') { |
|
if (ref($dirorder{$i}) eq 'ARRAY') { |
|
my ($itemidx,$fullpath,$relpath); |
|
if (ref($dirorder{$referrer{$i}}) eq 'ARRAY') { |
|
my $container = $dirorder{$referrer{$i}}->[-1]; |
|
for (my $j=0; $j<@{$dirorder{$i}}; $j++) { |
for (my $j=0; $j<@{$dirorder{$i}}; $j++) { |
if ($dirorder{$i}->[$j] eq $container) { |
if (ref($dirorder{$referrer{$i}}) eq 'ARRAY') { |
$itemidx = $j; |
my $container = $dirorder{$referrer{$i}}->[-1]; |
|
for (my $j=0; $j<@{$dirorder{$i}}; $j++) { |
|
if ($dirorder{$i}->[$j] eq $container) { |
|
$itemidx = $j; |
|
} |
|
} |
} |
} |
} |
} |
} |
if ($itemidx ne '') { |
if ($itemidx eq '') { |
if (grep(/^\Q$referrer{$i}\E$/,@archdirs)) { |
$itemidx = 0; |
if ($mapinner{$referrer{$i}}) { |
} |
$fullpath = "$prefix$dir/$docstype/$mapinner{$referrer{$i}}"; |
if (grep(/^\Q$referrer{$i}\E$/,@archdirs)) { |
for (my $j=$itemidx; $j<@{$dirorder{$i}}; $j++) { |
if ($mapinner{$referrer{$i}}) { |
if (grep(/^\Q$dirorder{$i}->[$j]\E$/,@archdirs)) { |
$fullpath = "$prefix$dir/$docstype/$mapinner{$referrer{$i}}"; |
unless (defined($newseqid{$dirorder{$i}->[$j]})) { |
for (my $j=$itemidx; $j<@{$dirorder{$i}}; $j++) { |
$fullpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
if (grep(/^\Q$dirorder{$i}->[$j]\E$/,@archdirs)) { |
$relpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
unless (defined($newseqid{$dirorder{$i}->[$j]})) { |
if (!-e $fullpath) { |
$fullpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
mkdir($fullpath,0755); |
$relpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
} |
if (!-e $fullpath) { |
} |
mkdir($fullpath,0755); |
} else { |
|
last; |
} |
} |
} |
} |
} else { |
|
last; |
|
} |
} |
} |
} elsif ($newdest{$referrer{$i}}) { |
} |
$fullpath = $newdest{$referrer{$i}}; |
} elsif ($newdest{$referrer{$i}}) { |
for (my $j=$itemidx; $j<@{$dirorder{$i}}; $j++) { |
$fullpath = $newdest{$referrer{$i}}; |
if ($env{'form.archive_'.$dirorder{$i}->[$j]} eq 'discard') { |
for (my $j=$itemidx; $j<@{$dirorder{$i}}; $j++) { |
$orphaned{$i} = $env{'form.archive_'.$dirorder{$i}->[$j]}; |
if ($env{'form.archive_'.$dirorder{$i}->[$j]} eq 'discard') { |
last; |
$orphaned{$i} = $env{'form.archive_'.$dirorder{$i}->[$j]}; |
} elsif (grep(/^\Q$dirorder{$i}->[$j]\E$/,@archdirs)) { |
last; |
unless (defined($newseqid{$dirorder{$i}->[$j]})) { |
} elsif (grep(/^\Q$dirorder{$i}->[$j]\E$/,@archdirs)) { |
$fullpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
unless (defined($newseqid{$dirorder{$i}->[$j]})) { |
$relpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
$fullpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
if (!-e $fullpath) { |
$relpath .= '/'.$titles{$dirorder{$i}->[$j]}; |
mkdir($fullpath,0755); |
if (!-e $fullpath) { |
} |
mkdir($fullpath,0755); |
} |
|
} else { |
|
last; |
} |
} |
} |
} |
} else { |
|
last; |
|
} |
} |
} |
if ($fullpath ne '') { |
} |
if (-e "$prefix$path") { |
if ($fullpath ne '') { |
system("mv $prefix$path $fullpath/$title"); |
if (-e "$prefix$path") { |
} |
system("mv $prefix$path $fullpath/$title"); |
if (-e "$fullpath/$title") { |
} |
my $showpath; |
if (-e "$fullpath/$title") { |
if ($relpath ne '') { |
my $showpath; |
$showpath = "$relpath/$title"; |
if ($relpath ne '') { |
} else { |
$showpath = "$relpath/$title"; |
$showpath = "/$title"; |
} else { |
} |
$showpath = "/$title"; |
$result .= '<li>'.&mt('[_1] included as a dependency',$showpath).'</li>'."\n"; |
|
} |
|
unless ($ishome) { |
|
my $fetch = "$fullpath/$title"; |
|
$fetch =~ s/^\Q$prefix$dir\E//; |
|
$prompttofetch{$fetch} = 1; |
|
} |
} |
} |
$result .= '<li>'.&mt('[_1] included as a dependency',$showpath).'</li>'."\n"; |
|
} |
|
unless ($ishome) { |
|
my $fetch = "$fullpath/$title"; |
|
$fetch =~ s/^\Q$prefix$dir\E//; |
|
$prompttofetch{$fetch} = 1; |
|
} |
} |
} |
} |
|
} elsif ($env{'form.archive_'.$referrer{$i}} eq 'discard') { |
|
$warning .= &mt('[_1] is a dependency of [_2], which was discarded.', |
|
$path,$env{'form.archive_content_'.$referrer{$i}}).'<br />'; |
} |
} |
} elsif ($env{'form.archive_'.$referrer{$i}} eq 'discard') { |
|
$warning .= &mt('[_1] is a dependency of [_2], which was discarded.', |
|
$path,$env{'form.archive_content_'.$referrer{$i}}).'<br />'; |
|
} |
} |
} else { |
} else { |
$warning .= &mt('Item extracted from archive: [_1] has unexpected path.',$path).'<br />'; |
$warning .= &mt('Item extracted from archive: [_1] has unexpected path.',$path).'<br />'; |
} |
} |
} |
} |
if (keys(%todelete)) { |
if (keys(%todelete)) { |