--- loncom/interface/loncreateuser.pm 2007/07/30 22:44:04 1.163 +++ loncom/interface/loncreateuser.pm 2007/08/02 01:02:56 1.166 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.163 2007/07/30 22:44:04 albertel Exp $ +# $Id: loncreateuser.pm,v 1.166 2007/08/02 01:02:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -204,7 +204,7 @@ sub print_username_entry_form { my ($jsback,$elements) = &crumb_utilities(); my $jscript = &Apache::loncommon::studentbrowser_javascript()."\n". - ''."\n"; @@ -216,7 +216,7 @@ sub print_username_entry_form { $jscript,{'add_entries' => \%loaditems,}); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.crtuser)", - text=>"User/custom role search", + text=>"User modify/custom role", faq=>282,bug=>'Instructor Interface',}); my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management'); @@ -232,6 +232,7 @@ sub print_username_entry_form { 'ecrp' => "Edit Custom Role Privileges", 'nr' => "Name of Role", 'cre' => "Custom Role Editor", + 'mod' => "to add/modify roles", ); my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface'); my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); @@ -244,7 +245,7 @@ sub print_username_entry_form { $start_page $crumbs

$lt{siur}$helpsiur

-

$lt{'srch'} $sellink

+

$lt{'srch'} $sellink $lt{'mod'}

$response"); $r->print(&entry_form($defdom,$srch,$forcenewuser)); if (&Apache::lonnet::allowed('mcr','/')) { @@ -328,7 +329,7 @@ $jsback ENDSCRIPT my %lt=&Apache::lonlocal::texthash( - 'srch' => "User Search", + 'srch' => "User Search to add/modify roles of", 'username' => "username", 'domain' => "domain", 'lastname' => "last name", @@ -338,7 +339,7 @@ ENDSCRIPT $r->print(&Apache::loncommon::start_page('Create Users, Change User Privileges',$jscript)); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.usersrchform,'','')", - text=>"User/custom role search", + text=>"User modify/custom role edit", faq=>282,bug=>'Instructor Interface',}, {href=>"javascript:backPage(document.usersrchform,'get_user_info','select')", text=>"Select User", @@ -346,7 +347,7 @@ ENDSCRIPT $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management')); $r->print("$lt{'srch'}
"); $r->print(&entry_form($srch->{'srchdomain'},$srch)); - $r->print('

'.&mt('Select a user').'

'); + $r->print('

'.&mt('Select a user to add/modify roles of').'

'); $r->print('
'. &Apache::loncommon::start_data_table()."\n". &Apache::loncommon::start_data_table_header_row()."\n". @@ -630,7 +631,7 @@ ENDSECCODE $js,{'add_entries' => \%loaditem,}); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.cu)", - text=>"User/custom role search", + text=>"User modify/custom role edit", faq=>282,bug=>'Instructor Interface',}); if ($env{'form.phase'} eq 'userpicked') { @@ -1230,7 +1231,7 @@ sub update_user_data { $r->print(&Apache::loncommon::start_page($title,$jscript)); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.userupdate)", - text=>"User/custom role search", + text=>"User modify/custom role edit", faq=>282,bug=>'Instructor Interface',}); if ($env{'form.prevphase'} eq 'userpicked') { &Apache::lonhtmlcommon::add_breadcrumb @@ -1307,15 +1308,13 @@ sub update_user_data { $r->print($error.&mt('Invalid login mode or password').$end); return; } + + + $r->print('

'.&mt('User [_1] in domain [_2]', + $env{'form.ccuname'}, $env{'form.ccdomain'}).'

'); + if ($env{'form.makeuser'}) { - # Create a new user - my %lt=&Apache::lonlocal::texthash( - 'cru' => "Creating user", - 'id' => "in domain" - ); - $r->print(<$lt{'cru'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}" -ENDNEWUSERHEAD + $r->print('

'.&mt('Creating new account.').'

'); # Check for the authentication mode and password if (! $amode || ! $genpwd) { $r->print($error.&mt('Invalid login mode or password').$end); @@ -1348,13 +1347,6 @@ ENDNEWUSERHEAD } elsif (($env{'form.login'} ne 'nochange') && ($env{'form.login'} ne '' )) { # Modify user privileges - my %lt=&Apache::lonlocal::texthash( - 'usr' => "User", - 'id' => "in domain" - ); - $r->print(<$lt{'usr'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}" -ENDMODIFYUSERHEAD if (! $amode || ! $genpwd) { $r->print($error.'Invalid login mode or password'.$end); return; @@ -1518,16 +1510,11 @@ END # They did not want to change the users name but we can # still tell them what the name is my %lt=&Apache::lonlocal::texthash( - 'usr' => "User", - 'id' => "in domain", - 'gen' => "Generation", 'mail' => "Permanent e-mail", 'disk' => "Disk space allocated to user's portfolio files", ); $r->print(<<"END"); -

$lt{'usr'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}"

-

$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'}

-

$lt{'gen'}: $userenv{'generation'}

+

$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} $userenv{'generation'}

$lt{'mail'}: $userenv{'permanentemail'}

END if ($putresult eq 'ok') { @@ -1897,7 +1884,7 @@ sub custom_role_editor { $r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script)); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.form1,'','')", - text=>"User/custom role search", + text=>"User modify/custom role edit", faq=>282,bug=>'Instructor Interface',}, {href=>"javascript:backPage(document.form1,'','')", text=>"Edit custom role", @@ -2037,7 +2024,7 @@ sub set_custom_role { $r->print(&Apache::loncommon::start_page('Save Custom Role'),$jscript); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.customresult,'','')", - text=>"User/custom role search", + text=>"User modify/custom role edit", faq=>282,bug=>'Instructor Interface',}, {href=>"javascript:backPage(document.customresult,'selected_custom_edit','')", text=>"Edit custom role",