--- loncom/interface/loncreateuser.pm 2004/12/07 00:49:27 1.91 +++ loncom/interface/loncreateuser.pm 2005/02/17 08:29:42 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.91 2004/12/07 00:49:27 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.100 2005/02/17 08:29:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,10 +73,9 @@ my $authformint; my $authformfsys; my $authformloc; -BEGIN { - $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/; - my $krbdefdom=$1; - $krbdefdom=~tr/a-z/A-Z/; +sub initialize_authen_forms { + my ($krbdefdom)=( $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/); + $krbdefdom= uc($krbdefdom); my %param = ( formname => 'document.cu', kerb_def_dom => $krbdefdom ); @@ -123,6 +122,7 @@ sub print_username_entry_form { my $defdom=$ENV{'request.role.domain'}; my @domains = &Apache::loncommon::get_domains(); my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); + my $html=&Apache::lonxml::xmlbegin(); my $bodytag =&Apache::loncommon::bodytag('Create Users, Change User Privileges').&Apache::loncommon::help_open_menu('',undef,undef,'',282,'Instructor Interface'); my $selscript=&Apache::loncommon::studentbrowser_javascript(); my $sellink=&Apache::loncommon::selectstudent_link @@ -142,7 +142,7 @@ sub print_username_entry_form { my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles'); $r->print(<<"ENDDOCUMENT"); - +$html The LearningOnline Network with CAPA $selscript @@ -174,8 +174,8 @@ sub print_user_modification_page { my $ccuname=$ENV{'form.ccuname'}; my $ccdomain=$ENV{'form.ccdomain'}; - $ccuname=~s/[\W|_]//gs; - $ccdomain=~s/[\W|_]//gs; + $ccuname=~s/\W//g; + $ccdomain=~s/\W//g; unless (($ccuname) && ($ccdomain)) { &print_username_entry_form($r); @@ -272,8 +272,9 @@ sub print_user_modification_page { } ENDSCRIPT } + my $html=&Apache::lonxml::xmlbegin(); my $dochead =<<"ENDDOCHEAD"; - +$html The LearningOnline Network with CAPA