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

raeburn raeburn@source.lon-capa.org
Thu, 06 Aug 2009 05:48:57 -0000


raeburn		Thu Aug  6 05:48:57 2009 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Use complete sentences to aid localization (for $custom_access).
  - DCs can assign individual rights to request courses when creating a new user which will supercede default rights based on new user's affiliation(s).
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.303 loncom/interface/loncreateuser.pm:1.304
--- loncom/interface/loncreateuser.pm:1.303	Wed Aug  5 13:40:10 2009
+++ loncom/interface/loncreateuser.pm	Thu Aug  6 05:48:56 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.303 2009/08/05 13:40:10 bisitz Exp $
+# $Id: loncreateuser.pm,v 1.304 2009/08/06 05:48:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -248,13 +248,15 @@
             &Apache::lonnet::usertools_access($ccuname,$ccdomain,$item,undef,
                                               $context);
         if ($userenv{$context.'.'.$item} eq '') {
-            $custom_access = 'default';
+            $custom_access = 
+                &mt('Availability determined currently from default setting.');
             if (!$curr_access) {
                 $tool_off = 'checked="checked" ';
                 $tool_on = '';
             }
         } else {
-            $custom_access = 'custom';
+            $custom_access = 
+                &mt('Availability determined currently from custom setting.');
             $cust_on = ' checked="checked" ';
             $cust_off = '';
             if ($userenv{$context.'.'.$item} == 0) {
@@ -266,8 +268,7 @@
                    '   <td>'.$lt{$item}.'</td>'."\n".
                    '  </tr>'."\n".
                    &Apache::loncommon::start_data_table_row()."\n".
-                   '  <td>'.&mt('Availability determined currently from [_1] setting.',$custom_access).
-                   '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$lt{'avai'}.': '.
+                   '  <td>'.$custom_access.('&nbsp;'x5).$lt{'avai'}.': '.
                    ($curr_access?&mt('Yes'):&mt('No')).'</td>'."\n".
                    &Apache::loncommon::end_data_table_row()."\n".
                    &Apache::loncommon::start_data_table_row()."\n".
@@ -835,6 +836,7 @@
             &personal_data_display($ccuname,$ccdomain,$newuser,$context,
                                    $inst_results{$ccuname.':'.$ccdomain});
         $r->print($personal_table);
+#FIXME
         my ($home_server_pick,$numlib) = 
             &Apache::loncommon::home_server_form_item($ccdomain,'hserver',
                                                       'default','hide');
@@ -846,6 +848,13 @@
         } else {
             $r->print($home_server_pick);
         }
+        if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) {
+            $r->print('<br /><h3>'.&mt('User Can Request Creation of Courses in this Domain?').'</h3>'.
+                      &Apache::loncommon::start_data_table().
+                      &build_tools_display($ccuname,$ccdomain,
+                                           'requestcourses').
+                      &Apache::loncommon::end_data_table());
+        }
         $r->print('</div>'."\n".'<div class="LC_left_float"><h3>'.
                   $lt{'lg'}.'</h3>');
         my ($fixedauth,$varauth,$authmsg);