Diff for /loncom/interface/loncommon.pm between versions 1.888 and 1.894

version 1.888, 2009/09/06 19:09:54 version 1.894, 2009/10/04 17:47:21
Line 655  function fix_domain (formname,udom,origd Line 655  function fix_domain (formname,udom,origd
     return;      return;
 }  }
   
 function userCheck (formname) {  
   
 }  
   
 $id_functions  $id_functions
 ENDUSERBRW  ENDUSERBRW
 }  }
Line 2968  sub aboutmewrapper { Line 2964  sub aboutmewrapper {
     if (!defined($username)  && !defined($domain)) {      if (!defined($username)  && !defined($domain)) {
         return;          return;
     }      }
     return '<a href="/adm/'.$domain.'/'.$username.'/aboutme"'.      return '<a href="/adm/'.$domain.'/'.$username.'/aboutme?forcestudent=1"'.
  ($target?' target="$target"':'').' title="'.&mt("View this user's personal information page").'">'.$link.'</a>';   ($target?' target="$target"':'').' title="'.&mt("View this user's personal information page").'">'.$link.'</a>';
 }  }
   
Line 3929  sub parse_block_record { Line 3925  sub parse_block_record {
 }  }
   
 sub blocking_status {  sub blocking_status {
   my $blocked;  
   my ($activity,$uname,$udom) = @_;    my ($activity,$uname,$udom) = @_;
   my %setters;    my %setters;
   
     # check for active blocking
   my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);    my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);
   if ($startblock && $endblock) {  
     $blocked = 1;  
   }  
   if(!wantarray) {  
     return $blocked;  
   }  
   my $output;  
   my $querystring;  
   $querystring = "?activity=$activity";  
   
       $output .= <<"END_MYBLOCK";    my $blocked = $startblock && $endblock ? 1 : 0;
 <script type="text/javascript">  
 // <![CDATA[    # caller just wants to know whether a block is active
     if (!wantarray) { return $blocked; }
   
     # build a link to a popup window containing the details
     my $querystring  = "?activity=$activity";
     # $uname and $udom decide whose portfolio the user is trying to look at
        $querystring .= "&amp;udom=$udom"      if $udom;
        $querystring .= "&amp;uname=$uname"    if $uname;
   
     my $output .= <<'END_MYBLOCK';
     function openWindow(url, wdwName, w, h, toolbar,scrollbar) {      function openWindow(url, wdwName, w, h, toolbar,scrollbar) {
         var options = "width=" + w + ",height=" + h + ",";          var options = "width=" + w + ",height=" + h + ",";
         options += "resizable=yes,scrollbars="+scrollbar+",status=no,";          options += "resizable=yes,scrollbars="+scrollbar+",status=no,";
Line 3953  sub blocking_status { Line 3950  sub blocking_status {
         var newWin = window.open(url, wdwName, options);          var newWin = window.open(url, wdwName, options);
         newWin.focus();          newWin.focus();
     }      }
   
 // ]]>  
 </script>  
 END_MYBLOCK  END_MYBLOCK
   
     $output = Apache::lonhtmlcommon::scripttag($output);
     
   my $popupUrl = "/adm/blockingstatus/$querystring";    my $popupUrl = "/adm/blockingstatus/$querystring";
     my $text = mt('Communication Blocked');
   
   $output .= <<"END_BLOCK";    $output .= <<"END_BLOCK";
 <div class='LC_comblock'>  <div class='LC_comblock'>
   <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'    <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'
   title='Communication Blocked'>    title='$text'>
   <img class='LC_noBorder LC_middle' title='Communication Blocked' src='/res/adm/pages/comblock.png' alt='Communication Blocked'/></a>    <img class='LC_noBorder LC_middle' title='$text' src='/res/adm/pages/comblock.png' alt='$text'/></a>
   <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'     <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring' 
   title='Communication Blocked'>Communication Blocked</a>    title='$text'>$text</a>
 </div>  </div>
   
 END_BLOCK  END_BLOCK
Line 4047  sub determinedomain { Line 4046  sub determinedomain {
     my $domain=shift;      my $domain=shift;
     if (! $domain) {      if (! $domain) {
         # Determine domain if we have not been given one          # Determine domain if we have not been given one
         $domain = $Apache::lonnet::perlvar{'lonDefDomain'};          $domain = &Apache::lonnet::default_login_domain();
         if ($env{'user.domain'}) { $domain=$env{'user.domain'}; }          if ($env{'user.domain'}) { $domain=$env{'user.domain'}; }
         if ($env{'request.role.domain'}) {           if ($env{'request.role.domain'}) { 
             $domain=$env{'request.role.domain'};               $domain=$env{'request.role.domain'}; 
Line 4441  sub bodytag { Line 4440  sub bodytag {
   
     if ($env{'environment.remote'} eq 'off') {      if ($env{'environment.remote'} eq 'off') {
         # No Remote          # No Remote
  if ($env{'request.state'} eq 'construct') {          if ($env{'request.state'} eq 'construct') {
     $forcereg=1;              $forcereg=1;
  }          }
   
 #    if ($env{'request.state'} eq 'construct') {      #    if ($env{'request.state'} eq 'construct') {
 #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls      #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
 #    }      #    }
   
         my $titletable = '<table id="LC_title_bar">'          my $titletable = '<table id="LC_title_bar">'
                         ."<tr><td> $titleinfo $dc_info</td>"                              ."<tr><td> $titleinfo $dc_info</td>"
                         .'</tr></table>';                              .'</tr></table>';
   
  if ($no_nav_bar) {          if ($no_nav_bar) {
     $bodytag .= $titletable;              $bodytag .= $titletable;
  } else {          } else {
         $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />              $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />
             <em>$realm</em> $dc_info</div>| unless $env{'form.inhibitmenu'};                  <em>$realm</em> $dc_info</div>| unless $env{'form.inhibitmenu'};
   
     if ($env{'request.state'} eq 'construct') {  #SD $titletable is obsolete
                 $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable);  #SD            if ($env{'request.state'} eq 'construct') {
             } else {  #SD                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable);
                 $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable;  #SD            } else {
             }  #SD                $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable;
   #SD            }
                  if (   $env{'form.inhibitmenu'} eq 'yes' 
                      || $ENV{'REQUEST_URI'} eq '/adm/logout'
                      || $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
                      
                      return $bodytag;
                  }
   
                  $bodytag .= Apache::lonhtmlcommon::scripttag(
                                   Apache::lonmenu::utilityfunctions(),
                                   'start');
                  $bodytag .= Apache::lonmenu::primary_menu();
                  $bodytag .= Apache::lonmenu::secondary_menu();
                  #SD remove next line
                  #$bodytag .= Apache::lonmenu::menubuttons($forcereg);
                  $bodytag .= Apache::lonmenu::serverform();
                  $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); 
                  $bodytag .= Apache::lonmenu::innerregister($forcereg) if $forcereg;
         }          }
         return $bodytag;          return $bodytag;
     }      }
Line 4654  a:focus { Line 4671  a:focus {
   background: yellow     background: yellow 
 }  }
   
 hr {  
   clear: both;  
   color: $tabbg;  
   background-color: $tabbg;  
   height: 3px;  
   border: none;  
 }  
   
 form, .inline {   form, .inline { 
    display: inline;      display: inline; 
 }  }
Line 5006  table.LC_nested tr.LC_empty_row td { Line 5015  table.LC_nested tr.LC_empty_row td {
   padding: 8px;    padding: 8px;
 }  }
   
   table.LC_caption {
   }
   
 table.LC_nested tr.LC_empty_row td {  table.LC_nested tr.LC_empty_row td {
   padding: 4ex    padding: 4ex
 }  }
Line 6775  sub simple_error_page { Line 6787  sub simple_error_page {
     sub end_data_table_header_row {      sub end_data_table_header_row {
  return '</tr>'."\n";;   return '</tr>'."\n";;
     }      }
   
       sub data_table_caption {
           my $caption = shift;
           return "<caption class=\"LC_caption\">$caption</caption>";
       }
 }  }
   
 =pod  =pod

Removed from v.1.888  
changed lines
  Added in v.1.894


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