version 1.620, 2017/02/18 14:16:47
|
version 1.621, 2017/02/18 23:39:15
|
Line 3970 END
|
Line 3970 END
|
} |
} |
} |
} |
|
|
my ($editlink,$extresform,$anchor,$hiddenres); |
my ($editlink,$extresform,$anchor,$hiddenres,$nomodal); |
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 3992 END
|
Line 3992 END
|
$url='/adm/wrapper'.$url; |
$url='/adm/wrapper'.$url; |
} elsif ($url=~m{^/adm/$coursedom/$coursenum/\d+/exttools?$}) { |
} elsif ($url=~m{^/adm/$coursedom/$coursenum/\d+/exttools?$}) { |
$url='/adm/wrapper'.$url; |
$url='/adm/wrapper'.$url; |
|
} elsif ($url eq "/public/$coursedom/$coursenum/syllabus") { |
|
if (($ENV{'SERVER_PORT'} == 443) && |
|
($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { |
|
$url .= '?usehttp=1'; |
|
$nomodal = 1; |
|
} |
} |
} |
if (&Apache::lonnet::symbverify($symb,$url)) { |
if (&Apache::lonnet::symbverify($symb,$url)) { |
my $shownsymb = $symb; |
my $shownsymb = $symb; |
Line 4049 END
|
Line 4055 END
|
$url=''; |
$url=''; |
} |
} |
} |
} |
} elsif ($supplementalflag) { |
} elsif ($supplementalflag) { |
if ($isexternal) { |
if ($isexternal) { |
if ($url =~ /^([^#]+)#([^#]+)$/) { |
if ($url =~ /^([^#]+)#([^#]+)$/) { |
$url = $1; |
$url = $1; |
$anchor = $2; |
$anchor = $2; |
} |
} |
|
} elsif ($url =~ m{^\Q/public/$coursedom/$coursenum/syllabus\E}) { |
|
if (($ENV{'SERVER_PORT'} == 443) && |
|
($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://})) { |
|
$url .= (($url =~ /\?/) ? '&':'?').'usehttp=1'; |
|
$nomodal = 1; |
|
} |
} |
} |
} |
} |
my ($rand_pick_text,$rand_order_text,$hiddenfolder); |
my ($rand_pick_text,$rand_order_text,$hiddenfolder); |
Line 4205 $form_end;
|
Line 4217 $form_end;
|
$reinit = &mt('(re-initialize course to access)'); |
$reinit = &mt('(re-initialize course to access)'); |
} |
} |
$line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink; |
$line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink; |
|
my $link; |
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 4215 $form_end;
|
Line 4228 $form_end;
|
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
} |
} |
} |
} |
$line.=&Apache::loncommon::modal_link(&js_escape($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
$link = &js_escape($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
(($anchor ne '')?$anchor:'')), |
(($anchor ne '')?$anchor:'')); |
'<img src="'.$icon.'" alt="" class="LC_icon" />',600,500); |
if ($nomodal) { |
|
$line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'. |
|
'<img src="'.$icon.'" alt="" class="LC_icon" border="0" /></a>'; |
|
} else { |
|
$line.=&Apache::loncommon::modal_link($link, |
|
'<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 4225 $form_end;
|
Line 4244 $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(&js_escape($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
if ($nomodal) { |
(($anchor ne '')?$anchor:'')), |
$line.='<a href="#" onclick="javascript:window.open('."'$link','syllabuspreview','height=400,width=500,scrollbars=1,resizable=1,menubar=0,location=1')".'; return false;" />'. |
$title,600,500); |
$title.'</a>'; |
|
} else { |
|
$line.=&Apache::loncommon::modal_link($link,$title,600,500); |
|
} |
} elsif (($hiddenfolder) || ($hiddenres)) { |
} elsif (($hiddenfolder) || ($hiddenres)) { |
$line.=$title.' <span class="LC_warning LC_docs_reinit_warn">'.&mt('(Hidden)').'</span>'; |
$line.=$title.' <span class="LC_warning LC_docs_reinit_warn">'.&mt('(Hidden)').'</span>'; |
} else { |
} else { |