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

raeburn raeburn at source.lon-capa.org
Sun Oct 23 13:02:56 EDT 2016


raeburn		Sun Oct 23 17:02:56 2016 EDT

  Modified files:              
    /loncom/interface	lonblockingmenu.pm 
  Log:
  - Coding style -- message about "No current blocks"  moved to section of
    code used for display of any existing blocks.
  
  
Index: loncom/interface/lonblockingmenu.pm
diff -u loncom/interface/lonblockingmenu.pm:1.23 loncom/interface/lonblockingmenu.pm:1.24
--- loncom/interface/lonblockingmenu.pm:1.23	Sun Oct 23 16:17:52 2016
+++ loncom/interface/lonblockingmenu.pm	Sun Oct 23 17:02:56 2016
@@ -2,7 +2,7 @@
 # Routines for configuring blocking of access to collaborative functions, 
 # and specific resources during an exam
 #
-# $Id: lonblockingmenu.pm,v 1.23 2016/10/23 16:17:52 raeburn Exp $
+# $Id: lonblockingmenu.pm,v 1.24 2016/10/23 17:02:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -658,20 +658,19 @@
         &Apache::loncourserespicker::get_navmap_object($crstype,'examblock');
 
 # --------------------------------------------- Interface for adding a new block
-    if ($readonly) {
-        if (!$blockcount) {
-            $r->print($lt{'ncbc'}.'<br />');
-        }
-    } else {
+    unless ($readonly) {
         &display_addblocker_table($r,$blockcount,\%ltext,\%intervals,
                                   $navmap,$errormsg);
         if ($blockcount > 0) {
             $r->print('</div>');
         }
     }
-
 # ------------------------------------------------ Interface for existing blocks
-    if ($blockcount > 0) {
+    if (!$blockcount) {
+        if ($readonly) {
+            $r->print($lt{'ncbc'}.'<br />');
+        }
+    } else {
         &display_blocker_status($r,\%records,\%ltext,\%intervals,
                                 $navmap,$errormsg,$blockcount,$readonly);
     }




More information about the LON-CAPA-cvs mailing list