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

raeburn raeburn at source.lon-capa.org
Sat Dec 8 13:30:15 EST 2018


raeburn		Sat Dec  8 18:30:15 2018 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Trust settings.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.449 loncom/interface/loncreateuser.pm:1.450
--- loncom/interface/loncreateuser.pm:1.449	Fri Mar 23 01:01:21 2018
+++ loncom/interface/loncreateuser.pm	Sat Dec  8 18:30:15 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.449 2018/03/23 01:01:21 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.450 2018/12/08 18:30:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1484,17 +1484,21 @@
                                          $inst_results{$ccuname.':'.$ccdomain}));
         if ((&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) ||
             (&Apache::lonnet::allowed('udp',$env{'request.role.domain'}))) {
-            $r->print('<br /><h3>'.&mt('User Can Request Creation of Courses/Communities in this Domain?').'</h3>'.
-                      &Apache::loncommon::start_data_table());
-            if ($env{'request.role.domain'} eq $ccdomain) {
-                $r->print(&build_tools_display($ccuname,$ccdomain,'requestcourses'));
-            } else {
-                if (&Apache::lonnet::will_trust('reqcrs',$ccdomain,$env{'request.role.domain'})) {
+            $r->print('<br /><h3>'.&mt('User Can Request Creation of Courses/Communities in this Domain?').'</h3>'."\n");
+            if (($env{'request.role.domain'} eq $ccdomain) ||
+                (&Apache::lonnet::will_trust('reqcrs',$ccdomain,$env{'request.role.domain'}))) {
+                $r->print(&Apache::loncommon::start_data_table());
+                if ($env{'request.role.domain'} eq $ccdomain) {
+                    $r->print(&build_tools_display($ccuname,$ccdomain,'requestcourses'));
+                } else {
                     $r->print(&coursereq_externaluser($ccuname,$ccdomain,
                                                       $env{'request.role.domain'}));
                 }
+                $r->print(&Apache::loncommon::end_data_table());
+            } else {
+                $r->print(&mt('Domain configuration for this domain prohibits course creation by users from domain: "[_1]"',
+                              &Apache::lonnet::domain($ccdomain,'description')));
             }
-            $r->print(&Apache::loncommon::end_data_table());
         }
         $r->print('</div>');
         my @order = ('auth','quota','tools','requestauthor');




More information about the LON-CAPA-cvs mailing list