Diff for /loncom/interface/lonmodifycourse.pm between versions 1.82 and 1.83

version 1.82, 2016/04/04 01:12:11 version 1.83, 2016/04/06 17:41:52
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') || ($type eq 'Placement')) {      if ($type eq 'Community') {
         return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');          return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');
     } else {      } else {
         my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc');          my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc');
Line 268  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 ($type eq 'Placement') {          if (($type ne 'Placement') && (&showcredits($dom))) {
             $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';              $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, and self-enrollment';              $setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment';
Line 375  sub print_modification_menu { Line 373  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";
Line 853  sub print_course_modification_page { Line 847  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').
                       '&nbsp;'.&mt('Course Code'))."\n".                        '&nbsp;'.&mt('Course Code'))."\n".
                   '<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'" />'.                    '<input type="text" size="15" name="coursecode" value="'.$enrollvar{'coursecode'}.'" />'.
                   &Apache::lonhtmlcommon::row_closure());                    &Apache::lonhtmlcommon::row_closure());
         if (&showcredits($cdom)) {          if (($crstype eq 'Course') && (&showcredits($cdom))) {
             $r->print(&Apache::lonhtmlcommon::row_title(              $r->print(&Apache::lonhtmlcommon::row_title(
                           &Apache::loncommon::help_open_topic('Modify_Course_Credithours').                            &Apache::loncommon::help_open_topic('Modify_Course_Credithours').
                       '&nbsp;'.&mt('Credits (students)'))."\n".                        '&nbsp;'.&mt('Credits (students)'))."\n".
                       '<input type="text" size="3" name="defaultcredits" value="'.$enrollvar{'defaultcredits'}.'" />'.                        '<input type="text" size="3" name="defaultcredits" value="'.$enrollvar{'defaultcredits'}.'" />'.
                       &Apache::lonhtmlcommon::row_closure());                        &Apache::lonhtmlcommon::row_closure());
          }          }
          $r->print(&Apache::lonhtmlcommon::row_title(          $r->print(&Apache::lonhtmlcommon::row_title(
                        &Apache::loncommon::help_open_topic('Modify_Course_Defaultauth').                        &Apache::loncommon::help_open_topic('Modify_Course_Defaultauth').
                        '&nbsp;'.&mt('Default Authentication method'))."\n".                        '&nbsp;'.&mt('Default Authentication method'))."\n".
                    $authenitems."\n".                    $authenitems."\n".
                    &Apache::lonhtmlcommon::row_closure().                    &Apache::lonhtmlcommon::row_closure().
                    &Apache::lonhtmlcommon::row_title(                    &Apache::lonhtmlcommon::row_title(
                    &Apache::loncommon::help_open_topic('Modify_Course_Owner').                    &Apache::loncommon::help_open_topic('Modify_Course_Owner').
                       '&nbsp;'.&mt('Course Owner'))."\n");                       '&nbsp;'.&mt('Course Owner'))."\n");
     }      }
     my ($cctitle,$rolename,$currmanages,$ccchecked,$dcchecked,$defaultchecked);      my ($cctitle,$rolename,$currmanages,$ccchecked,$dcchecked,$defaultchecked);
     my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();      my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();
Line 931  sub print_course_modification_page { Line 921  sub print_course_modification_page {
               '<br />'.&Apache::lonhtmlcommon::row_closure(1).                '<br />'.&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') || ($crstype eq 'Placement')) {      if ($crstype eq 'Community') {
         $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 1070  sub modify_course { Line 1060  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 1125  sub modify_course { Line 1112  sub modify_course {
             }              }
         }          }
   
         if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) {          if (($type ne 'Placement') && (&showcredits($cdom) && exists($env{'form.defaultcredits'}))) {
             $newattr{'defaultcredits'} =~ s/[^\d\.]//g;              $newattr{'defaultcredits'} =~ s/[^\d\.]//g;
             $newattr{'defaultcredits'}=$env{'form.defaultcredits'};              $newattr{'defaultcredits'}=$env{'form.defaultcredits'};
         }          }

Removed from v.1.82  
changed lines
  Added in v.1.83


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