Diff for /loncom/interface/loncommon.pm between versions 1.889 and 1.890

version 1.889, 2009/09/07 13:11:33 version 1.890, 2009/09/25 13:51:58
Line 3925  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;    my $blocked = $startblock && $endblock ? 1 : 0;
   }  
   if(!wantarray) {    # caller just wants to know whether a block is active
     return $blocked;    if (!wantarray) { return $blocked; }
   }  
   my $output;    # build a link to a popup window containing the details
   my $querystring;    my $querystring  = "?activity=$activity";
   $querystring = "?activity=$activity";    # $uname and $udom decide whose portfolio the user is trying to look at
        $querystring .= "&udom=$udom"      if $udom;
       $output .= <<"END_MYBLOCK";       $querystring .= "&amp;uname=$uname"    if $uname;
 <script type="text/javascript">  
 // <![CDATA[    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 3949  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 5002  table.LC_nested tr.LC_empty_row td { Line 5005  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 6771  sub simple_error_page { Line 6777  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.889  
changed lines
  Added in v.1.890


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