Diff for /loncom/interface/loncreateuser.pm between versions 1.355 and 1.358

version 1.355, 2011/06/20 19:04:42 version 1.358, 2011/09/25 23:07:49
Line 1322  ENDNOTOOLSPRIV Line 1322  ENDNOTOOLSPRIV
             $addrolesdisplay = &new_coauthor_roles($r,$ccuname,$ccdomain);              $addrolesdisplay = &new_coauthor_roles($r,$ccuname,$ccdomain);
         }          }
         if ($context eq 'domain') {          if ($context eq 'domain') {
             my $add_domainroles = &new_domain_roles($r);              my $add_domainroles = &new_domain_roles($r,$ccdomain);
             if (!$addrolesdisplay) {              if (!$addrolesdisplay) {
                 $addrolesdisplay = $add_domainroles;                  $addrolesdisplay = $add_domainroles;
             }              }
Line 1765  sub new_coauthor_roles { Line 1765  sub new_coauthor_roles {
 }  }
   
 sub new_domain_roles {  sub new_domain_roles {
     my ($r) = @_;      my ($r,$ccdomain) = @_;
     my $addrolesdisplay = 0;      my $addrolesdisplay = 0;
     #      #
     # Domain level      # Domain level
Line 1783  sub new_domain_roles { Line 1783  sub new_domain_roles {
     foreach my $thisdomain (sort(&Apache::lonnet::all_domains())) {      foreach my $thisdomain (sort(&Apache::lonnet::all_domains())) {
         foreach my $role (@allroles) {          foreach my $role (@allroles) {
             next if ($role eq 'ad');              next if ($role eq 'ad');
               next if (($role eq 'au') && ($ccdomain ne $thisdomain));
             if (&Apache::lonnet::allowed('c'.$role,$thisdomain)) {              if (&Apache::lonnet::allowed('c'.$role,$thisdomain)) {
                my $plrole=&Apache::lonnet::plaintext($role);                 my $plrole=&Apache::lonnet::plaintext($role);
                my %lt=&Apache::lonlocal::texthash(                 my %lt=&Apache::lonlocal::texthash(
Line 4041  sub handler { Line 4042  sub handler {
     my ($permission,$allowed) =       my ($permission,$allowed) = 
         &Apache::lonuserutils::get_permission($context,$crstype);          &Apache::lonuserutils::get_permission($context,$crstype);
     if (!$allowed) {      if (!$allowed) {
           if ($context eq 'course') {
               $r->internal_redirect('/adm/viewclasslist');
               return OK;
           }
         $env{'user.error.msg'}=          $env{'user.error.msg'}=
             "/adm/createuser:cst:0:0:Cannot create/modify user data ".              "/adm/createuser:cst:0:0:Cannot create/modify user data ".
                                  "or view user status.";                                   "or view user status.";
Line 6208  sub course_level_dc { Line 6213  sub course_level_dc {
                       '<input type="hidden" name="origdom" value="'.$dcdom.'" />'.                        '<input type="hidden" name="origdom" value="'.$dcdom.'" />'.
                       '<input type="hidden" name="dccourse" value="" />';                        '<input type="hidden" name="dccourse" value="" />';
     my $courseform=&Apache::loncommon::selectcourse_link      my $courseform=&Apache::loncommon::selectcourse_link
             ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course/Community','crstype');              ('cu','dccourse','dcdomain','coursedesc',undef,undef,'Select','crstype');
     my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role','Course/Community Browser');      my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,'currsec','cu','role','Course/Community Browser');
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
                     'rol'  => "Role",                      'rol'  => "Role",
Line 6227  sub course_level_dc { Line 6232  sub course_level_dc {
                  '<th>'.$lt{'scc'}.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.                   '<th>'.$lt{'scc'}.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th>'.
                  &Apache::loncommon::end_data_table_header_row();                   &Apache::loncommon::end_data_table_header_row();
     my $otheritems = &Apache::loncommon::start_data_table_row()."\n".      my $otheritems = &Apache::loncommon::start_data_table_row()."\n".
                      '<td><br /><input type="text" size="40" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc','','','','crstype'".')" />'.                       '<td><br /><span class="LC_nobreak"><input type="text" name="coursedesc" value="" onfocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc','','','','crstype'".')" />'.
                      $courseform.'</td>'."\n".                       $courseform.('&nbsp;' x4).'</span></td>'."\n".
                      '<td valign><br /><select name="role">'."\n";                       '<td valign><br /><select name="role">'."\n";
     foreach my $role (@roles) {      foreach my $role (@roles) {
         my $plrole=&Apache::lonnet::plaintext($role);          my $plrole=&Apache::lonnet::plaintext($role);

Removed from v.1.355  
changed lines
  Added in v.1.358


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