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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 22 Dec 2007 00:47:26 -0000


raeburn		Fri Dec 21 19:47:26 2007 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  - Disable access/section change actions for course roles displayed when in domain context for this release.
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.22 loncom/interface/lonuserutils.pm:1.23
--- loncom/interface/lonuserutils.pm:1.22	Fri Dec 21 19:39:52 2007
+++ loncom/interface/lonuserutils.pm	Fri Dec 21 19:47:25 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.22 2007/12/22 00:39:52 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.23 2007/12/22 00:47:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1518,13 +1518,14 @@
                             my $space = ', ';
                             if ($format eq 'html' || $format eq 'view') {
                                 $spanstart = '<span class="LC_nobreak">';
-                                if ($permission->{'cusr'}) {
-                                    if ($numcids > 1) {
-                                        $spanstart .= '<input type="radio" name="'.$item.'" value="'.$cid.'" &nbsp; />';
-                                    } else {
-                                        $spanstart .= '<input type="hidden" name="'.$item.'" value="'.$cid.'" &nbsp; />';
-                                    }
-                                }
+                                # FIXME: actions on courses disabled for now
+#                                if ($permission->{'cusr'}) {
+#                                    if ($numcids > 1) {
+#                                        $spanstart .= '<input type="radio" name="'.$item.'" value="'.$cid.'" &nbsp; />';
+#                                    } else {
+#                                        $spanstart .= '<input type="hidden" name="'.$item.'" value="'.$cid.'" &nbsp; />';
+#                                    }
+#                                }
                                 $spanend = '</span><br />';
                                 $space = ',&nbsp;';
                             }
@@ -2367,6 +2368,10 @@
                 chgsec   => "Change section associated with user roles",
     );
     my ($output,$options,%choices);
+    # FIXME Disable actions for now for roletype=course in domain context
+    if ($context eq 'domain' && $setting eq 'course') {
+        return;
+    }
     if ($statusmode eq 'Any') {
         $options .= '
 <option value="chgdates">'.$lt{'chgdates'}.'</option>';