[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

raeburn raeburn at source.lon-capa.org
Thu May 22 10:32:48 EDT 2014


raeburn		Thu May 22 14:32:48 2014 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - Check there are domains and course types for which user has request
    rights.
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.306 loncom/auth/lonroles.pm:1.307
--- loncom/auth/lonroles.pm:1.306	Thu May 22 14:17:53 2014
+++ loncom/auth/lonroles.pm	Thu May 22 14:32:48 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.306 2014/05/22 14:17:53 raeburn Exp $
+# $Id: lonroles.pm,v 1.307 2014/05/22 14:32:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1482,10 +1482,17 @@
             if (@reqdoms == 1 || @showtypes > 0) {
                 $requrl .= '&state=crstype&action=new';
             }
-            $r->print('<h3>'.&mt('Request creation of a course or community').'</h3>'.
-                      '<p>'.&mt('You have rights to request the creation of courses and/or communities in the following domain(s):').'<ul>'.
-                      $output.
-                      '</ul>'.&mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.','<a href="'.$requrl.'">','</a>').'</p>');
+            if ($output) {
+                $r->print('<h3>'.&mt('Request creation of a course or community').'</h3>'.
+                          '<p>'.
+                          &mt('You have rights to request the creation of courses and/or communities in the following domain(s):').
+                          '<ul>'.
+                          $output.
+                          '</ul>'.
+                          &mt('Use the [_1]request form[_2] to submit a request for creation of a new course or community.',
+                              '<a href="'.$requrl.'">','</a>').
+                          '</p>');
+            }
         }
     } elsif (!$env{'user.adv'}) {
        if ($inrole) {




More information about the LON-CAPA-cvs mailing list