version 1.328, 2012/10/31 12:54:13
|
version 1.330, 2012/11/08 18:37:44
|
Line 61 use Time::HiRes;
|
Line 61 use Time::HiRes;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
use HTML::Entities(); |
use HTML::Entities(); |
use LONCAPA; |
use LONCAPA qw(:DEFAULT :match); |
|
|
sub java_not_enabled { |
sub java_not_enabled { |
return "\n".'<span class="LC_error">'. |
return "\n".'<span class="LC_error">'. |
Line 1651 returns: nothing
|
Line 1651 returns: nothing
|
$description = |
$description = |
$env{'course.'.$env{'request.course.id'}.'.description'}; |
$env{'course.'.$env{'request.course.id'}.'.description'}; |
$no_mt_descr = 1; |
$no_mt_descr = 1; |
|
if ($env{'request.noversionuri'} =~ |
|
m{^/public/($match_domain)/($match_courseid)/syllabus$}) { |
|
unless (($env{'course.'.$env{'request.course.id'}.'.domain'} eq $1) && |
|
($env{'course.'.$env{'request.course.id'}.'.num'} eq $2)) { |
|
$description = 'Menu'; |
|
$no_mt_descr = 0; |
|
} |
|
} |
} |
} |
$menulink = { href =>'/adm/menu', |
$menulink = { href =>'/adm/menu', |
title =>'Go to main menu', |
title =>'Go to main menu', |
Line 1666 returns: nothing
|
Line 1674 returns: nothing
|
} |
} |
} |
} |
my $links; |
my $links; |
if ((&show_return_link) && (!$CourseBreadcrumbs)) { |
if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) { |
my $alttext = &mt('Go Back'); |
my $alttext = &mt('Go Back'); |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
{ href => '/adm/flip?postdata=return:', |
{ href => '/adm/flip?postdata=return:', |
Line 1701 returns: nothing
|
Line 1709 returns: nothing
|
# last breadcrumb is the first order heading of a page |
# last breadcrumb is the first order heading of a page |
# for course breadcrumbs it's just bold |
# for course breadcrumbs it's just bold |
|
|
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
if ($lasttext ne '') { |
$lasttext), {title => $lasttext}); |
$links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1', |
|
$lasttext), {title => $lasttext}); |
|
} |
|
|
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
Line 1723 returns: nothing
|
Line 1733 returns: nothing
|
# |
# |
|
|
|
|
|
if ($links ne '') { |
unless ($CourseBreadcrumbs) { |
unless ($CourseBreadcrumbs) { |
$links = &htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
$links = &htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
} else { |
} else { |
$links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); |
$links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); |
|
} |
} |
} |
|
|
|
|
Line 2925 PARAMSONE
|
Line 2936 PARAMSONE
|
if (itemid.offsetWidth != itemwstart) { |
if (itemid.offsetWidth != itemwstart) { |
listwchange = 1; |
listwchange = 1; |
} |
} |
THIRD |
|
if ($context eq 'docs') { |
|
$output .= <<"DOCSTWO"; |
|
if (activeTab == 'cc1') { |
|
if (document.getElementById('cc_hrule') != null) { |
|
document.getElementById('cc_hrule').style.width=actabw+"px"; |
|
} |
|
} else { |
|
if (activeTab == 'bb1') { |
|
if (document.getElementById('bb_hrule') != null) { |
|
document.getElementById('bb_hrule').style.width=actabw+"px"; |
|
} |
|
} else { |
|
if (activeTab == 'ee2') { |
|
if (document.getElementById('ee_hrule') != null) { |
|
document.getElementById('ee_hrule').style.width=actabw+"px"; |
|
} |
|
} |
|
} |
|
} |
|
DOCSTWO |
|
} |
|
$output .= <<"FOURTH"; |
|
} |
} |
if ((chkh == 1) || (listwchange)) { |
if ((chkh == 1) || (listwchange)) { |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
Line 3007 function callResize() {
|
Line 2995 function callResize() {
|
timer=setTimeout('resize_scrollbox("$names{'scroll'}","1","1")',500); |
timer=setTimeout('resize_scrollbox("$names{'scroll'}","1","1")',500); |
} |
} |
|
|
FOURTH |
THIRD |
return $output; |
return $output; |
} |
} |
|
|
Line 3041 ENDUTILITY
|
Line 3029 ENDUTILITY
|
} |
} |
|
|
sub jump_to_editres { |
sub jump_to_editres { |
my ($cfile,$home,$switchserver,$uploaded,$symb) = @_; |
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb) = @_; |
my $jscall; |
my $jscall; |
if ($switchserver) { |
if ($switchserver) { |
if ($symb && $home) { |
if ($symb && $home) { |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
&HTML::Entities::encode($env{'request.role'},'"<>&').'&'. |
&HTML::Entities::encode($env{'request.role'},'"<>&'). |
'symb='.&HTML::Entities::encode($env{'request.symb'},'"<>&'); |
'&symb='.&HTML::Entities::encode($symb,'"<>&'); |
if ($uploaded) { |
if ($forceedit) { |
$cfile .= '&forceedit=1'; |
$cfile .= '&forceedit=1'; |
} |
} |
|
if ($forcereg) { |
|
$cfile .= '&register=1'; |
|
} |
$jscall = "need_switchserver('$cfile');"; |
$jscall = "need_switchserver('$cfile');"; |
} |
} |
} else { |
} else { |
if ($uploaded) { |
unless ($cfile =~ m{^/priv/}) { |
$cfile .= '?forceedit=1'; |
if ($symb) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb"; |
|
} |
|
if ($forceedit) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'forceedit=1'; |
|
} |
|
if ($forcereg) { |
|
$cfile .= (($cfile=~/\?/)?'&':'?').'register=1'; |
|
} |
} |
} |
$jscall = "go('$cfile')"; |
$jscall = "go('$cfile')"; |
} |
} |