Diff for /loncom/interface/loncreateuser.pm between versions 1.291 and 1.299

version 1.291, 2009/04/22 17:19:10 version 1.299, 2009/07/25 14:44:50
Line 225  sub build_tools_display { Line 225  sub build_tools_display {
                    'usde'       => "Use default",                     'usde'       => "Use default",
                    'uscu'       => "Use custom",                     'uscu'       => "Use custom",
                    'official'   => 'Can request creation of official courses',                     'official'   => 'Can request creation of official courses',
                    'unofficial' => 'Can request creation of unofficial courses',                       'unofficial' => 'Can request creation of unofficial courses',
                      'community'  => 'Can request creation of communities',
     );      );
     if ($context eq 'requestcourses') {      if ($context eq 'requestcourses') {
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,          %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
                       'requestcourses.official','requestcourses.unofficial');                        'requestcourses.official','requestcourses.unofficial',
         @usertools = ('official','unofficial');                        'requestcourses.community');
           @usertools = ('official','unofficial','community');
     } else {      } else {
         %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,          %userenv = &Apache::lonnet::userenvironment($ccdomain,$ccuname,
                           'tools.aboutme','tools.portfolio','tools.blog');                            'tools.aboutme','tools.portfolio','tools.blog');
Line 631  sub print_user_modification_page { Line 633  sub print_user_modification_page {
             &Apache::lonuserutils::can_create_user($ccdomain,$context,              &Apache::lonuserutils::can_create_user($ccdomain,$context,
                                                    $usertype);                                                     $usertype);
         if (!$cancreate) {          if (!$cancreate) {
             my $helplink = ' href="javascript:helpMenu('."'display'".')"';              my $helplink = 'javascript:helpMenu('."'display'".')';
             my %usertypetext = (              my %usertypetext = (
                 official   => 'institutional',                  official   => 'institutional',
                 unofficial => 'non-institutional',                  unofficial => 'non-institutional',
Line 641  sub print_user_modification_page { Line 643  sub print_user_modification_page {
                 $response =  '<span class="LC_warning">'.&mt('No match was found for the username ([_1]) in LON-CAPA domain: [_2]',$ccuname,$ccdomain).                  $response =  '<span class="LC_warning">'.&mt('No match was found for the username ([_1]) in LON-CAPA domain: [_2]',$ccuname,$ccdomain).
                             '</span><br />';                              '</span><br />';
             }              }
             $response .= '<span class="LC_warning">'.&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '.&mt('Contact the <a[_1]>helpdesk</a> for assistance.',$helplink).'</span><br /><br />';              $response .= '<p class="LC_warning">'
                           .&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.")
                           .' '
                           .&mt('Please contact the [_1]helpdesk[_2] for assistance.'
                               ,'<a href="'.$helplink.'">','</a>')
                           .'</p><br />';
             $env{'form.phase'} = '';              $env{'form.phase'} = '';
             &print_username_entry_form($r,$context,$response);              &print_username_entry_form($r,$context,$response);
             return;              return;
Line 1856  sub update_user_data { Line 1863  sub update_user_data {
  $env{'form.ccuname'}, $env{'form.ccdomain'}).'</h3>');   $env{'form.ccuname'}, $env{'form.ccdomain'}).'</h3>');
     my (%alerts,%rulematch,%inst_results,%curr_rules);      my (%alerts,%rulematch,%inst_results,%curr_rules);
     my @usertools = ('aboutme','blog','portfolio');      my @usertools = ('aboutme','blog','portfolio');
     my @requestcourses = ('official','unofficial');      my @requestcourses = ('official','unofficial','community');
     my ($othertitle,$usertypes,$types) =       my ($othertitle,$usertypes,$types) = 
         &Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});          &Apache::loncommon::sorted_inst_types($env{'form.ccdomain'});
     if ($env{'form.makeuser'}) {      if ($env{'form.makeuser'}) {
Line 1993  sub update_user_data { Line 2000  sub update_user_data {
             ('environment',['firstname','middlename','lastname','generation',              ('environment',['firstname','middlename','lastname','generation',
              'id','permanentemail','portfolioquota','inststatus','tools.aboutme',               'id','permanentemail','portfolioquota','inststatus','tools.aboutme',
              'tools.blog','tools.portfolio','requestcourses.official',               'tools.blog','tools.portfolio','requestcourses.official',
              'requestcourses.unofficial'],               'requestcourses.unofficial','requestcourses.community'],
               $env{'form.ccdomain'},$env{'form.ccuname'});                $env{'form.ccdomain'},$env{'form.ccuname'});
         my ($tmp) = keys(%userenv);          my ($tmp) = keys(%userenv);
         if ($tmp =~ /^(con_lost|error)/i) {           if ($tmp =~ /^(con_lost|error)/i) { 
Line 2095  sub update_user_data { Line 2102  sub update_user_data {
             (!$forceid)) {              (!$forceid)) {
             if ($env{'form.cid'} ne $uidhash{$env{'form.ccuname'}}) {              if ($env{'form.cid'} ne $uidhash{$env{'form.ccuname'}}) {
                 $env{'form.cid'} = $userenv{'id'};                  $env{'form.cid'} = $userenv{'id'};
                 $no_forceid_alert = &mt('New Student/Employee ID does not match existing ID for this user.')                  $no_forceid_alert = &mt('New student/employee ID does not match existing ID for this user.')
                                    .'<br />'                                     .'<br />'
                                    .&mt("Change is not permitted without checking the 'Force ID change' checkbox on the previous page.")                                     .&mt("Change is not permitted without checking the 'Force ID change' checkbox on the previous page.")
                                    .'<br />'."\n";                                     .'<br />'."\n";
Line 2241  sub update_user_data { Line 2248  sub update_user_data {
                         ($env{'user.domain'} eq $env{'form.ccdomain'})) {                          ($env{'user.domain'} eq $env{'form.ccdomain'})) {
                         my %newenvhash;                          my %newenvhash;
                         foreach my $key (keys(%changed)) {                          foreach my $key (keys(%changed)) {
                             if (($key eq 'official') || ($key eq 'unofficial')) {                              if (($key eq 'official') || ($key eq 'unofficial')
                                   || ($key eq 'community')) {
                                 $newenvhash{'environment.requestcourses.'.$key} =                                  $newenvhash{'environment.requestcourses.'.$key} =
                                     $changeHash{'requestcourses.'.$key};                                      $changeHash{'requestcourses.'.$key};
                                 if ($changeHash{'requestcourses.'.$key} ne '') {                                  if ($changeHash{'requestcourses.'.$key} ne '') {
Line 2303  sub update_user_data { Line 2311  sub update_user_data {
                              'portfolio'  => 'Portfolio Availability',                               'portfolio'  => 'Portfolio Availability',
                              'official'   => 'Can Request Official Courses',                               'official'   => 'Can Request Official Courses',
                              'unofficial' => 'Can Request Unofficial Courses',                               'unofficial' => 'Can Request Unofficial Courses',
                                'community'  => 'Can Request Communities',
                              'inststatus' => "Affiliation",                               'inststatus' => "Affiliation",
                              'prvs'       => 'Previous Value:',                               'prvs'       => 'Previous Value:',
                              'chto'       => 'Changed To:'                               'chto'       => 'Changed To:'
Line 2440  END Line 2449  END
                            'aboutme'    => "Personal Information Page Availability",                             'aboutme'    => "Personal Information Page Availability",
                            'portfolio'  => "Portfolio Availability",                             'portfolio'  => "Portfolio Availability",
                            'official'   => "Can Request Official Courses",                             'official'   => "Can Request Official Courses",
                            'unofficial' => "Can Request Unofficial Course",                             'unofficial' => "Can Request Unofficial Courses",
                              'community'  => "Can Request Communities",
                            'inststatus' => "Affiliation",                             'inststatus' => "Affiliation",
        );         );
             $r->print(<<"END");              $r->print(<<"END");
Line 2494  END Line 2504  END
             } else {              } else {
                 $r->print(&mt("You do not have the authority to change these fields given the user's current set of active/future [_1] roles:",$contextname));                  $r->print(&mt("You do not have the authority to change these fields given the user's current set of active/future [_1] roles:",$contextname));
             }              }
             $r->print('<span class="LC_cusr_emph">'.$rolestr.'</span><br />'.              my $helplink = 'javascript:helpMenu('."'display'".')';
                       &mt('Contact your <a href="[_1]">helpdesk</a> for more information.',"javascript:helpMenu('display')").'<br />');              $r->print('<span class="LC_cusr_emph">'.$rolestr.'</span><br />'
                        .&mt('Please contact your [_1]helpdesk[_2] for more information.'
                            ,'<a href="'.$helplink.'">','</a>')
                         .'<br />');
         }          }
         $r->print('<span class="LC_warning">'          $r->print('<span class="LC_warning">'
                   .$no_forceid_alert                    .$no_forceid_alert
Line 2681  sub update_roles { Line 2694  sub update_roles {
     if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {      if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) {
                 my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4);                  my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4);
 # Delete custom role  # Delete custom role
                 $r->print(&mt('Deleting custom role [_1] by [_2]:[_3] in [_4]',                  $r->print(&mt('Deleting custom role [_1] by [_2] in [_3]',
                       $rolename,$rnam,$rdom,$url).': <b>'.                        $rolename,$rnam.':'.$rdom,$url).': <b>'.
                       &Apache::lonnet::assigncustomrole($env{'form.ccdomain'},                        &Apache::lonnet::assigncustomrole($env{'form.ccdomain'},
                          $env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now,                           $env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now,
                          0,1,$context).'</b><br />');                           0,1,$context).'</b><br />');
Line 2733  sub update_roles { Line 2746  sub update_roles {
                 my $result = &Apache::lonnet::assigncustomrole(                  my $result = &Apache::lonnet::assigncustomrole(
                                $env{'form.ccdomain'}, $env{'form.ccuname'},                                 $env{'form.ccdomain'}, $env{'form.ccuname'},
                                $url,$rdom,$rnam,$rolename,0,$now,undef,$context);                                 $url,$rdom,$rnam,$rolename,0,$now,undef,$context);
                 $r->print(&mt('Re-enabling custom role [_1] by [_2]:[_3] in [_4] : [_5]',                  $r->print(&mt('Re-enabling custom role [_1] by [_2] in [_3]: [_4]',
                           $rolename,$rnam,$rdom,$url,'<b>'.$result.'</b>').'<br />');                            $rolename,$rnam.':'.$rdom,$url,'<b>'.$result.'</b>').'<br />');
                 if (!grep(/^cr$/,@rolechanges)) {                  if (!grep(/^cr$/,@rolechanges)) {
                     push(@rolechanges,'cr');                      push(@rolechanges,'cr');
                 }                  }
Line 3647  END Line 3660  END
 sub print_main_menu {  sub print_main_menu {
     my ($permission,$context) = @_;      my ($permission,$context) = @_;
     my %links = (      my %links = (
                        domain => {                  domain => {
                                    upload => 'Upload a File of Users',                              upload     => 'Upload a File of Users',
                                    singleuser => 'Add/Modify a Single User',                              singleuser => 'Add/Modify a User',
                                    listusers => 'Manage Multiple Users',                              listusers  => 'Manage Users',
                                  },                              },
                        author => {                  author => {
                                    upload => 'Upload a File of Co-authors',                              upload     => 'Upload a File of Co-authors',
                                    singleuser => 'Add/Modify a Single Co-author',                              singleuser => 'Add/Modify a Co-author',
                                    listusers => 'Display Co-authors and Manage Multiple Users',                              listusers  => 'Manage Co-authors',
                                  },                              },
                        course => {                  course => {
                                    upload => 'File of Course Users',                              upload     => 'Upload a File of Course Users',
                                    singleuser => 'Single Course User',                              singleuser => 'Add/Modify a Course User',
                                    listusers => 'Course User Lists',                              listusers  => 'Manage Course Users',
                                  },                              },
                      );                  );
   my @menu = ( {categorytitle => 'Add Users',    my @menu = ( {categorytitle => 'Single Users', 
      items =>           items =>
      [{           [
          linktext => $links{$context}{'upload'},              {
          icon => 'sctr.png',               linktext => $links{$context}{'singleuser'},
          #help => 'Course_Create_Class_List',               icon => 'edit-redo.png',
          url => '/adm/createuser?action=upload',               #help => 'Course_Change_Privileges',
          permission => $permission->{'cusr'},               url => '/adm/createuser?action=singleuser',
          linktitle => 'Upload a CSV or a text file containing users.',               permission => $permission->{'cusr'},
      },               linktitle => 'Add a user with a certain role to this course.',
      {              },
          linktext => $links{$context}{'singleuser'},           ]},
          icon => 'edit-redo.png',  
          #help => 'Course_Change_Privileges',           {categorytitle => 'Multiple Users',
          url => '/adm/createuser?action=singleuser',           items => 
          permission => $permission->{'cusr'},           [
          linktitle => 'Add a user with a certain role to this course.',              {
      }]},               linktext => $links{$context}{'upload'},
      {categorytitle => 'Administration',               icon => 'sctr.png',
      items =>               #help => 'Course_Create_Class_List',
      [{               url => '/adm/createuser?action=upload',
          linktext => $links{$context}{'listusers'},               permission => $permission->{'cusr'},
                  icon => 'edit-find.png',               linktitle => 'Upload a CSV or a text file containing users.',
                  #help => 'Course_View_Class_List',              },
                  url => '/adm/createuser?action=listusers',              {
          permission => ($permission->{'view'} || $permission->{'cusr'}),               linktext => $links{$context}{'listusers'},
          linktitle => 'Show and manage users of this course.',               icon => 'edit-find.png',
      }]},               #help => 'Course_View_Class_List',
      {categorytitle => 'Configuration',               url => '/adm/createuser?action=listusers',
      items =>               permission => ($permission->{'view'} || $permission->{'cusr'}),
      [               linktitle => 'Show and manage users of this course.',
      ]},              },
    );  
            ]},
   
            {categorytitle => 'Administration',
            items => [ ]},
          );
               
     if ($context eq 'domain'){      if ($context eq 'domain'){
           
  push(@{ $menu[1]->{items} },          push(@{ $menu[2]->{items} }, #Category: Administration
  { linktext => 'Custom Roles',              {
  icon => 'emblem-photos.png',               linktext => 'Custom Roles',
  #help => 'Course_Editing_Custom_Roles',               icon => 'emblem-photos.png',
  url => '/adm/createuser?action=custom',               #help => 'Course_Editing_Custom_Roles',
  permission => $permission->{'custom'},               url => '/adm/createuser?action=custom',
  linktitle => 'Configure a custom role.',               permission => $permission->{'custom'},
  });               linktitle => 'Configure a custom role.',
               },
           );
           
     }elsif ($context eq 'course'){      }elsif ($context eq 'course'){
     my ($cnum,$cdom) = &Apache::lonuserutils::get_course_identity();          my ($cnum,$cdom) = &Apache::lonuserutils::get_course_identity();
       
         push(@{ $menu[0]->{items} },          push(@{ $menu[0]->{items} }, #Category: Single Users
  { linktext => 'Single Student',              {   
             #help => 'Course_Add_Student',               linktext => 'Add/Modify a Student',
  icon => 'list-add.png',               #help => 'Course_Add_Student',
             url => '/adm/createuser?action=singlestudent',               icon => 'list-add.png',
  permission => $permission->{'cusr'},               url => '/adm/createuser?action=singlestudent',
             linktitle => 'Add a user with the role student to this course.',               permission => $permission->{'cusr'},
         });               linktitle => 'Add a user with the role student to this course.',
               },
         push(@{ $menu[1]->{items} },            );
  { linktext => 'Drop Students',          
  icon => 'edit-undo.png',          push(@{ $menu[1]->{items} }, #Category: Multiple Users 
             #help => 'Course_Drop_Student',              {
             url => '/adm/createuser?action=drop',               linktext => 'Drop Students',
  permission => $permission->{'cusr'},               icon => 'edit-undo.png',
             linktitle =>'Remove a student from this course.',               #help => 'Course_Drop_Student',
         },               url => '/adm/createuser?action=drop',
  { linktext => 'Custom Roles',               permission => $permission->{'cusr'},
  icon => 'emblem-photos.png',               linktitle =>'Remove a student from this course.',
             #help => 'Course_Editing_Custom_Roles',              },
             url => '/adm/createuser?action=custom',          );
  permission => $permission->{'custom'},          push(@{ $menu[2]->{items} }, #Category: Administration
  linktitle => 'Configure a custom role.',              {    
         });               linktext => 'Custom Roles',
                icon => 'emblem-photos.png',
                #help => 'Course_Editing_Custom_Roles',
                url => '/adm/createuser?action=custom',
                permission => $permission->{'custom'},
                linktitle => 'Configure a custom role.',
               },
               {
                linktext => 'Course Groups',
                icon => 'conf.png',
                #help => 'Course_Manage_Group',
                url => '/adm/coursegroups?refpage=cusr',
                permission => $permission->{'grp_manage'},
                linktitle => 'Manage course groups.',
               },
               {
                linktext => 'Change Logs',
                icon => 'document-properties.png',
                #help => 'Course_User_Logs',
                url => '/adm/createuser?action=changelogs',
                permission => $permission->{'cusr'},
                linktitle => 'View change log.',
               },
           );
         if ($env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_approval'}) {          if ($env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_approval'}) {
             push(@{ $menu[1]->{items} },              push(@{ $menu[2]->{items} },
                     {   linktext => 'Enrollment Requests',                      {   
                         icon => 'selfenrl-queue.png',                       linktext => 'Enrollment Requests',
                         #help => 'Course_Approve_Selfenroll',                       icon => 'selfenrl-queue.png',
                         url => '/adm/createuser?action=selfenrollqueue',                       #help => 'Course_Approve_Selfenroll',
                         permission => $permission->{'cusr'},                       url => '/adm/createuser?action=selfenrollqueue',
                         linktitle =>'Approve or reject enrollment requests.',                       permission => $permission->{'cusr'},
                 });                       linktitle =>'Approve or reject enrollment requests.',
                       },
               );
         }          }
           
         if (!exists($permission->{'cusr_section'})){          if (!exists($permission->{'cusr_section'})){
                      
  push(@{ $menu[2]->{items} },              push(@{ $menu[2]->{items} },
  { linktext => 'Automated Enrollment',                  {
  icon => 'roles.png',                   linktext => 'Automated Enrollment',
           #help => 'Course_Automated_Enrollment',                   icon => 'roles.png',
         permission => (&Apache::lonnet::auto_run($cnum,$cdom)                   #help => 'Course_Automated_Enrollment',
                                 && $permission->{'cusr'}),                   permission => (&Apache::lonnet::auto_run($cnum,$cdom)
  url  => '/adm/populate',                                       && $permission->{'cusr'}),
  linktitle => 'Automated enrollment manager.',                   url  => '/adm/populate',
  },                   linktitle => 'Automated enrollment manager.',
  { linktext => 'User Self-Enrollment',                  },
  icon => 'cstr.png',                  {
        #help => 'Course_Self_Enrollment',                   linktext => 'User Self-Enrollment',
  url => '/adm/createuser?action=selfenroll',                   icon => 'cstr.png',
  permission => $permission->{'cusr'},                   #help => 'Course_Self_Enrollment',
  linktitle => 'Configure user self enrollment.',                   url => '/adm/createuser?action=selfenroll',
         });                   permission => $permission->{'cusr'},
                    linktitle => 'Configure user self enrollment.',
  }                  },
               );
  push(@{ $menu[2]->{items} },          
  { linktext => 'Course Groups',          }
  icon => 'conf.png',  
         #help => 'Course_Manage_Group',  
             url => '/adm/coursegroups?refpage=cusr',  
  permission => $permission->{'grp_manage'},  
  linktitle => 'Manage course groups.',  
         },  
         { linktext => 'Change Logs',  
  icon => 'document-properties.png',  
         #help => 'Course_User_Logs',  
         url => '/adm/createuser?action=changelogs',  
  permission => $permission->{'cusr'},  
  linktitle => 'View change log.',  
         });  
     };      };
 return Apache::lonhtmlcommon::generate_menu(@menu);  return Apache::lonhtmlcommon::generate_menu(@menu);
 #               { text => 'View Log-in History',  #               { text => 'View Log-in History',
Line 4014  ENDSCRIPT Line 4046  ENDSCRIPT
             if (ref($lt) eq 'HASH') {              if (ref($lt) eq 'HASH') {
                 $title = $lt->{$item};                  $title = $lt->{$item};
             }              }
             $output .=               $output .= &Apache::lonhtmlcommon::row_title($title);
                 &Apache::lonhtmlcommon::row_title($title,  
                              'LC_selfenroll_pick_box_title','LC_oddrow_value')."\n";  
             if ($item eq 'types') {              if ($item eq 'types') {
                 my $curr_types = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_types'};                  my $curr_types = $env{'course.'.$env{'request.course.id'}.'.internal.selfenroll_types'};
                 my $showdomdesc = 1;                  my $showdomdesc = 1;
Line 4957  sub role_display_filter { Line 4987  sub role_display_filter {
                &mt('[_1]Note:[_2] Only changes made from servers running LON-CAPA 2.6.99.0 or later are displayed.');                 &mt('[_1]Note:[_2] Only changes made from servers running LON-CAPA 2.6.99.0 or later are displayed.');
     if ($version) {      if ($version) {
         $output .= ' '.&mt('This server is version [_3].','<b>','</b>',$version);    }          $output .= ' '.&mt('This server is version [_3].','<b>','</b>',$version);    }
     $output .= '</span><hr noshade><br />';      $output .= '</span><hr /><br />';
     return $output;      return $output;
 }  }
   
Line 5370  sub build_search_response { Line 5400  sub build_search_response {
                                 .&mt("You are not authorized to create new users in your current role's domain - [_1]."                                  .&mt("You are not authorized to create new users in your current role's domain - [_1]."
                                     ,'<span class="LC_cusr_emph">'.$env{'request.role.domain'}.'</span>')                                      ,'<span class="LC_cusr_emph">'.$env{'request.role.domain'}.'</span>')
                                 .'<br />'                                  .'<br />'
                                 .&mt('Contact the [_1]helpdesk[_2] if you need to create a new user.'                                  .&mt('Please contact the [_1]helpdesk[_2] if you need to create a new user.'
                                     ,' <a'.$helplink.'>'                                      ,' <a'.$helplink.'>'
                                     ,'</a>')                                      ,'</a>')
                                 .'<br /><br />';                                  .'<br /><br />';
Line 5765  sub update_selfenroll_config { Line 5795  sub update_selfenroll_config {
                         }                          }
                     } else {                      } else {
                         my @differences =                            my @differences =  
                             &compare_arrays(\@currnotified,\@newnotified);                              &Apache::loncommon::compare_arrays(\@currnotified,\@newnotified);
                         if (@differences > 0) {                          if (@differences > 0) {
                             if (@newnotified > 0) {                              if (@newnotified > 0) {
                                 $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified);                                  $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified);
Line 5775  sub update_selfenroll_config { Line 5805  sub update_selfenroll_config {
                         }                          }
                     }                      }
                 } else {                  } else {
                     my @differences = &compare_arrays(\@currnotified,\@newnotified);                      my @differences = &Apache::loncommon::compare_arrays(\@currnotified,\@newnotified);
                     if (@differences > 0) {                      if (@differences > 0) {
                         if (@newnotified > 0) {                          if (@newnotified > 0) {
                             $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified);                              $changes{'internal.selfenroll_notifylist'} = join(',',@newnotified);
Line 5965  sub update_selfenroll_config { Line 5995  sub update_selfenroll_config {
     return;      return;
 }  }
   
 sub compare_arrays {  
     my ($arrayref1,$arrayref2) = @_;  
     my (@difference,%count);  
     @difference = ();  
     %count = ();  
     if ((ref($arrayref1) eq 'ARRAY') && (ref($arrayref2) eq 'ARRAY')) {   
         foreach my $element (@{$arrayref1}, @{$arrayref2}) { $count{$element}++; }  
         foreach my $element (keys(%count)) {  
             if ($count{$element} == 1) {  
                 push(@difference,$element);  
             }  
         }  
     }  
     return @difference;  
 }  
   
 sub get_selfenroll_titles {  sub get_selfenroll_titles {
     my @row = ('types','registered','enroll_dates','access_dates','section',      my @row = ('types','registered','enroll_dates','access_dates','section',
                'approval','limit');                 'approval','limit');

Removed from v.1.291  
changed lines
  Added in v.1.299


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