Diff for /loncom/interface/loncreateuser.pm between versions 1.362 and 1.366

version 1.362, 2012/08/14 15:45:06 version 1.366, 2012/10/02 18:08:12
Line 1651  sub display_existing_roles { Line 1651  sub display_existing_roles {
                 $allowed=1;                  $allowed=1;
             }              }
             unless ($allowed) {              unless ($allowed) {
                 my $isowner = &is_courseowner($cid,$coursedata{'internal.courseowner'});                  my $isowner = &Apache::lonuserutils::is_courseowner($cid,$coursedata{'internal.courseowner'});
                 if ($isowner) {                  if ($isowner) {
                     if (($role_code eq 'co') && ($class eq 'Community')) {                      if (($role_code eq 'co') && ($class eq 'Community')) {
                         $allowed = 1;                          $allowed = 1;
Line 1701  sub display_existing_roles { Line 1701  sub display_existing_roles {
                     $allowed=1;                      $allowed=1;
                 }                  }
             }              }
             if ($role_code eq 'ca' || $role_code eq 'au') {              if ($role_code eq 'ca' || $role_code eq 'au' || $role_code eq 'aa') {
                 $class='Construction Space';                  $class='Construction Space';
             } elsif ($role_code eq 'su') {              } elsif ($role_code eq 'su') {
                 $class='System';                  $class='System';
Line 4259  sub handler { Line 4259  sub handler {
             if ($env{'form.phase'} eq 'createnewuser') {              if ($env{'form.phase'} eq 'createnewuser') {
                 my $response;                  my $response;
                 if ($env{'form.srchterm'} !~ /^$match_username$/) {                  if ($env{'form.srchterm'} !~ /^$match_username$/) {
                     my $response = &mt('You must specify a valid username. Only the following are allowed: letters numbers - . @');                      my $response =
                           '<span class="LC_warning">'
                          .&mt('You must specify a valid username. Only the following are allowed:'
                              .' letters numbers - . @')
                          .'</span>';
                     $env{'form.phase'} = '';                      $env{'form.phase'} = '';
                     &print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum);                      &print_username_entry_form($r,$context,$response,$srch,undef,$crstype,$brcrum);
                 } else {                  } else {
Line 4380  sub handler { Line 4384  sub handler {
                      bread_crumbs_component => $bread_crumbs_component};                       bread_crumbs_component => $bread_crumbs_component};
             my ($cb_jscript,$jscript,$totcodes,$codetitles,$idlist,$idlist_titles);              my ($cb_jscript,$jscript,$totcodes,$codetitles,$idlist,$idlist_titles);
             my $formname = 'studentform';              my $formname = 'studentform';
               my $hidecall = "hide_searching();";
             if (($context eq 'domain') && (($env{'form.roletype'} eq 'course') ||              if (($context eq 'domain') && (($env{'form.roletype'} eq 'course') ||
                 ($env{'form.roletype'} eq 'community'))) {                  ($env{'form.roletype'} eq 'community'))) {
                 if ($env{'form.roletype'} eq 'course') {                  if ($env{'form.roletype'} eq 'course') {
Line 4396  sub handler { Line 4401  sub handler {
                                    );                                     );
                     $jscript = &Apache::lonhtmlcommon::set_form_elements(\%elements);                      $jscript = &Apache::lonhtmlcommon::set_form_elements(\%elements);
                 }                  }
                 $jscript .= &verify_user_display();                  $jscript .= &verify_user_display($context)."\n".
                               &Apache::loncommon::check_uncheck_jscript();
                 my $js = &add_script($jscript).$cb_jscript;                  my $js = &add_script($jscript).$cb_jscript;
                 my $loadcode =                   my $loadcode = 
                     &Apache::lonuserutils::course_selector_loadcode($formname);                      &Apache::lonuserutils::course_selector_loadcode($formname);
                 if ($loadcode ne '') {                  if ($loadcode ne '') {
                     $args->{add_entries} = {onload => $loadcode};                      $args->{add_entries} = {onload => "$loadcode;$hidecall"};
                   } else {
                       $args->{add_entries} = {onload => $hidecall};
                 }                  }
                 $r->print(&header($js,$args));                  $r->print(&header($js,$args));
             } else {              } else {
                 $r->print(&header(&add_script(&verify_user_display()),$args));                  $args->{add_entries} = {onload => $hidecall};
                   $jscript = &verify_user_display($context).
                              &Apache::loncommon::check_uncheck_jscript(); 
                   $r->print(&header(&add_script($jscript),$args));
             }              }
             &Apache::lonuserutils::print_userlist($r,undef,$permission,$context,              &Apache::lonuserutils::print_userlist($r,undef,$permission,$context,
                          $formname,$totcodes,$codetitles,$idlist,$idlist_titles);                           $formname,$totcodes,$codetitles,$idlist,$idlist_titles);
Line 4496  sub handler { Line 4507  sub handler {
                           $cdom,$cnum,$coursedesc));                            $cdom,$cnum,$coursedesc));
         }          }
     } elsif ($env{'form.action'} eq 'changelogs') {      } elsif ($env{'form.action'} eq 'changelogs') {
           my $helpitem;
           if ($context eq 'course') {
               $helpitem = 'Course_User_Logs';
           }
         push (@{$brcrum},          push (@{$brcrum},
                  {href => '/adm/createuser?action=changelogs',                   {href => '/adm/createuser?action=changelogs',
                   text => 'User Management Logs',                    text => 'User Management Logs',
                   help => 'Course_User_Logs'});                    help => $helpitem});
         $bread_crumbs_component = 'User Changes';          $bread_crumbs_component = 'User Changes';
         $args = { bread_crumbs           => $brcrum,          $args = { bread_crumbs           => $brcrum,
                   bread_crumbs_component => $bread_crumbs_component};                    bread_crumbs_component => $bread_crumbs_component};
Line 4537  sub add_script { Line 4552  sub add_script {
 }  }
   
 sub verify_user_display {  sub verify_user_display {
       my ($context) = @_;
       my $photos;
       if (($context eq 'course') && $env{'request.course.id'}) {
           $photos = $env{'course.'.$env{'request.course.id'}.'.internal.showphoto'};
       }
     my $output = <<"END";      my $output = <<"END";
   
   function hide_searching() {
       if (document.getElementById('searching')) {
           document.getElementById('searching').style.display = 'none';
       }
       return;
   }
   
 function display_update() {  function display_update() {
     document.studentform.action.value = 'listusers';      document.studentform.action.value = 'listusers';
     document.studentform.phase.value = 'display';      document.studentform.phase.value = 'display';
     document.studentform.submit();      document.studentform.submit();
 }  }
   
   function updateCols(caller) {
       var context = '$context';
       var photos = '$photos';
       if (caller == 'Status') {
           if (document.studentform.Status.options[document.studentform.Status.selectedIndex].value == 'Any') {
               document.getElementById('showcolstatus').checked = true;
               document.getElementById('showcolstatus').disabled = '';
               document.getElementById('showcolstart').checked = true;
               document.getElementById('showcolend').checked = true;
           } else {
               document.getElementById('showcolstatus').checked = false;
               document.getElementById('showcolstatus').disabled = 'disabled';
               document.getElementById('showcolstart').checked = false;
               document.getElementById('showcolend').checked = false;
           }
       }
       if (caller == 'output') {
           if (photos == 1) {
               if (document.getElementById('showcolphoto')) {
                   var photoitem = document.getElementById('showcolphoto');
                   if (document.studentform.output.options[document.studentform.output.selectedIndex].value == 'html') {
                       photoitem.checked = true;
                       photoitem.disabled = '';
                   } else {
                       photoitem.checked = false;
                       photoitem.disabled = 'disabled';
                   }
               }
           }
       }
       if (caller == 'showrole') {
           if (document.studentform.showrole.options[document.studentform.showrole.selectedIndex].value == 'Any') {
               document.getElementById('showcolrole').checked = true;
               document.getElementById('showcolrole').disabled = '';
           } else {
               document.getElementById('showcolrole').checked = false;
               document.getElementById('showcolrole').disabled = 'disabled';
           }
       }
       return;
   }
   
 END  END
     return $output;      return $output;
   
Line 4659  sub print_main_menu { Line 4728  sub print_main_menu {
              permission => $permission->{'cusr'},               permission => $permission->{'cusr'},
              linktitle => 'Approve or reject author role requests',               linktitle => 'Approve or reject author role requests',
             },              },
               {
                linktext => 'Change Log',
                icon => 'document-properties.png',
                #help => 'Course_User_Logs',
                url => '/adm/createuser?action=changelogs',
                permission => $permission->{'cusr'},
                linktitle => 'View change log.',
               },
         );          );
                   
     }elsif ($context eq 'course'){      }elsif ($context eq 'course'){
Line 4775  sub print_main_menu { Line 4852  sub print_main_menu {
                 },                  },
             );              );
         }          }
     };      } elsif ($context eq 'author') {
 return Apache::lonhtmlcommon::generate_menu(@menu);              {
                linktext => 'Change Log',
                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);
 #               { text => 'View Log-in History',  #               { text => 'View Log-in History',
 #                 help => 'Course_User_Logins',  #                 help => 'Course_User_Logins',
 #                 action => 'logins',  #                 action => 'logins',
Line 5466  sub selfenroll_date_forms { Line 5552  sub selfenroll_date_forms {
   
 sub print_userchangelogs_display {  sub print_userchangelogs_display {
     my ($r,$context,$permission) = @_;      my ($r,$context,$permission) = @_;
     my $formname = 'roleslog';      my $formname = 'rolelog';
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my ($username,$domain,$crstype,%roleslog);
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};      if ($context eq 'domain') {
     my $crstype = &Apache::loncommon::course_type();          $domain = $env{'request.role.domain'};
     my %roleslog=&Apache::lonnet::dump('nohist_rolelog',$cdom,$cnum);          %roleslog=&Apache::lonnet::dump_dom('nohist_rolelog',$domain);
       } else {
           if ($context eq 'course') { 
               $domain = $env{'course.'.$env{'request.course.id'}.'.domain'};
               $username = $env{'course.'.$env{'request.course.id'}.'.num'};
               $crstype = &Apache::loncommon::course_type();
               my %saveable_parameters = ('show' => 'scalar',);
               &Apache::loncommon::store_course_settings('roles_log',
                                                         \%saveable_parameters);
               &Apache::loncommon::restore_course_settings('roles_log',
                                                           \%saveable_parameters);
           } elsif ($context eq 'author') {
               $domain = $env{'user.domain'}; 
               if ($env{'request.role'} =~ m{^au\./\Q$domain\E/$}) {
                   $username = $env{'user.name'};
               } else {
                   undef($domain);
               }
           }
           if ($domain ne '' && $username ne '') { 
               %roleslog=&Apache::lonnet::dump('nohist_rolelog',$domain,$username);
           }
       }
     if ((keys(%roleslog))[0]=~/^error\:/) { undef(%roleslog); }      if ((keys(%roleslog))[0]=~/^error\:/) { undef(%roleslog); }
   
     my %saveable_parameters = ('show' => 'scalar',);  
     &Apache::loncommon::store_course_settings('roles_log',  
                                               \%saveable_parameters);  
     &Apache::loncommon::restore_course_settings('roles_log',  
                                                 \%saveable_parameters);  
     # set defaults      # set defaults
     my $now = time();      my $now = time();
     my $defstart = $now - (7*24*3600); #7 days ago       my $defstart = $now - (7*24*3600); #7 days ago 
Line 5519  sub print_userchangelogs_display { Line 5622  sub print_userchangelogs_display {
   
     # Form Header      # Form Header
     $r->print('<form action="/adm/createuser" method="post" name="'.$formname.'">'.      $r->print('<form action="/adm/createuser" method="post" name="'.$formname.'">'.
               &role_display_filter($formname,$cdom,$cnum,\%curr,$version,$crstype));                &role_display_filter($context,$formname,$domain,$username,\%curr,
                                      $version,$crstype));
   
     # Create navigation      # Create navigation
     my ($nav_script,$nav_links) = &userlogdisplay_nav($formname,\%curr,$more_records);      my ($nav_script,$nav_links) = &userlogdisplay_nav($formname,\%curr,$more_records);
Line 5532  sub print_userchangelogs_display { Line 5636  sub print_userchangelogs_display {
        .'<th>'.&mt('When').'</th>'         .'<th>'.&mt('When').'</th>'
        .'<th>'.&mt('Who made the change').'</th>'         .'<th>'.&mt('Who made the change').'</th>'
        .'<th>'.&mt('Changed User').'</th>'         .'<th>'.&mt('Changed User').'</th>'
        .'<th>'.&mt('Role').'</th>'         .'<th>'.&mt('Role').'</th>';
        .'<th>'.&mt('Section').'</th>'  
        .'<th>'.&mt('Context').'</th>'      if ($context eq 'course') {
           $tableheader .= '<th>'.&mt('Section').'</th>';
       }
       $tableheader .=
           '<th>'.&mt('Context').'</th>'
        .'<th>'.&mt('Start').'</th>'         .'<th>'.&mt('Start').'</th>'
        .'<th>'.&mt('End').'</th>'         .'<th>'.&mt('End').'</th>'
        .&Apache::loncommon::end_data_table_header_row();         .&Apache::loncommon::end_data_table_header_row();
Line 5603  sub print_userchangelogs_display { Line 5711  sub print_userchangelogs_display {
         if ($roleslog{$id}{'logentry'}{'selfenroll'}) {          if ($roleslog{$id}{'logentry'}{'selfenroll'}) {
             $chgcontext = 'selfenroll';              $chgcontext = 'selfenroll';
         }          }
         my %lt = &rolechg_contexts($crstype);          my %lt = &rolechg_contexts($context,$crstype);
         if ($chgcontext ne '' && $lt{$chgcontext} ne '') {          if ($chgcontext ne '' && $lt{$chgcontext} ne '') {
             $chgcontext = $lt{$chgcontext};              $chgcontext = $lt{$chgcontext};
         }          }
Line 5613  sub print_userchangelogs_display { Line 5721  sub print_userchangelogs_display {
            .'<td>'.&Apache::lonlocal::locallocaltime($roleslog{$id}{'exe_time'}).'</td>'             .'<td>'.&Apache::lonlocal::locallocaltime($roleslog{$id}{'exe_time'}).'</td>'
            .'<td>'.$whodunit{$roleslog{$id}{'exe_uname'}.':'.$roleslog{$id}{'exe_udom'}}.'</td>'             .'<td>'.$whodunit{$roleslog{$id}{'exe_uname'}.':'.$roleslog{$id}{'exe_udom'}}.'</td>'
            .'<td>'.$changed{$roleslog{$id}{'uname'}.':'.$roleslog{$id}{'udom'}}.'</td>'             .'<td>'.$changed{$roleslog{$id}{'uname'}.':'.$roleslog{$id}{'udom'}}.'</td>'
            .'<td>'.&Apache::lonnet::plaintext($roleslog{$id}{'logentry'}{'role'},$crstype).'</td>'             .'<td>'.&Apache::lonnet::plaintext($roleslog{$id}{'logentry'}{'role'},$crstype).'</td>');
            .'<td>'.$sec.'</td>'          if ($context eq 'course') { 
            .'<td>'.$chgcontext.'</td>'              $r->print('<td>'.$sec.'</td>');
           }
           $r->print(
               '<td>'.$chgcontext.'</td>'
            .'<td>'.$rolestart.'</td>'             .'<td>'.$rolestart.'</td>'
            .'<td>'.$roleend.'</td>'             .'<td>'.$roleend.'</td>'
            .&Apache::loncommon::end_data_table_row()."\n");             .&Apache::loncommon::end_data_table_row()."\n");
Line 5683  ENDSCRIPT Line 5794  ENDSCRIPT
 }  }
   
 sub role_display_filter {  sub role_display_filter {
     my ($formname,$cdom,$cnum,$curr,$version,$crstype) = @_;      my ($context,$formname,$cdom,$cnum,$curr,$version,$crstype) = @_;
     my $context = 'course';      my $lctype;
     my $lctype = lc($crstype);      if ($context eq 'course') {
           $lctype = lc($crstype);
       }
     my $nolink = 1;      my $nolink = 1;
     my $output = '<table><tr><td valign="top">'.      my $output = '<table><tr><td valign="top">'.
                  '<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b></span><br />'.                   '<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b></span><br />'.
Line 5700  sub role_display_filter { Line 5813  sub role_display_filter {
         &Apache::lonhtmlcommon::date_setter($formname,'rolelog_end_date',          &Apache::lonhtmlcommon::date_setter($formname,'rolelog_end_date',
                                             $curr->{'rolelog_end_date'},undef,                                              $curr->{'rolelog_end_date'},undef,
                                             undef,undef,undef,undef,undef,undef,$nolink);                                              undef,undef,undef,undef,undef,undef,$nolink);
     my %lt = &rolechg_contexts($crstype);      my %lt = &rolechg_contexts($context,$crstype);
     $output .= '<td valign="top"><b>'.&mt('Window during which changes occurred:').'</b><br />'.      $output .= '<td valign="top"><b>'.&mt('Window during which changes occurred:').'</b><br />'.
                '<table><tr><td>'.&mt('After:').                 '<table><tr><td>'.&mt('After:').
                '</td><td>'.$startform.'</td></tr>'.                 '</td><td>'.$startform.'</td></tr>'.
Line 5714  sub role_display_filter { Line 5827  sub role_display_filter {
         $output .= ' selected="selected"';          $output .= ' selected="selected"';
     }      }
     $output .=  '>'.&mt('Any').'</option>'."\n";      $output .=  '>'.&mt('Any').'</option>'."\n";
     my @roles = &Apache::lonuserutils::course_roles($context,undef,1,$lctype);      my @roles = &Apache::lonuserutils::roles_by_context($context,1,$crstype);
     foreach my $role (@roles) {      foreach my $role (@roles) {
         my $plrole;          my $plrole;
         if ($role eq 'cr') {          if ($role eq 'cr') {
Line 5732  sub role_display_filter { Line 5845  sub role_display_filter {
                '<td>&nbsp;&nbsp;</td>'.                 '<td>&nbsp;&nbsp;</td>'.
                '<td valign="top"><b>'.                 '<td valign="top"><b>'.
                &mt('Context:').'</b><br /><select name="chgcontext">';                 &mt('Context:').'</b><br /><select name="chgcontext">';
     foreach my $chgtype ('any','auto','updatenow','createcourse','course','domain','selfenroll','requestcourses') {      my @posscontexts;
       if ($context eq 'course') {
           @posscontexts = ('any','auto','updatenow','createcourse','course','domain','selfenroll','requestcourses');
       } elsif ($context eq 'domain') {
           @posscontexts = ('any','domain','requestauthor','domconfig','server');
       } else {
           @posscontexts = ('any','author','domain');
       } 
       foreach my $chgtype (@posscontexts) {
         my $selstr = '';          my $selstr = '';
         if ($curr->{'chgcontext'} eq $chgtype) {          if ($curr->{'chgcontext'} eq $chgtype) {
             $selstr = ' selected="selected"';              $selstr = ' selected="selected"';
         }          }
         if (($chgtype eq 'auto') || ($chgtype eq 'updatenow')) {          if ($context eq 'course') {
             next if (!&Apache::lonnet::auto_run($cnum,$cdom));              if (($chgtype eq 'auto') || ($chgtype eq 'updatenow')) {
                   next if (!&Apache::lonnet::auto_run($cnum,$cdom));
               }
         }          }
         $output .= '<option value="'.$chgtype.'"'.$selstr.'>'.$lt{$chgtype}.'</option>'."\n";          $output .= '<option value="'.$chgtype.'"'.$selstr.'>'.$lt{$chgtype}.'</option>'."\n";
     }      }
Line 5751  sub role_display_filter { Line 5874  sub role_display_filter {
               .'</p>';                .'</p>';
   
     # Server version info      # Server version info
       my $needsrev = '2.11.0';
       if ($context eq 'course') {
           $needsrev = '2.7.0';
       }
       
     $output .= '<p class="LC_info">'      $output .= '<p class="LC_info">'
               .&mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.'                .&mt('Only changes made from servers running LON-CAPA [_1] or later are displayed.'
                   ,'2.6.99.0');                    ,$needsrev);
     if ($version) {      if ($version) {
         $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);          $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version);
     }      }
Line 5762  sub role_display_filter { Line 5890  sub role_display_filter {
 }  }
   
 sub rolechg_contexts {  sub rolechg_contexts {
     my ($crstype) = @_;      my ($context,$crstype) = @_;
     my %lt = &Apache::lonlocal::texthash (      my %lt;
       if ($context eq 'course') {
           %lt = &Apache::lonlocal::texthash (
                                              any          => 'Any',                                               any          => 'Any',
                                              auto         => 'Automated enrollment',                                               auto         => 'Automated enrollment',
                                              updatenow    => 'Roster Update',                                               updatenow    => 'Roster Update',
Line 5773  sub rolechg_contexts { Line 5903  sub rolechg_contexts {
                                              selfenroll   => 'Self-enrolled',                                               selfenroll   => 'Self-enrolled',
                                              requestcourses => 'Course Request',                                               requestcourses => 'Course Request',
                                          );                                           );
     if ($crstype eq 'Community') {          if ($crstype eq 'Community') {
         $lt{'createcourse'} = &mt('Community Creation');              $lt{'createcourse'} = &mt('Community Creation');
         $lt{'course'} = &mt('User Management in community');              $lt{'course'} = &mt('User Management in community');
         $lt{'requestcourses'} = &mt('Community Request');              $lt{'requestcourses'} = &mt('Community Request');
     }          }
       } elsif ($context eq 'domain') {
           %lt = &Apache::lonlocal::texthash (
                                                any           => 'Any',
                                                domain        => 'User Management in domain',
                                                requestauthor => 'Authoring Request',
                                                server        => 'Command line script (DC role)',
                                                domconfig     => 'Self-enrolled',
                                            );
       } else {
           %lt = &Apache::lonlocal::texthash (
                                                any    => 'Any',
                                                domain => 'User Management in domain',
                                                author => 'User Management by author',
                                            );
       } 
     return %lt;      return %lt;
 }  }
   
Line 6298  sub course_level_table { Line 6443  sub course_level_table {
  my $thiscourse=$protectedcourse;   my $thiscourse=$protectedcourse;
  $thiscourse=~s:_:/:g;   $thiscourse=~s:_:/:g;
  my %coursedata=&Apache::lonnet::coursedescription($thiscourse);   my %coursedata=&Apache::lonnet::coursedescription($thiscourse);
         my $isowner = &is_courseowner($protectedcourse,$coursedata{'internal.courseowner'});          my $isowner = &Apache::lonuserutils::is_courseowner($protectedcourse,$coursedata{'internal.courseowner'});
  my $area=$coursedata{'description'};   my $area=$coursedata{'description'};
         my $crstype=$coursedata{'type'};          my $crstype=$coursedata{'type'};
  if (!defined($area)) { $area=&mt('Unavailable course').': '.$protectedcourse; }   if (!defined($area)) { $area=&mt('Unavailable course').': '.$protectedcourse; }
Line 6792  sub update_selfenroll_config { Line 6937  sub update_selfenroll_config {
     my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);      my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum);
     if (ref($visactions) eq 'HASH') {      if (ref($visactions) eq 'HASH') {
         if (!$visible) {          if (!$visible) {
             $r->print('<br />'.$visactions->{'miss'}.'<br />'.$visactions->{'yous'}.              $r->print('<br /><span class="LC_warning">'.$visactions->{'miss'}.'</span><br />'.$visactions->{'yous'}.
                       '<br />');                        '<br />');
             if (ref($vismsgs) eq 'ARRAY') {              if (ref($vismsgs) eq 'ARRAY') {
                 $r->print('<br />'.$visactions->{'take'}.'<ul>');                  $r->print('<br />'.$visactions->{'take'}.'<ul>');
Line 6822  sub get_selfenroll_titles { Line 6967  sub get_selfenroll_titles {
     return (\@row,\%lt);      return (\@row,\%lt);
 }  }
   
 sub is_courseowner {  
     my ($thiscourse,$courseowner) = @_;  
     if ($courseowner eq '') {  
         if ($env{'request.course.id'} eq $thiscourse) {  
             $courseowner = $env{'course.'.$env{'request.course.id'}.'.internal.courseowner'};  
         }  
     }  
     if ($courseowner ne '') {  
         if ($courseowner eq $env{'user.name'}.':'.$env{'user.domain'}) {  
             return 1;  
         }  
     }  
     return;  
 }  
   
 #---------------------------------------------- end functions for &phase_two  #---------------------------------------------- end functions for &phase_two
   
 #--------------------------------- functions for &phase_two and &phase_three  #--------------------------------- functions for &phase_two and &phase_three

Removed from v.1.362  
changed lines
  Added in v.1.366


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