Diff for /loncom/interface/loncreateuser.pm between versions 1.163 and 1.166

version 1.163, 2007/07/30 22:44:04 version 1.166, 2007/08/02 01:02:56
Line 204  sub print_username_entry_form { Line 204  sub print_username_entry_form {
     my ($jsback,$elements) = &crumb_utilities();      my ($jsback,$elements) = &crumb_utilities();
   
     my $jscript = &Apache::loncommon::studentbrowser_javascript()."\n".      my $jscript = &Apache::loncommon::studentbrowser_javascript()."\n".
         '<script type"text/javascript">'."\n".          '<script type="text/javascript">'."\n".
         &Apache::lonhtmlcommon::set_form_elements($elements->{$formtoset}).          &Apache::lonhtmlcommon::set_form_elements($elements->{$formtoset}).
         '</script>'."\n";          '</script>'."\n";
   
Line 216  sub print_username_entry_form { Line 216  sub print_username_entry_form {
        $jscript,{'add_entries' => \%loaditems,});         $jscript,{'add_entries' => \%loaditems,});
    &Apache::lonhtmlcommon::add_breadcrumb     &Apache::lonhtmlcommon::add_breadcrumb
      ({href=>"javascript:backPage(document.crtuser)",       ({href=>"javascript:backPage(document.crtuser)",
        text=>"User/custom role search",         text=>"User modify/custom role",
        faq=>282,bug=>'Instructor Interface',});         faq=>282,bug=>'Instructor Interface',});
   
     my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management');      my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('User Management');
Line 232  sub print_username_entry_form { Line 232  sub print_username_entry_form {
                     'ecrp' => "Edit Custom Role Privileges",                      'ecrp' => "Edit Custom Role Privileges",
                     'nr'   => "Name of Role",                      'nr'   => "Name of Role",
                     'cre'  => "Custom Role Editor",                      'cre'  => "Custom Role Editor",
                       'mod'  => "to add/modify roles",
        );         );
     my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface');      my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface');
     my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges');      my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges');
