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

bisitz bisitz at source.lon-capa.org
Tue Feb 5 11:22:27 EST 2013


bisitz		Tue Feb  5 16:22:27 2013 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm lonhtmlcommon.pm 
  Log:
  Improvements and corrections to user management screen, course/community selection:
  - XHTML
  - Correction of lonuserutils.pm 1.142 (correct tag closure)
  - Added missing labels
  - Standard layout and XHTML (replaced pick_box by fieldset)
  - Counter field: Internationalization and set to readonly
  
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.147 loncom/interface/lonuserutils.pm:1.148
--- loncom/interface/lonuserutils.pm:1.147	Wed Jan 23 17:48:37 2013
+++ loncom/interface/lonuserutils.pm	Tue Feb  5 16:22:27 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.147 2013/01/23 17:48:37 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.148 2013/02/05 16:22:27 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1567,12 +1567,10 @@
             &Apache::lonhtmlcommon::course_selection($formname,$numcodes,
                             $codetitles,$idlist,$idlist_titles,$crstype,
                             \@standardnames);
-        $r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n".
-                  &Apache::lonhtmlcommon::start_pick_box()."\n".
-                  &Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n".
+        $r->print('<div class="LC_left_float">'.
+                  '<fieldset><legend>'.$title.'</legend>'."\n".
                   $courseform."\n".
-                  &Apache::lonhtmlcommon::row_closure(1).
-                  &Apache::lonhtmlcommon::end_pick_box().'</p>'.
+                  '</fieldset></div><br clear="all" />'.
                   '<p><input type="hidden" name="origroletype" value="'.$env{'form.roletype'}.'" />'.
                   &list_submit_button(&mt('Update Display')).
                   "\n".'</p><span class="LC_warning">'.$warning.'</span>'."\n");
@@ -1721,7 +1719,7 @@
         } elsif ($context eq 'course') {
             $r->print(&mt('There are no course users to display.')."\n");
         }
-        $r->print('<p class="LC_info"'.$msg.'</p>'."\n") if $msg;
+        $r->print('<p class="LC_info">'.$msg.'</p>'."\n") if $msg;
     } else {
         # Print out the available choices
         my $usercount;
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.340 loncom/interface/lonhtmlcommon.pm:1.341
--- loncom/interface/lonhtmlcommon.pm:1.340	Thu Jan  3 20:02:12 2013
+++ loncom/interface/lonhtmlcommon.pm	Tue Feb  5 16:22:27 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.340 2013/01/03 20:02:12 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.341 2013/02/05 16:22:27 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2209,11 +2209,11 @@
 
     my $courseform='<b>'.&Apache::loncommon::selectcourse_link
                      ($formname,'pickcourse','pickdomain','coursedesc','',1,$crstype).'</b>';
-        $output .= '<input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'<br />';
+        $output .= '<label><input type="radio" name="coursepick" value="all" onclick="coursePick(this.form)" />'.$allcrs.'</label><br />';
     if ($totcodes > 0) {
         my $numtitles = @$codetitles;
         if ($numtitles > 0) {
-            $output .= '<input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').' <br />';
+            $output .= '<label><input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').'</label><br />';
             $output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n".
                '<select name="'.$standardnames->[0].
                '" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n".
@@ -2254,7 +2254,15 @@
             $output .= '</tr></table><br />';
         }
     }
-    $output .= '<input type="radio" name="coursepick" value="specific" onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />'.$pickspec.' '.$courseform.'  <input type="text" value="0" size="4" name="coursetotal" /><input type="hidden" name="courselist" value="" />selected.<br />'."\n";
+    $output .=
+        '<label><input type="radio" name="coursepick" value="specific"'
+       .' onclick="coursePick(this.form);opencrsbrowser('."'".$formname."','dccourse','dcdomain','coursedesc','','1','$crstype'".')" />'
+       .$pickspec.'</label>'
+       .' '.$courseform.'  '
+       .&mt('[_1] selected.',
+                '<input type="text" value="0" size="4" name="coursetotal" readonly="readonly" />'
+               .'<input type="hidden" name="courselist" value="" />')
+       .'<br />'."\n";
     return $output;
 }
 




More information about the LON-CAPA-cvs mailing list