[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sat Mar 24 19:35:26 EDT 2012


raeburn		Sat Mar 24 23:35:26 2012 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Coding style: standard LON-CAPA indentation is 4 space.
    - Fix indentation in &blocking_status() -- added in rev. 1.854
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1060 loncom/interface/loncommon.pm:1.1061
--- loncom/interface/loncommon.pm:1.1060	Tue Mar 20 14:28:26 2012
+++ loncom/interface/loncommon.pm	Sat Mar 24 23:35:25 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1060 2012/03/20 14:28:26 bisitz Exp $
+# $Id: loncommon.pm,v 1.1061 2012/03/24 23:35:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4272,39 +4272,39 @@
 }
 
 sub blocking_status {
-  my ($activity,$uname,$udom) = @_;
-  my %setters;
+    my ($activity,$uname,$udom) = @_;
+    my %setters;
 
-  # check for active blocking
-  my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);
+# check for active blocking
+    my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom);
 
-  my $blocked = $startblock && $endblock ? 1 : 0;
+    my $blocked = $startblock && $endblock ? 1 : 0;
 
-  # 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 .= "&udom=$udom"      if $udom;
-     $querystring .= "&uname=$uname"    if $uname;
-
-  my $output .= <<'END_MYBLOCK';
-    function openWindow(url, wdwName, w, h, toolbar,scrollbar) {
-        var options = "width=" + w + ",height=" + h + ",";
-        options += "resizable=yes,scrollbars="+scrollbar+",status=no,";
-        options += "menubar=no,toolbar="+toolbar+",location=no,directories=no";
-        var newWin = window.open(url, wdwName, options);
-        newWin.focus();
-    }
+# 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 .= "&udom=$udom"      if $udom;
+    $querystring .= "&uname=$uname"    if $uname;
+
+    my $output .= <<'END_MYBLOCK';
+function openWindow(url, wdwName, w, h, toolbar,scrollbar) {
+    var options = "width=" + w + ",height=" + h + ",";
+    options += "resizable=yes,scrollbars="+scrollbar+",status=no,";
+    options += "menubar=no,toolbar="+toolbar+",location=no,directories=no";
+    var newWin = window.open(url, wdwName, options);
+    newWin.focus();
+}
 END_MYBLOCK
 
-  $output = Apache::lonhtmlcommon::scripttag($output);
+    $output = Apache::lonhtmlcommon::scripttag($output);
   
-  my $popupUrl = "/adm/blockingstatus/$querystring";
-  my $text = mt('Communication Blocked');
+    my $popupUrl = "/adm/blockingstatus/$querystring";
+    my $text = mt('Communication Blocked');
 
-  $output .= <<"END_BLOCK";
+    $output .= <<"END_BLOCK";
 <div class='LC_comblock'>
   <a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'
   title='$text'>
@@ -4315,7 +4315,7 @@
 
 END_BLOCK
 
-  return ($blocked, $output);
+    return ($blocked, $output);
 }
 
 ###############################################




More information about the LON-CAPA-cvs mailing list