Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.329 and 1.330

version 1.329, 2012/11/03 23:32:37 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 3018  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.'&amp;role='.              $cfile = '/adm/switchserver?otherserver='.$home.'&amp;role='.
                      &HTML::Entities::encode($env{'request.role'},'"<>&').'&amp;'.                       &HTML::Entities::encode($env{'request.role'},'"<>&').
                     'symb='.&HTML::Entities::encode($env{'request.symb'},'"<>&');                      '&amp;symb='.&HTML::Entities::encode($symb,'"<>&');
             if ($uploaded) {              if ($forceedit) {
                 $cfile .= '&amp;forceedit=1';                  $cfile .= '&amp;forceedit=1';
             }              }
               if ($forcereg) {
                   $cfile .= '&amp;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=~/\?/)?'&amp;':'?')."symb=$symb"; 
               }
               if ($forceedit) {
                   $cfile .= (($cfile=~/\?/)?'&amp;':'?').'forceedit=1';
               }
               if ($forcereg) {
                   $cfile .= (($cfile=~/\?/)?'&amp;':'?').'register=1';
               }
         }          }
         $jscall = "go('$cfile')";          $jscall = "go('$cfile')";
     }      }

Removed from v.1.329  
changed lines
  Added in v.1.330


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>