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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Fri, 27 Jun 2008 16:31:18 -0000


raeburn		Fri Jun 27 12:31:18 2008 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  - Use appropropriate name for "Registered students only" form element so the value actually gets stored.
  - Clarify the meaning of "Registered students only".
  - Improve text displayed after a change to "Regsitered students only" setting.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.244 loncom/interface/loncreateuser.pm:1.245
--- loncom/interface/loncreateuser.pm:1.244	Mon Jun 23 10:13:50 2008
+++ loncom/interface/loncreateuser.pm	Fri Jun 27 12:31:16 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.244 2008/06/23 14:13:50 bisitz Exp $
+# $Id: loncreateuser.pm,v 1.245 2008/06/27 16:31:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3266,9 +3266,9 @@
                     $regoff = ' checked="checked" ';
                 }
                 $output .= '<label>'.
-                           '<input type="radio" name="registered" value="1"'.$regon.'/>'.
+                           '<input type="radio" name="selfenroll_registered" value="1"'.$regon.'/>'.
                            &mt('Yes').'</label>&nbsp;&nbsp;<label>'.
-                           '<input type="radio" name="registered" value="0"'.$regoff.'/>'.
+                           '<input type="radio" name="selfenroll_registered" value="0"'.$regoff.'/>'.
                            &mt('No').'</label>';
             } elsif ($item eq 'enroll_dates') {
                 my $starttime = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_start_date'};
@@ -4408,6 +4408,12 @@
                                 } elsif ($newval eq '*') {
                                     $newval = &mt('Any user in any domain');
                                 }
+                            } elsif ($item eq 'registered') {
+                                if ($newval eq '1') {
+                                    $newval = &mt('Yes');
+                                } elsif ($newval eq '0') {
+                                    $newval = &mt('No');
+                                }
                             }
                             $r->print('<li>'.&mt('"[_1]" set to "[_2]".',$title,$newval).'</li>'."\n");
                         }
@@ -4438,7 +4444,7 @@
     my @row = ('types','registered','enroll_dates','access_dates','section');
     my %lt = &Apache::lonlocal::texthash (
                 types        => 'Users allowed to self-enroll in this course',
-                registered   => 'Restrict self-enrollment to registered students',
+                registered   => 'Restrict self-enrollment to students officially registered for the course',
                 enroll_dates => 'Dates self-enrollment available',
                 access_dates => 'Course access dates for self-enrolled users',
                 section      => 'Section assigned to self-enrolled users',