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

raeburn raeburn at source.lon-capa.org
Wed Aug 31 22:32:51 EDT 2011


raeburn		Thu Sep  1 02:32:51 2011 EDT

  Modified files:              
    /loncom/interface	loncommon.pm loncreateuser.pm lonpickcourse.pm 
  Log:
  - Improve readability of "Course/Community Level" box in DC's create/modify
    user screen.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1018 loncom/interface/loncommon.pm:1.1019
--- loncom/interface/loncommon.pm:1.1018	Mon Aug 15 15:58:28 2011
+++ loncom/interface/loncommon.pm	Thu Sep  1 02:32:50 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1018 2011/08/15 15:58:28 raeburn Exp $
+# $Id: loncommon.pm,v 1.1019 2011/09/01 02:32:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -847,6 +847,9 @@
    } elsif ($selecttype eq 'Course/Community') {
        $linktext = &mt('Select Course/Community');
        $type = '';
+   } elsif ($selecttype eq 'Select') {
+       $linktext = &mt('Select');
+       $type = '';
    }
    return '<span class="LC_nobreak">'
          ."<a href='"
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.355 loncom/interface/loncreateuser.pm:1.356
--- loncom/interface/loncreateuser.pm:1.355	Mon Jun 20 19:04:42 2011
+++ loncom/interface/loncreateuser.pm	Thu Sep  1 02:32:50 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.355 2011/06/20 19:04:42 www Exp $
+# $Id: loncreateuser.pm,v 1.356 2011/09/01 02:32:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6208,7 +6208,7 @@
                       '<input type="hidden" name="origdom" value="'.$dcdom.'" />'.
                       '<input type="hidden" name="dccourse" value="" />';
     my $courseform=&Apache::loncommon::selectcourse_link
-            ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course/Community','crstype');
+            ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Select','crstype');
     my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role','Course/Community Browser');
     my %lt=&Apache::lonlocal::texthash(
                     'rol'  => "Role",
@@ -6227,8 +6227,8 @@
                  '<th>'.$lt{'scc'}.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
                  &Apache::loncommon::end_data_table_header_row();
     my $otheritems = &Apache::loncommon::start_data_table_row()."\n".
-                     '<td><br /><input type="text" size="40" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc','','','','crstype'".')" />'.
-                     $courseform.'</td>'."\n".
+                     '<td><br /><span class="LC_nobreak"><input type="text" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc','','','','crstype'".')" />'.
+                     $courseform.(' ' x4).'</span></td>'."\n".
                      '<td valign><br /><select name="role">'."\n";
     foreach my $role (@roles) {
         my $plrole=&Apache::lonnet::plaintext($role);
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.102 loncom/interface/lonpickcourse.pm:1.103
--- loncom/interface/lonpickcourse.pm:1.102	Fri May 27 14:39:53 2011
+++ loncom/interface/lonpickcourse.pm	Thu Sep  1 02:32:50 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.102 2011/05/27 14:39:53 bisitz Exp $
+# $Id: lonpickcourse.pm,v 1.103 2011/09/01 02:32:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1061,8 +1061,13 @@
     } else {
         my ($name_code,$type_code);
         if ($env{'form.cnameelement'} ne '') {
-            $name_code = 'opener.document.'.$env{'form.form'}.'.'.
-                          $env{'form.cnameelement'}.'.value=cdesc;';
+            $name_code = <<ENDNAMECODE;  
+var showcdesc = cdesc;
+if (cdesc.length > 25) {
+    showcdesc = cdesc.substr(0,25)+' ...'; 
+}
+opener.document.$env{'form.form'}.$env{'form.cnameelement'}.value=showcdesc;
+ENDNAMECODE
         }
         if ($env{'form.typeelement'} ne '') {
             $type_code = 'opener.document.'.$env{'form.form'}.'.'.




More information about the LON-CAPA-cvs mailing list