[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Sun, 19 Sep 2010 18:50:49 -0000


raeburn		Sun Sep 19 18:50:49 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	loncommon.pm 
  Log:
  - Customization for GCI_3.
    - Usernames added for new users added via "Add/Modify a Student" must be 
      e-mail addresses. Lower case enforced for new users.
    - Case sensitivity eliminated when searching for existing users, unless
      exact match to existing user with case used in search term.
    - Customization of wording for GCI.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.12 loncom/interface/loncommon.pm:1.925.2.13
--- loncom/interface/loncommon.pm:1.925.2.12	Fri Feb 26 22:48:43 2010
+++ loncom/interface/loncommon.pm	Sun Sep 19 18:50:48 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.925.2.12 2010/02/26 22:48:43 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.13 2010/09/19 18:50:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1978,7 +1978,16 @@
             ($dom eq $defdom ? 'selected="selected" ' : '').'>'.$dom;
         if ($showdomdesc) {
             if ($dom ne '') {
-                my $domdesc = &Apache::lonnet::domain($dom,'description');
+                my $domdesc;
+                if ($name eq 'srchdomain') {
+                    if ($dom eq 'gci') {
+                        $domdesc = 'Faculty';
+                    } else {
+                        $domdesc = 'Students';
+                    }
+                } else {
+                    $domdesc = &Apache::lonnet::domain($dom,'description');
+                }
                 if ($domdesc ne '') {
                     $selectdomain .= ' ('.$domdesc.')';
                 }
@@ -2469,9 +2478,11 @@
     }
     $autharg = '<input type="password" size="10" name="intarg" value="'.
                $intarg.'" onchange="'.$jscall.'" />';
-    $result = &mt
-        ('[_1] Internally authenticated (with initial password [_2])',
-         '<label>'.$authtype,'</label>'.$autharg);
+    my $authtext = '[_1] Internally authenticated (with initial password [_2])';
+    if ($in{'caller'} eq 'requestcrs') {
+        $authtext = "[_1] Students' password, if none in the uploaded file: [_2]";
+    }
+    $result = &mt($authtext,'<label>'.$authtype,'</label>'.$autharg);
     $result.="<label><input type=\"checkbox\" name=\"visible\" onclick='if (this.checked) { this.form.intarg.type=\"text\" } else { this.form.intarg.type=\"password\" }' />".&mt('Visible input').'</label>';
     return $result;
 }
@@ -4943,6 +4954,26 @@
   margin: 0;
 }
 
+dl.LC_GCI_Menu {
+    width:300px;
+    float:left;
+    margin-right:2em;
+}
+
+dl.LC_GCI_Menu dt {
+    font-weight: bold;
+    font-size:0.9em;
+    margin-bottom:0.7em;
+}
+
+dl.LC_GCI_Menu dd {
+    font-size:0.8em;
+    margin:0 0 2em 0;
+    padding-left:4.5em;
+    line-height:1.5em;
+    background:none no-repeat left top;
+}
+
 /* #SD START (work in progress)*/
 
 ul.LC_bct {
@@ -7702,9 +7733,9 @@
                     'whse'      => "When searching by last,first you must include at least one character in the first name.",
                      'thfo'     => "The following need to be corrected before the search can be run:",
                                        );
-    my $domform = &select_dom_form($currdom,'srchdomain',1,1);
+    my $domform = &select_dom_form($currdom,'srchdomain',undef,1);
     my $srchinsel = ' <select name="srchin">';
-
+     
     my @srchins = ('crs','dom','alc','instd');
 
     foreach my $option (@srchins) {
@@ -7714,12 +7745,13 @@
         next if ($option eq 'alc');
         next if (($option eq 'crs') && ($env{'form.form'} eq 'requestcrs'));  
         next if ($option eq 'crs' && !$env{'request.course.id'});
+        next if ($option eq 'instd');
         if ($curr_selected{'srchin'} eq $option) {
             $srchinsel .= ' 
-   <option value="'.$option.'" selected="selected">'.$lt{$option}.'</option>';
+       <option value="'.$option.'" selected="selected">'.$lt{$option}.'</option>';
         } else {
             $srchinsel .= '
-   <option value="'.$option.'">'.$lt{$option}.'</option>';
+    <option value="'.$option.'">'.$lt{$option}.'</option>';
         }
     }
     $srchinsel .= "\n  </select>\n";
@@ -7763,9 +7795,9 @@
                     );
                     $new_user_create = '<p class="LC_warning">'
                                       .&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.")
-                                      .' '
-                                      .&mt('Please contact the [_1]helpdesk[_2] for assistance.'
-                                          ,'<a href="'.$helplink.'">','</a>')
+                                      .'<br />'
+                                      .&mt('Enter a valid e-mail address as the username for the new user.').' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.'
+                                      ,'<a href="'.$helplink.'">','</a>')
                                       .'</p><br />';
                 }
             }