Line 244  sub print_username_entry_form { Line 245  sub print_username_entry_form {
 $start_page  $start_page
 $crumbs  $crumbs
 <h2>$lt{siur}$helpsiur</h2>  <h2>$lt{siur}$helpsiur</h2>
 <h3>$lt{'srch'} $sellink</h3>  <h3>$lt{'srch'} $sellink $lt{'mod'}</h3>
 $response");  $response");
     $r->print(&entry_form($defdom,$srch,$forcenewuser));      $r->print(&entry_form($defdom,$srch,$forcenewuser));
     if (&Apache::lonnet::allowed('mcr','/')) {      if (&Apache::lonnet::allowed('mcr','/')) {
Line 328  $jsback Line 329  $jsback
 ENDSCRIPT  ENDSCRIPT
   
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
                                        'srch'           => "User Search",                                         'srch'           => "User Search to add/modify roles of",
                                        'username'       => "username",                                         'username'       => "username",
                                        'domain'         => "domain",                                         'domain'         => "domain",
                                        'lastname'       => "last name",                                         'lastname'       => "last name",
Line 338  ENDSCRIPT Line 339  ENDSCRIPT
     $r->print(&Apache::loncommon::start_page('Create Users, Change User Privileges',$jscript));      $r->print(&Apache::loncommon::start_page('Create Users, Change User Privileges',$jscript));
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
         ({href=>"javascript:backPage(document.usersrchform,'','')",          ({href=>"javascript:backPage(document.usersrchform,'','')",
           text=>"User/custom role search",            text=>"User modify/custom role edit",
           faq=>282,bug=>'Instructor Interface',},            faq=>282,bug=>'Instructor Interface',},
          {href=>"javascript:backPage(document.usersrchform,'get_user_info','select')",           {href=>"javascript:backPage(document.usersrchform,'get_user_info','select')",
           text=>"Select User",            text=>"Select User",
Line 346  ENDSCRIPT Line 347  ENDSCRIPT
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('User Management'));
     $r->print("<b>$lt{'srch'}</b><br />");      $r->print("<b>$lt{'srch'}</b><br />");
     $r->print(&entry_form($srch->{'srchdomain'},$srch));      $r->print(&entry_form($srch->{'srchdomain'},$srch));
     $r->print('<h3>'.&mt('Select a user').'</h3>');      $r->print('<h3>'.&mt('Select a user to add/modify roles of').'</h3>');
     $r->print('<form name="usersrchform" method="post">'.      $r->print('<form name="usersrchform" method="post">'.
               &Apache::loncommon::start_data_table()."\n".                &Apache::loncommon::start_data_table()."\n".
               &Apache::loncommon::start_data_table_header_row()."\n".                &Apache::loncommon::start_data_table_header_row()."\n".
Line 630  ENDSECCODE Line 631  ENDSECCODE
        $js,{'add_entries' => \%loaditem,});         $js,{'add_entries' => \%loaditem,});
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
      ({href=>"javascript:backPage(document.cu)",       ({href=>"javascript:backPage(document.cu)",
        text=>"User/custom role search",         text=>"User modify/custom role edit",
        faq=>282,bug=>'Instructor Interface',});         faq=>282,bug=>'Instructor Interface',});
   
     if ($env{'form.phase'} eq 'userpicked') {      if ($env{'form.phase'} eq 'userpicked') {
Line 1230  sub update_user_data { Line 1231  sub update_user_data {
     $r->print(&Apache::loncommon::start_page($title,$jscript));      $r->print(&Apache::loncommon::start_page($title,$jscript));
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
        ({href=>"javascript:backPage(document.userupdate)",         ({href=>"javascript:backPage(document.userupdate)",
          text=>"User/custom role search",           text=>"User modify/custom role edit",
          faq=>282,bug=>'Instructor Interface',});           faq=>282,bug=>'Instructor Interface',});
     if ($env{'form.prevphase'} eq 'userpicked') {      if ($env{'form.prevphase'} eq 'userpicked') {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
Line 1307  sub update_user_data { Line 1308  sub update_user_data {
     $r->print($error.&mt('Invalid login mode or password').$end);          $r->print($error.&mt('Invalid login mode or password').$end);    
     return;      return;
     }      }
   
   
       $r->print('<h2>'.&mt('User [_1] in domain [_2]',
    $env{'form.ccuname'}, $env{'form.ccdomain'}).'</h2>');
   
     if ($env{'form.makeuser'}) {      if ($env{'form.makeuser'}) {
         # Create a new user   $r->print('<h3>'.&mt('Creating new account.').'</h3>');
  my %lt=&Apache::lonlocal::texthash(  
                     'cru'  => "Creating user",                      
                     'id'   => "in domain"  
    );  
  $r->print(<<ENDNEWUSERHEAD);  
 <h3>$lt{'cru'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}"</h3>  
 ENDNEWUSERHEAD  
         # Check for the authentication mode and password          # Check for the authentication mode and password
         if (! $amode || ! $genpwd) {          if (! $amode || ! $genpwd) {
     $r->print($error.&mt('Invalid login mode or password').$end);          $r->print($error.&mt('Invalid login mode or password').$end);    
Line 1348  ENDNEWUSERHEAD Line 1347  ENDNEWUSERHEAD
     } elsif (($env{'form.login'} ne 'nochange') &&      } elsif (($env{'form.login'} ne 'nochange') &&
              ($env{'form.login'} ne ''        )) {               ($env{'form.login'} ne ''        )) {
  # Modify user privileges   # Modify user privileges
     my %lt=&Apache::lonlocal::texthash(  
                     'usr'  => "User",                      
                     'id'   => "in domain"  
        );  
  $r->print(<<ENDMODIFYUSERHEAD);  
 <h2>$lt{'usr'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}"</h2>  
 ENDMODIFYUSERHEAD  
         if (! $amode || ! $genpwd) {          if (! $amode || ! $genpwd) {
     $r->print($error.'Invalid login mode or password'.$end);          $r->print($error.'Invalid login mode or password'.$end);    
     return;      return;
Line 1518  END Line 1510  END
             # They did not want to change the users name but we can              # They did not want to change the users name but we can
             # still tell them what the name is              # still tell them what the name is
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
                            'usr'  => "User",                      
                            'id'   => "in domain",  
                            'gen'  => "Generation",  
                            'mail' => "Permanent e-mail",                             'mail' => "Permanent e-mail",
                            'disk' => "Disk space allocated to user's portfolio files",                             'disk' => "Disk space allocated to user's portfolio files",
        );         );
             $r->print(<<"END");              $r->print(<<"END");
 <h2>$lt{'usr'} "$env{'form.ccuname'}" $lt{'id'} "$env{'form.ccdomain'}"</h2>  <h4>$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} $userenv{'generation'}</h4>
 <h4>$userenv{'firstname'} $userenv{'middlename'} $userenv{'lastname'} </h4>  
 <h4>$lt{'gen'}: $userenv{'generation'}</h4>  
 <h4>$lt{'mail'}: $userenv{'permanentemail'}</h4>  <h4>$lt{'mail'}: $userenv{'permanentemail'}</h4>
 END  END
             if ($putresult eq 'ok') {              if ($putresult eq 'ok') {
Line 1897  sub custom_role_editor { Line 1884  sub custom_role_editor {
     $r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script));      $r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script));
    &Apache::lonhtmlcommon::add_breadcrumb     &Apache::lonhtmlcommon::add_breadcrumb
      ({href=>"javascript:backPage(document.form1,'','')",       ({href=>"javascript:backPage(document.form1,'','')",
        text=>"User/custom role search",         text=>"User modify/custom role edit",
        faq=>282,bug=>'Instructor Interface',},         faq=>282,bug=>'Instructor Interface',},
       {href=>"javascript:backPage(document.form1,'','')",        {href=>"javascript:backPage(document.form1,'','')",
          text=>"Edit custom role",           text=>"Edit custom role",
Line 2037  sub set_custom_role { Line 2024  sub set_custom_role {
     $r->print(&Apache::loncommon::start_page('Save Custom Role'),$jscript);      $r->print(&Apache::loncommon::start_page('Save Custom Role'),$jscript);
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
         ({href=>"javascript:backPage(document.customresult,'','')",          ({href=>"javascript:backPage(document.customresult,'','')",
           text=>"User/custom role search",            text=>"User modify/custom role edit",
           faq=>282,bug=>'Instructor Interface',},            faq=>282,bug=>'Instructor Interface',},
          {href=>"javascript:backPage(document.customresult,'selected_custom_edit','')",           {href=>"javascript:backPage(document.customresult,'selected_custom_edit','')",
           text=>"Edit custom role",            text=>"Edit custom role",

Removed from v.1.163  
changed lines
  Added in v.1.166


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>