Diff for /loncom/interface/lonmenu.pm between versions 1.275 and 1.278

version 1.275, 2009/07/13 08:24:21 version 1.278, 2009/08/06 04:09:45
Line 165  sub initlittle { Line 165  sub initlittle {
   
 sub menubuttons {  sub menubuttons {
     my $forcereg=shift;      my $forcereg=shift;
     my $registration=shift;  
     my $titletable=shift;      my $titletable=shift;
 #  #
 # Early-out for pages that should not have a menu, triggered by query string "inhibitmenu=yes"  # Early-out for pages that should not have a menu, triggered by query string "inhibitmenu=yes"
Line 288  ENDRELOAD Line 287  ENDRELOAD
 <li><a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a></li>  <li><a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a></li>
 ENDCRELOAD  ENDCRELOAD
         }          }
         my $reg='';      my $reg     = $forcereg ? &innerregister($forcereg,$titletable) : '';
         if ($registration) {      my $form    = &serverform();
            $reg=&innerregister($forcereg,$titletable);      my $utility = &utilityfunctions();
         }  
         my $form=&serverform();      #Prepare the message link that indicates the arrival of new mail
  my $utility=&utilityfunctions();      my $messagelink = Apache::lonmsg::mynewmail() ? "Message (new)" : "Message";
          $messagelink = '<a href="javascript:go(\'/adm/communicate\');">'
                         . mt($messagelink) .'</a>';
   
  my $messagelink = "";      my $helplink = &Apache::loncommon::top_nav_help('Help');
  if(&Apache::lonmsg::mynewmail()){  
  $messagelink = '<a href="javascript:go(\'/adm/communicate\');">Message(new)</a>'  
  }else{  
  $messagelink = '<a href="javascript:go(\'/adm/communicate\');">Message</a>'  
  }  
         my $helplink=&Apache::loncommon::top_nav_help('Help');  
  return (<<ENDINLINEMENU);   return (<<ENDINLINEMENU);
 <script type="text/javascript">  <script type="text/javascript">
 // BEGIN LON-CAPA Internal  
 // <![CDATA[  // <![CDATA[
   // BEGIN LON-CAPA Internal
 $utility  $utility
 // ]]>  // ]]>
 </script>  </script>
Line 362  sub registerurl { Line 357  sub registerurl {
          (!&Apache::lonnet::is_on_map(           (!&Apache::lonnet::is_on_map(
    &unescape($env{'request.noversionuri'})))) &&     &unescape($env{'request.noversionuri'})))) &&
         (!$forcereg))) {          (!$forcereg))) {
   return $result.    return
           '<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>'.$force_title;          $result
          .'<script type="text/javascript">'."\n"
          .'// <![CDATA['."\n"
          .'function LONCAPAreg(){;} function LONCAPAstale(){}'."\n"
          .'// ]]>'."\n"
          .'</script>'
          .$force_title;
     }      }
 # Graphical display after login only  # Graphical display after login only
     if ($env{'request.registered'} && !$forcereg) { return ''; }      if ($env{'request.registered'} && !$forcereg) { return ''; }
Line 389  sub innerregister { Line 390  sub innerregister {
     my $reopen=&Apache::lonmenu::reopenmenu();      my $reopen=&Apache::lonmenu::reopenmenu();
   
     my $newmail='';      my $newmail='';
     my $breadcrumb;  
   
     if (&Apache::lonmsg::newmail() && !$noremote) {       if (&Apache::lonmsg::newmail() && !$noremote) { 
         # We have new mail and remote is up          # We have new mail and remote is up
         $newmail= 'swmenu.setstatus("you have","messages");';          $newmail= 'swmenu.setstatus("you have","messages");';
     }       } 
   
       my $breadcrumb;
     if ($noremote      if ($noremote
      && ($env{'request.symb'})        && ($env{'request.symb'}) 
      && ($env{'request.course.id'})) {       && ($env{'request.course.id'})) {
Line 716  ENDREGTEXT Line 718  ENDREGTEXT
     $result = (<<ENDREGTHIS);      $result = (<<ENDREGTHIS);
             
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 // BEGIN LON-CAPA Internal  // BEGIN LON-CAPA Internal
 var swmenu=null;  var swmenu=null;
   
Line 751  var swmenu=null; Line 754  var swmenu=null;
       }        }
   
 // END LON-CAPA Internal   // END LON-CAPA Internal 
   // ]]>
 </script>  </script>
 ENDREGTHIS  ENDREGTHIS
         }          }
Line 766  ENDDONOTREGTEXT Line 770  ENDDONOTREGTEXT
            $result = (<<ENDDONOTREGTHIS);             $result = (<<ENDDONOTREGTHIS);
   
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 // BEGIN LON-CAPA Internal  // BEGIN LON-CAPA Internal
 var swmenu=null;  var swmenu=null;
   
Line 790  var swmenu=null; Line 795  var swmenu=null;
     }      }
   
 // END LON-CAPA Internal  // END LON-CAPA Internal
   // ]]>
 </script>  </script>
 ENDDONOTREGTHIS  ENDDONOTREGTHIS
        }         }
