Diff for /loncom/interface/lonmodifycourse.pm between versions 1.79.2.2 and 1.81

version 1.79.2.2, 2016/09/17 16:03:36 version 1.81, 2016/04/04 01:09:48
Line 41  use LONCAPA qw(:DEFAULT :match); Line 41  use LONCAPA qw(:DEFAULT :match);
   
 sub get_dc_settable {  sub get_dc_settable {
     my ($type,$cdom) = @_;      my ($type,$cdom) = @_;
     if ($type eq 'Community') {      if (($type eq 'Community') || ($type eq 'Placement')) {
         return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');          return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');
     } else {      } else {
         my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc',          my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc');
                      'selfenrollmgrcc','mysqltables');  
         if (&showcredits($cdom)) {          if (&showcredits($cdom)) {
             push(@items,'defaultcredits');              push(@items,'defaultcredits');
         }          }
Line 56  sub get_dc_settable { Line 55  sub get_dc_settable {
 sub autoenroll_keys {  sub autoenroll_keys {
     my $internals = ['coursecode','courseowner','authtype','autharg','defaultcredits',      my $internals = ['coursecode','courseowner','authtype','autharg','defaultcredits',
                      'autoadds','autodrops','autostart','autoend','sectionnums',                       'autoadds','autodrops','autostart','autoend','sectionnums',
                      'crosslistings','co-owners','autodropfailsafe'];                       'crosslistings','co-owners'];
     my $accessdates = ['default_enrollment_start_date','default_enrollment_end_date'];      my $accessdates = ['default_enrollment_start_date','default_enrollment_end_date'];
     return ($internals,$accessdates);      return ($internals,$accessdates);
 }  }
Line 72  sub catalog_settable { Line 71  sub catalog_settable {
             if ($confhash->{'categorizecomm'} ne 'comm') {              if ($confhash->{'categorizecomm'} ne 'comm') {
                 push(@settable,'categorize');                  push(@settable,'categorize');
             }              }
           } elsif ($type eq 'Placement') {
               if ($confhash->{'togglecatsplace'} ne 'place') {
                   push(@settable,'togglecats');
               }
               if ($confhash->{'categorizeplace'} ne 'place') {
                   push(@settable,'categorize');
               }
         } else {          } else {
             if ($confhash->{'togglecats'} ne 'crs') {              if ($confhash->{'togglecats'} ne 'crs') {
                 push(@settable,'togglecats');                  push(@settable,'togglecats');
Line 118  sub get_enrollment_settings { Line 124  sub get_enrollment_settings {
                 $enrollvar{$type} =~ s/,/, /g;                  $enrollvar{$type} =~ s/,/, /g;
             } elsif ($type eq "authtype"              } elsif ($type eq "authtype"
                      || $type eq "autharg"    || $type eq "coursecode"                       || $type eq "autharg"    || $type eq "coursecode"
                      || $type eq "crosslistings" || $type eq "selfenrollmgr"                       || $type eq "crosslistings") {
 +                    || $type eq "autodropfailsafe") {  
                 $enrollvar{$type} = $settings{$item};                  $enrollvar{$type} = $settings{$item};
             } elsif ($type eq 'defaultcredits') {              } elsif ($type eq 'defaultcredits') {
                 if (&showcredits($cdom)) {                  if (&showcredits($cdom)) {
                     $enrollvar{$type} = $settings{$item};                      $enrollvar{$type} = $settings{$item};
                 }                  }
               } elsif ($type eq 'selfenrollmgr') {
                   $enrollvar{$type} = $settings{$item};    
             } elsif ($type eq 'courseowner') {              } elsif ($type eq 'courseowner') {
                 if ($settings{$item} =~ /^[^:]+:[^:]+$/) {                  if ($settings{$item} =~ /^[^:]+:[^:]+$/) {
                     $enrollvar{$type} = $settings{$item};                      $enrollvar{$type} = $settings{$item};
Line 167  sub print_course_search_page { Line 174  sub print_course_search_page {
     $r->print(&Apache::loncommon::js_changer());      $r->print(&Apache::loncommon::js_changer());
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $r->print('<h3>'.&mt('Search for a community in the [_1] domain',$domdesc).'</h3>');          $r->print('<h3>'.&mt('Search for a community in the [_1] domain',$domdesc).'</h3>');
       } elsif ($type eq 'Placement') {
           $r->print('<h3>'.&mt('Search for a placement test in the [_1] domain',$domdesc).'</h3>');
     } else {      } else {
         $r->print('<h3>'.&mt('Search for a course in the [_1] domain',$domdesc).'</h3>');          $r->print('<h3>'.&mt('Search for a course in the [_1] domain',$domdesc).'</h3>');
     }      }
Line 178  sub print_course_search_page { Line 187  sub print_course_search_page {
                   '<li>'.&mt('Enter the community with the role of [_1]',$cctitle).'</li>'."\n".                    '<li>'.&mt('Enter the community with the role of [_1]',$cctitle).'</li>'."\n".
                   '<li>'.&mt('View or modify community settings which only a [_1] may modify.',$dctitle).                    '<li>'.&mt('View or modify community settings which only a [_1] may modify.',$dctitle).
                   '</li>'."\n".'</ul>');                    '</li>'."\n".'</ul>');
       } elsif ($type eq 'Placement') {
           $r->print(&mt('Actions available after searching for a placement test:').'<ul>'.
                     '<li>'.&mt('Enter the placement test with the role of [_1]',$cctitle).'</li>'."\n".
                     '<li>'.&mt('View or modify placement test settings which only a [_1] may modify.',$dctitle).
                     '</li>'."\n".'</ul>');
     } else {      } else {
         $r->print(&mt('Actions available after searching for a course:').'<ul>'.          $r->print(&mt('Actions available after searching for a course:').'<ul>'.
                   '<li>'.&mt('Enter the course with the role of [_1]',$cctitle).'</li>'."\n".                    '<li>'.&mt('Enter the course with the role of [_1]',$cctitle).'</li>'."\n".
Line 254  sub print_modification_menu { Line 268  sub print_modification_menu {
         $categorytitle = 'View/Modify Course Settings';          $categorytitle = 'View/Modify Course Settings';
         $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.');          $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.');
         $setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.');          $setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.');
         if (&showcredits($dom)) {          if ($type eq 'Placement') {
             $setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, self-enrollment and table lifetime';              $setparams_text = 'View/Modify course owner and self-enrollment';
           } elsif (&showcredits($dom)) {
               $setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, and self-enrollment';
         } else {          } else {
             $setparams_text = 'View/Modify course owner, institutional code, default authentication, self-enrollment and table lifetime';              $setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment';
         }          }
         $cat_text = 'View/Modify catalog settings for course';          $cat_text = 'View/Modify catalog settings for course';
     }      }
Line 320  sub print_modification_menu { Line 336  sub print_modification_menu {
             {              {
                 linktext => 'Display current settings for automated enrollment',                  linktext => 'Display current settings for automated enrollment',
                 url => &phaseurl('viewparms'),                  url => &phaseurl('viewparms'),
                 permission => ($type ne 'Community'),                  permission => (($type ne 'Community') && ($type ne 'Placement')),
                 #help => '',                  #help => '',
                 icon => 'roles.png',                  icon => 'roles.png',
                 linktitle => ''                  linktitle => ''
Line 359  sub print_modification_menu { Line 375  sub print_modification_menu {
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>'."\n".          $menu_html .= '<li>'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'</li>'."\n".
                       '<li>'.&mt('Override defaults for who configures self-enrollment for this specific community').'</li>'."\n";                        '<li>'.&mt('Override defaults for who configures self-enrollment for this specific community').'</li>'."\n";
       } elsif ($type eq 'Placement') {
           $menu_html .= '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n".
                         '<li>'.&mt('Override defaults for who configures self-enrollment for this specific course.').'</li>'."\n";
   
     } else {      } else {
         $menu_html .=  '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n".          $menu_html .=  '<li>'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'</li>'."\n".
                        '<li>'.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").'</li>'."\n";                         '<li>'.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").'</li>'."\n";
         if (&showcredits($dom)) {          if (($type ne 'Placement') && &showcredits($dom)) {
             $menu_html .= '<li>'.&mt('Default credits earned by student on course completion.').'</li>'."\n";              $menu_html .= '<li>'.&mt('Default credits earned by student on course completion.').'</li>'."\n";
         }          }
         $menu_html .= ' <li>'.&mt('Override defaults for who configures self-enrollment for this specific course.').'</li>'."\n";          $menu_html .= ' <li>'.&mt('Override defaults for who configures self-enrollment for this specific course.').'</li>'."\n";
     }      }
     $menu_html .= '<li>'.$mysqltables_text.'</li>'."\n".      $menu_html .= '<li>'.$setquota_text.'</li>'."\n".
                   '<li>'.$setquota_text.'</li>'."\n".  
                   '<li>'.$setuploadquota_text.'</li>'."\n".                    '<li>'.$setuploadquota_text.'</li>'."\n".
                   '<li>'.$anon_text.'</li>'."\n".                    '<li>'.$anon_text.'</li>'."\n".
                   '<li>'.$postsubmit_text.'</li>'."\n";                    '<li>'.$postsubmit_text.'</li>'."\n";
Line 635  sub domain_postsubtimeout { Line 654  sub domain_postsubtimeout {
     my ($cdom,$type,$settings) = @_;      my ($cdom,$type,$settings) = @_;
     return unless (ref($settings) eq 'HASH');       return unless (ref($settings) eq 'HASH'); 
     my $lctype = lc($type);      my $lctype = lc($type);
     unless ($type eq 'Community') {      unless (($type eq 'Community') || ($type eq 'Placement')) {
         $lctype = 'unofficial';          $lctype = 'unofficial';
         if ($settings->{'internal.coursecode'}) {          if ($settings->{'internal.coursecode'}) {
             $lctype = 'official';              $lctype = 'official';
Line 694  sub print_catsettings { Line 713  sub print_catsettings {
                       '&nbsp;<label><input name="hidefromcat" type="radio" value="yes" '.$excludeon.' />'.&mt('Yes').'</label>&nbsp;&nbsp;&nbsp;<label><input name="hidefromcat" type="radio" value="" '.$excludeoff.' />'.&mt('No').'</label><br /><p>');                        '&nbsp;<label><input name="hidefromcat" type="radio" value="yes" '.$excludeon.' />'.&mt('Yes').'</label>&nbsp;&nbsp;&nbsp;<label><input name="hidefromcat" type="radio" value="" '.$excludeoff.' />'.&mt('No').'</label><br /><p>');
             if ($type eq 'Community') {              if ($type eq 'Community') {
                 $r->print(&mt("If a community has been categorized using at least one of the categories defined for communities in the domain, it will be listed in the domain's publicly accessible Course/Community Catalog, unless excluded."));                  $r->print(&mt("If a community has been categorized using at least one of the categories defined for communities in the domain, it will be listed in the domain's publicly accessible Course/Community Catalog, unless excluded."));
               } elsif ($type eq 'Placement') {
                   $r->print(&mt("If a placement test has been categorized using at least one of the categories defined for placement tests in the domain, it will be listed in the domain's publicly accessible Course/Community Catalog, unless excluded."));
             } else {              } else {
                 $r->print(&mt("Unless excluded, a course will be listed in the domain's publicly accessible Course/Community Catalog, if at least one of the following applies").':<ul>'.                  $r->print(&mt("Unless excluded, a course will be listed in the domain's publicly accessible Course/Community Catalog, if at least one of the following applies").':<ul>'.
                           '<li>'.&mt('Auto-cataloging is enabled and the course is assigned an institutional code.').'</li>'.                            '<li>'.&mt('Auto-cataloging is enabled and the course is assigned an institutional code.').'</li>'.
Line 715  sub print_catsettings { Line 736  sub print_catsettings {
             } else {              } else {
                 $r->print(&mt('No categories defined for this domain'));                  $r->print(&mt('No categories defined for this domain'));
             }              }
             unless ($type eq 'Community') {               unless (($type eq 'Community') || ($type eq 'Placement')) { 
                 $r->print('<p>'.&mt('If auto-cataloging based on institutional code is enabled in the domain, a course will continue to be listed in the catalog of official courses, in addition to receiving a listing under any manually assigned categor(ies).').'</p>');                  $r->print('<p>'.&mt('If auto-cataloging based on institutional code is enabled in the domain, a course will continue to be listed in the catalog of official courses, in addition to receiving a listing under any manually assigned categor(ies).').'</p>');
             }              }
         }          }
Line 754  sub print_course_modification_page { Line 775  sub print_course_modification_page {
     my ($ownertable,$ccrole,$javascript_validations,$authenitems,$ccname);      my ($ownertable,$ccrole,$javascript_validations,$authenitems,$ccname);
     my %enrollvar = &get_enrollment_settings($cdom,$cnum);      my %enrollvar = &get_enrollment_settings($cdom,$cnum);
     my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.textbook',      my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.textbook',
                                                        'internal.selfenrollmgrdc','internal.selfenrollmgrcc',                                                         'internal.selfenrollmgrdc','internal.selfenrollmgrcc'],
                                                        'internal.mysqltables'],$cdom,$cnum);                                          $cdom,$cnum);
     my $type = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$crstype,\%settings);      my $type = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$crstype,\%settings);
     my @specific_managebydc = split(/,/,$settings{'internal.selfenrollmgrdc'});      my @specific_managebydc = split(/,/,$settings{'internal.selfenrollmgrdc'});
     my @specific_managebycc = split(/,/,$settings{'internal.selfenrollmgrcc'});      my @specific_managebycc = split(/,/,$settings{'internal.selfenrollmgrcc'});
Line 832  sub print_course_modification_page { Line 853  sub print_course_modification_page {
         $r->print(&Apache::lonhtmlcommon::row_title(          $r->print(&Apache::lonhtmlcommon::row_title(
                   &Apache::loncommon::help_open_topic('Modify_Community_Owner').                    &Apache::loncommon::help_open_topic('Modify_Community_Owner').
                   '&nbsp;'.&mt('Community Owner'))."\n");                    '&nbsp;'.&mt('Community Owner'))."\n");
       } elsif ($crstype eq 'Placement') {
            $r->print(&Apache::lonhtmlcommon::row_title(
                      &Apache::loncommon::help_open_topic('Modify_Course_Owner').
                         '&nbsp;'.&mt('Course Owner'))."\n");
     } else {      } else {
         $r->print(&Apache::lonhtmlcommon::row_title(          $r->print(&Apache::lonhtmlcommon::row_title(
                       &Apache::loncommon::help_open_topic('Modify_Course_Instcode').                        &Apache::loncommon::help_open_topic('Modify_Course_Instcode').
Line 903  sub print_course_modification_page { Line 928  sub print_course_modification_page {
                   &Apache::loncommon::end_data_table_row()."\n");                    &Apache::loncommon::end_data_table_row()."\n");
     }      }
     $r->print(&Apache::loncommon::end_data_table()."\n".      $r->print(&Apache::loncommon::end_data_table()."\n".
               '<br />'.&Apache::lonhtmlcommon::row_closure().                '<br />'.&Apache::lonhtmlcommon::row_closure(1).
               &Apache::lonhtmlcommon::row_title(  
               &Apache::loncommon::help_open_topic('Modify_Course_Table_Lifetime').  
               '&nbsp;'.&mt('"Temporary" Tables Lifetime (s)'))."\n".  
               '<input type="text" size="10" name="mysqltables" value="'.$settings{'internal.mysqltables'}.'" />'.  
               &Apache::lonhtmlcommon::row_closure(1).  
               &Apache::lonhtmlcommon::end_pick_box().'</p><p>'.$hidden_elements.                &Apache::lonhtmlcommon::end_pick_box().'</p><p>'.$hidden_elements.
               '<input type="button" onclick="javascript:changePage(this.form,'."'processparms'".');');                '<input type="button" onclick="javascript:changePage(this.form,'."'processparms'".');');
     if ($crstype eq 'Community') {      if (($crstype eq 'Community') || ($crstype eq 'Placement')) {
         $r->print('this.form.submit();"');          $r->print('this.form.submit();"');
     } else {      } else {
         $r->print('javascript:verify_message(this.form);"');          $r->print('javascript:verify_message(this.form);"');
Line 1030  sub modify_course { Line 1050  sub modify_course {
     my %longtype = &course_settings_descrip($type);      my %longtype = &course_settings_descrip($type);
     my @items = ('internal.courseowner','description','internal.co-owners',      my @items = ('internal.courseowner','description','internal.co-owners',
                  'internal.pendingco-owners','internal.selfenrollmgrdc',                   'internal.pendingco-owners','internal.selfenrollmgrdc',
                  'internal.selfenrollmgrcc','internal.mysqltables');                   'internal.selfenrollmgrcc');
     my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();      my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();
     unless ($type eq 'Community') {      unless (($type eq 'Community') || ($type eq 'Placement')) {
         push(@items,('internal.coursecode','internal.authtype','internal.autharg',          push(@items,('internal.coursecode','internal.authtype','internal.autharg',
                      'internal.sectionnums','internal.crosslistings'));                       'internal.sectionnums','internal.crosslistings'));
         if (&showcredits($cdom)) {            if (&showcredits($cdom)) {  
Line 1050  sub modify_course { Line 1070  sub modify_course {
     if ($type eq 'Community') {      if ($type eq 'Community') {
         %changed = ( owner  => 0 );          %changed = ( owner  => 0 );
         $ccrole = 'co';          $ccrole = 'co';
       } elsif ($type eq 'Placement') {
           %changed = ( owner  => 0 );
           $ccrole = 'cc';
     } else {      } else {
         %changed = ( code  => 0,          %changed = ( code  => 0,
                      owner => 0,                       owner => 0,
Line 1101  sub modify_course { Line 1124  sub modify_course {
                 $changed{'code'} = 1;                  $changed{'code'} = 1;
             }              }
         }          }
         if ( exists($env{'form.mysqltables'}) ) {  
             $newattr{'mysqltables'} = $env{'form.mysqltables'};  
             $newattr{'mysqltables'} =~ s/\D+//g;  
         }  
         if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) {          if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) {
             $newattr{'defaultcredits'}=$env{'form.defaultcredits'};  
             $newattr{'defaultcredits'} =~ s/[^\d\.]//g;              $newattr{'defaultcredits'} =~ s/[^\d\.]//g;
               $newattr{'defaultcredits'}=$env{'form.defaultcredits'};
         }          }
     }      }
   
Line 1199  sub modify_course { Line 1219  sub modify_course {
                         $shown = &selfenroll_config_status(\@newmgrcc,$selfenrolltitles);                          $shown = &selfenroll_config_status(\@newmgrcc,$selfenrolltitles);
                     } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {                      } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
                         $shown = &mt('None');                          $shown = &mt('None');
                     } elsif (($attr eq 'mysqltables') && ($shown eq '')) {  
                         $shown = &mt('domain default');  
                     }                      }
                     $chgresponse .= '<li>'.&mt('[_1] now set to: [_2]',$longtype{$attr},$shown).'</li>';                      $chgresponse .= '<li>'.&mt('[_1] now set to: [_2]',$longtype{$attr},$shown).'</li>';
                 } else {                  } else {
Line 1211  sub modify_course { Line 1229  sub modify_course {
                         $shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);                          $shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);
                     } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {                      } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
                         $shown = &mt('None');                          $shown = &mt('None');
                     } elsif (($attr eq 'mysqltables') && ($shown eq '')) {  
                         $shown = &mt('domain default');  
                     }                      }
                     $nochgresponse .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';                      $nochgresponse .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';
                 }                  }
             }              }
             if (($type ne 'Community') && ($changed{'code'} || $changed{'owner'})) {              if (($type ne 'Community') && ($type ne 'Placement') && ($changed{'code'} || $changed{'owner'})) {
                 if ( $newattr{'courseowner'} eq '') {                  if ( $newattr{'courseowner'} eq '') {
             push(@warnings,&mt('There is no owner associated with this LON-CAPA course.').              push(@warnings,&mt('There is no owner associated with this LON-CAPA course.').
                                    '<br />'.&mt('If automated enrollment at your institution requires validation of course owners, automated enrollment will fail.'));                                     '<br />'.&mt('If automated enrollment at your institution requires validation of course owners, automated enrollment will fail.'));
Line 1284  sub modify_course { Line 1300  sub modify_course {
                 $shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);                  $shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);
             } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {              } elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
                 $shown = &mt('None');                  $shown = &mt('None');
             }  elsif (($attr eq 'mysqltables') && ($shown eq '')) {  
                 $shown = &mt('domain default');  
             }              }
             $nochgresponse .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';              $nochgresponse .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';
         }          }
Line 2056  ENDSCRIPT Line 2070  ENDSCRIPT
     my $bread_text = "View/Modify Courses/Communities";      my $bread_text = "View/Modify Courses/Communities";
     if ($type eq 'Community') {      if ($type eq 'Community') {
         $bread_text = 'Community Settings';          $bread_text = 'Community Settings';
       } elsif ($type eq 'Placement') {
           $bread_text = 'Placement Test Settings';
     } else {      } else {
         $bread_text = 'Course Settings';          $bread_text = 'Course Settings';
     }      }
Line 2128  sub course_settings_descrip { Line 2144  sub course_settings_descrip {
                       'sectionnums' => 'Course section number:LON-CAPA section',                        'sectionnums' => 'Course section number:LON-CAPA section',
                       'crosslistings' => 'Crosslisted class:LON-CAPA section',                        'crosslistings' => 'Crosslisted class:LON-CAPA section',
                       'defaultcredits' => 'Credits',                        'defaultcredits' => 'Credits',
                       'autodropfailsafe' => "Failsafe section enrollment count",  
                       'selfenrollmgrdc'  => "Course-specific self-enrollment configuration by Domain Coordinator",                        'selfenrollmgrdc'  => "Course-specific self-enrollment configuration by Domain Coordinator",
                       'selfenrollmgrcc'  => "Course-specific self-enrollment configuration by Course personnel",                        'selfenrollmgrcc'  => "Course-specific self-enrollment configuration by Course personnel",
                       'mysqltables'      => '"Temporary" student performance tables lifetime (seconds)',  
   
          );           );
     }      }
Line 2145  sub hidden_form_elements { Line 2159  sub hidden_form_elements {
           'locarg','krbarg','krbver','counter','hidefromcat','usecategory',            'locarg','krbarg','krbver','counter','hidefromcat','usecategory',
           'threshold','postsubmit','postsubtimeout','defaultcredits','uploadquota',            'threshold','postsubmit','postsubtimeout','defaultcredits','uploadquota',
           'selfenrollmgrdc','selfenrollmgrcc','action','state','currsec_st',            'selfenrollmgrdc','selfenrollmgrcc','action','state','currsec_st',
           'sections','newsec','mysqltables'],['^selfenrollmgr_','^selfenroll_'])."\n".            'sections','newsec'],['^selfenrollmgr_'])."\n".
           '<input type="hidden" name="prevphase" value="'.$env{'form.phase'}.'" />';            '<input type="hidden" name="prevphase" value="'.$env{'form.phase'}.'" />';
     return $hidden_elements;      return $hidden_elements;
 }  }
Line 2191  sub handler { Line 2205  sub handler {
             }              }
             my $choose_text;              my $choose_text;
             my $type = $env{'form.type'};              my $type = $env{'form.type'};
   print STDERR "type is ||$type||\n";
             if ($type eq '') {              if ($type eq '') {
                 $type = 'Course';                  $type = 'Course';
             }              }
             if ($type eq 'Community') {              if ($type eq 'Community') {
                 $choose_text = "Choose a community";                  $choose_text = "Choose a community";
               } elsif ($type eq 'Placement') {
                   $choose_text = "Choose a placement test";
             } else {              } else {
                 $choose_text = "Choose a course";                  $choose_text = "Choose a course";
             }               } 
Line 2212  sub handler { Line 2229  sub handler {
                     my $enter_text;                      my $enter_text;
                     if ($type eq 'Community') {                      if ($type eq 'Community') {
                         $enter_text = 'Enter community';                          $enter_text = 'Enter community';
                       } elsif ($type eq 'Placement') {
                           $enter_text = 'Enter placement test'; 
                     } else {                      } else {
                         $enter_text = 'Enter course';                          $enter_text = 'Enter course';
                     }                      }
Line 2316  sub handler { Line 2335  sub handler {
                     $r->print('<span class="LC_error">');                      $r->print('<span class="LC_error">');
                     if ($type eq 'Community') {                      if ($type eq 'Community') {
                         $r->print(&mt('The community you selected is not a valid community in this domain'));                          $r->print(&mt('The community you selected is not a valid community in this domain'));
                       } elsif ($type eq 'Placement') {
                           $r->print(&mt('The course you selected is not a valid placement test in this domain'));
                     } else {                      } else {
                         $r->print(&mt('The course you selected is not a valid course in this domain'));                          $r->print(&mt('The course you selected is not a valid course in this domain'));
                     }                      }

Removed from v.1.79.2.2  
changed lines
  Added in v.1.81


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