version 1.608, 2016/07/01 19:59:36
|
version 1.609, 2016/10/31 12:59:03
|
Line 3888 END
|
Line 3888 END
|
} |
} |
} |
} |
|
|
my ($editlink,$extresform); |
my ($editlink,$extresform,$anchor); |
my $orig_url = $url; |
my $orig_url = $url; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
Line 3912 END
|
Line 3912 END
|
$url='/adm/wrapper'.$url; |
$url='/adm/wrapper'.$url; |
} |
} |
if (&Apache::lonnet::symbverify($symb,$url)) { |
if (&Apache::lonnet::symbverify($symb,$url)) { |
$url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb); |
my $shownsymb = $symb; |
|
if ($isexternal) { |
|
if ($url =~ /^([^#]+)#([^#]+)$/) { |
|
$url = $1; |
|
$anchor = $2; |
|
if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) { |
|
$shownsymb = $1.&escape('#').$anchor; |
|
} |
|
} |
|
} |
|
$url.=(($url=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&'); |
} else { |
} else { |
$url=''; |
$url=''; |
} |
} |
Line 4032 $form_end;
|
Line 4042 $form_end;
|
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
$line.='<a href="'.$url.'"><img src="'.$icon.'" alt="" class="LC_icon" /></a>'; |
$line.='<a href="'.$url.'"><img src="'.$icon.'" alt="" class="LC_icon" /></a>'; |
} elsif ($url) { |
} elsif ($url) { |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes', |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
|
(($anchor ne '')?'#'.&HTML::Entities::encode($anchor,'"<>&'):''), |
'<img src="'.$icon.'" alt="" class="LC_icon" />',600,500); |
'<img src="'.$icon.'" alt="" class="LC_icon" />',600,500); |
} else { |
} else { |
$line.='<img src="'.$icon.'" alt="" class="LC_icon" />'; |
$line.='<img src="'.$icon.'" alt="" class="LC_icon" />'; |
Line 4041 $form_end;
|
Line 4052 $form_end;
|
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
$line.='<a href="'.$url.'">'.$title.'</a>'; |
$line.='<a href="'.$url.'">'.$title.'</a>'; |
} elsif ($url) { |
} elsif ($url) { |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes', |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
|
(($anchor ne '')?'#'.&HTML::Entities::encode($anchor,'"<>&'):''), |
$title,600,500); |
$title,600,500); |
} else { |
} else { |
$line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>'; |
$line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>'; |
Line 6542 sub editing_js {
|
Line 6554 sub editing_js {
|
my ($map,$id,$res)=&Apache::lonnet::decode_symb($caller); |
my ($map,$id,$res)=&Apache::lonnet::decode_symb($caller); |
$res = &Apache::lonnet::clutter($res); |
$res = &Apache::lonnet::clutter($res); |
if (&Apache::lonnet::is_on_map($res)) { |
if (&Apache::lonnet::is_on_map($res)) { |
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='. |
my ($url,$anchor); |
|
if ($res =~ /^([^#]+)#([^#]+)$/) { |
|
$url = $1; |
|
$anchor = $2; |
|
if (($caller =~ m{^([^#]+)\Q#$anchor\E$})) { |
|
$caller = $1.&escape('#').$anchor; |
|
} |
|
} |
|
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"').'?symb='. |
&HTML::Entities::encode($caller,'<>&"'); |
&HTML::Entities::encode($caller,'<>&"'); |
|
if ($anchor ne '') { |
|
$backtourl .= '#'.&HTML::Entities::encode($anchor,'<>&"'); |
|
} |
$backtourl = &Apache::loncommon::escape_single($backtourl); |
$backtourl = &Apache::loncommon::escape_single($backtourl); |
} else { |
} else { |
$backtourl = '/adm/navmaps'; |
$backtourl = '/adm/navmaps'; |