Line 860  sub startupremote { Line 866  sub startupremote {
     my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');      my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');
     return(<<ENDREMOTESTARTUP);      return(<<ENDREMOTESTARTUP);
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 var timestart;  var timestart;
 function wheelswitch() {  function wheelswitch() {
     if (typeof(document.wheel) != 'undefined') {      if (typeof(document.wheel) != 'undefined') {
Line 910  function main() { Line 917  function main() {
    wait();     wait();
 }  }
   
   // ]]>
 </script>  </script>
 ENDREMOTESTARTUP  ENDREMOTESTARTUP
 }  }
Line 917  ENDREMOTESTARTUP Line 925  ENDREMOTESTARTUP
 sub setflags() {  sub setflags() {
     return(<<ENDSETFLAGS);      return(<<ENDSETFLAGS);
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
     menuloaded=0;      menuloaded=0;
     tim=0;      tim=0;
   // ]]>
 </script>  </script>
 ENDSETFLAGS  ENDSETFLAGS
 }  }
Line 927  sub maincall() { Line 937  sub maincall() {
     if ($env{'environment.remote'} eq 'off') { return ''; }      if ($env{'environment.remote'} eq 'off') { return ''; }
     return(<<ENDMAINCALL);      return(<<ENDMAINCALL);
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
     main();      main();
   // ]]>
 </script>  </script>
 ENDMAINCALL  ENDMAINCALL
 }  }
Line 969  sub reopenmenu { Line 981  sub reopenmenu {
 sub open {  sub open {
     my $returnval='';      my $returnval='';
     if ($env{'environment.remote'} eq 'off') {       if ($env{'environment.remote'} eq 'off') { 
  return '<script type="text/javascript">self.name="loncapaclient";</script>';   return
           '<script type="text/javascript">'."\n"
          .'// <![CDATA['."\n"
          .'self.name="loncapaclient";'."\n"
          .'// ]]>'."\n"
          .'</script>';
     }      }
     my $menuname = &get_menu_name();      my $menuname = &get_menu_name();
           
Line 982  sub open { Line 999  sub open {
 #}  #}
 #ENDRESIZE  #ENDRESIZE
 #    }  #    }
     $returnval.=(<<ENDOPEN);      $returnval=(<<ENDOPEN);
   // <![CDATA[
 window.status='Opening LON-CAPA Remote Control';  window.status='Opening LON-CAPA Remote Control';
 var menu=window.open("/res/adm/pages/menu.html?inhibitmenu=yes","$menuname",  var menu=window.open("/res/adm/pages/menu.html?inhibitmenu=yes","$menuname",
 "height=375,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");  "height=375,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
 self.name='loncapaclient';  self.name='loncapaclient';
   // ]]>
 ENDOPEN  ENDOPEN
     return '<script type="text/javascript">'.$returnval.'</script>';      return '<script type="text/javascript">'.$returnval.'</script>';
 }  }
Line 1252  sub rawconfig { Line 1271  sub rawconfig {
                     $output.=&clear($row,$col);                      $output.=&clear($row,$col);
                     next;                      next;
                 }                  }
             } elsif ($prt eq 'reqcrs') {              } elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) {
                   next if (&Apache::lonnet::allowed('mky',$requested_domain));
                   if (($prt eq 'reqcrsnsc') && ($show_course))   {
                       next;
                   }
                   if (($prt eq 'reqcrsshc') && (!$show_course)) {
                       next;
                   }
                 my $showreqcrs = 0;                  my $showreqcrs = 0;
                 foreach my $type ('official','unofficial') {                  foreach my $type ('official','unofficial','community') {
                     if (&Apache::lonnet::usertools_access($env{'user.name'},                      if (&Apache::lonnet::usertools_access($env{'user.name'},
                                                     $env{'user.domain'},                                                      $env{'user.domain'},
                                                     $type,undef,'requestcourses')) {                                                      $type,undef,'requestcourses')) {
Line 1289  sub close { Line 1315  sub close {
     my $menuname = &get_menu_name();      my $menuname = &get_menu_name();
     return(<<ENDCLOSE);      return(<<ENDCLOSE);
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 window.status='Accessing Remote Control';  window.status='Accessing Remote Control';
 menu=window.open("/adm/rat/empty.html","$menuname",  menu=window.open("/adm/rat/empty.html","$menuname",
                  "height=350,width=150,scrollbars=no,menubar=no");                   "height=350,width=150,scrollbars=no,menubar=no");
Line 1298  menu.autologout=0; Line 1325  menu.autologout=0;
 window.status='Closing Remote Control';  window.status='Closing Remote Control';
 menu.close();  menu.close();
 window.status='Done.';  window.status='Done.';
   // ]]>
 </script>  </script>
 ENDCLOSE  ENDCLOSE
 }  }

Removed from v.1.275  
changed lines
  Added in v.1.278


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