Diff for /loncom/interface/lonpopulate.pm between versions 1.78 and 1.83

version 1.78, 2013/08/15 16:51:02 version 1.83, 2015/06/09 21:22:57
Line 51  sub header { Line 51  sub header {
 sub choose_header {  sub choose_header {
     my ($action) = @_;      my ($action) = @_;
     my $notify_check = '/^note_[0-9]+$/';      my $notify_check = '/^note_[0-9]+$/';
     my %lt =       my %js_lt = 
         &Apache::lonlocal::texthash(          &Apache::lonlocal::texthash(
             adds => 'You must select either "Enable" or "Disable" for nightly additions based on classlist changes',              adds => 'You must select either "Enable" or "Disable" for nightly additions based on classlist changes',
             drop => 'You must select either "Enable" or "Disable" for nightly removals based on classlist changes',              drop => 'You must select either "Enable" or "Disable" for nightly removals based on classlist changes',
Line 61  sub choose_header { Line 61  sub choose_header {
             ynot => 'You have indicated that you want notification of roster changes messages to be sent, but you have not selected any recipients.',              ynot => 'You have indicated that you want notification of roster changes messages to be sent, but you have not selected any recipients.',
             atle => 'You must check at least one checkbox, before proceeding to the next page',              atle => 'You must check at least one checkbox, before proceeding to the next page',
     );      );
     $lt{'both'} = &mt('You have selected "No" for both addition and removal of students[_1] in the institutional classlist but not in your LON-CAPA course.[_1]','\\n');      $js_lt{'both'} = &mt('You have selected "No" for both addition and removal of students[_1] in the institutional classlist but not in your LON-CAPA course.[_1]',"\n");
     $lt{'nnot'} = &mt('You have indicated that you do not want notification of roster changes messages to be sent, but [_1] have been checked as recipients.[_2]',"'+totalnote+'",'\\n');      $js_lt{'nnot'} = &mt('You have indicated that you do not want notification of roster changes messages to be sent, but [_1] have been checked as recipients.[_2]',"'+totalnote+'","\n");
       &js_escape(\%js_lt);
           
     my $scripttag = <<ENDJSONE;      my $scripttag = <<ENDJSONE;
 <script type="text/javascript" language="JavaScript">  <script type="text/javascript" language="JavaScript">
Line 88  function process(calling,numauto,nummanu Line 89  function process(calling,numauto,nummanu
        }         }
    }     }
    if (rad1 == 0) {     if (rad1 == 0) {
        alert('$lt{'adds'}');         alert('$js_lt{'adds'}');
        checker = 0         checker = 0
    }     }
    if (rad2 == 0) {     if (rad2 == 0) {
        alert('$lt{'drop'}');         alert('$js_lt{'drop'}');
        checker = 0         checker = 0
    }     }
  }   }
Line 116  function process(calling,numauto,nummanu Line 117  function process(calling,numauto,nummanu
          }           }
      }       }
      if (rad1 == 0) {       if (rad1 == 0) {
          alert('$lt{'drop'}');           alert('$js_lt{'drop'}');
          checker = 0;           checker = 0;
      }       }
      if (rad2 == 0) {       if (rad2 == 0) {
          alert('$lt{'ysno'}');           alert('$js_lt{'ysno'}');
          checker = 0;           checker = 0;
      }       }
      if (formName.updatedrops[unenrolldis].checked && formName.updateadds[enrolldis].checked ) {       if (formName.updatedrops[unenrolldis].checked && formName.updateadds[enrolldis].checked ) {
          alert('$lt{'both'}$lt{'noup'}');           alert('$js_lt{'both'}$js_lt{'noup'}');
          checker = 0;           checker = 0;
      }       }
  }   }
Line 141  function process(calling,numauto,nummanu Line 142  function process(calling,numauto,nummanu
      }       }
      if (totalnote > 0) {       if (totalnote > 0) {
  if (formName.notify[1].checked == true) {   if (formName.notify[1].checked == true) {
      if (confirm('$lt{'nnot'}$lt{'eras'}')) {       if (confirm('$js_lt{'nnot'}$js_lt{'eras'}')) {
  checker = 1;   checker = 1;
      } else {       } else {
  checker = 0;   checker = 0;
Line 149  function process(calling,numauto,nummanu Line 150  function process(calling,numauto,nummanu
  }   }
      } else {       } else {
  if (formName.notify[0].checked == true) {   if (formName.notify[0].checked == true) {
      alert('$lt{'ynot'}');       alert('$js_lt{'ynot'}');
      checker = 0;       checker = 0;
  }   }
      }       }
Line 177  function process(calling,numauto,nummanu Line 178  function process(calling,numauto,nummanu
         document.forms.studentform.state.value = "process";          document.forms.studentform.state.value = "process";
      }       }
      if (totcheck == 0) {       if (totcheck == 0) {
         alert('$lt{'atle'}')          alert('$js_lt{'atle'}')
         checker = 0;          checker = 0;
      }       }
  }    } 
Line 290  sub print_main_frame { Line 291  sub print_main_frame {
 # Get course settings  # Get course settings
   my %enrollvar;    my %enrollvar;
   my %settings = &Apache::lonnet::dump('environment',$dom,$crs);    my %settings = &Apache::lonnet::dump('environment',$dom,$crs);
   foreach my $item (keys %settings) {    foreach my $item (keys(%settings)) {
       if ($item =~ m/^internal\.(.+)$/) {        if ($item =~ m/^internal\.(.+)$/) {
           $enrollvar{$1} = $settings{$item};            $enrollvar{$1} = $settings{$item};
       } elsif ($item =~ /^default_enrollment_(start|end)_date$/) {        } elsif ($item =~ /^default_enrollment_(start|end)_date$/) {
Line 749  sub print_main_frame { Line 750  sub print_main_frame {
           $r->print(            $r->print(
               &mt('Currently, this LON-CAPA course is crosslisted with [quant,_1,course section,course sections].',$cross_str).' '.                &mt('Currently, this LON-CAPA course is crosslisted with [quant,_1,course section,course sections].',$cross_str).' '.
               &mt('Students enrolling in these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update.').' '.                &mt('Students enrolling in these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update.').' '.
               &mt('For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: [_1; otherwise uncheck it.',"<b>$realm ($enrollvar{coursecode})</b>").' '.                &mt('For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: [_1]; otherwise uncheck it.',"<b>$realm ($enrollvar{coursecode})</b>").' '.
               &mt('If you wish to change the section ID assigned in your LON-CAPA course for a crosslisted course, enter the new section ID in the appropriate textbox.').' '.                &mt('If you wish to change the section ID assigned in your LON-CAPA course for a crosslisted course, enter the new section ID in the appropriate textbox.').' '.
               &mt('The LON-CAPA section ID can be left (or set to) empty, if you do not wish to tie a section ID to this crosslisting.').' '.                &mt('The LON-CAPA section ID can be left (or set to) empty, if you do not wish to tie a section ID to this crosslisting.').' '.
               &mt('If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page.').' '.                &mt('If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page.').' '.
Line 1920  sub print_crosslistings_menu { Line 1921  sub print_crosslistings_menu {
  if ($numcross) {   if ($numcross) {
     $response .=       $response .= 
                 &mt('You indicated that you wish to add an additional [quant,_1,crosslisting].',$numcross).' '.                  &mt('You indicated that you wish to add an additional [quant,_1,crosslisting].',$numcross).' '.
                 &mt('For each new crosslisting enter the insititutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section.').' '.                  &mt('For each new crosslisting enter the institutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section.').' '.
                 &mt('The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting.').' '.                  &mt('The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting.').' '.
                 &mt("The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system.").                  &mt("The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system.").
                 '<br /><br />                  '<br /><br />
Line 2250  sub print_sections_menu { Line 2251  sub print_sections_menu {
  if ($numsec > 0) {   if ($numsec > 0) {
     $response .=       $response .= 
                 &mt('You indicated that you wish to incorporate student enrollment in your LON-CAPA course from an additional [quant,_1,section].',$numsec).' '.                  &mt('You indicated that you wish to incorporate student enrollment in your LON-CAPA course from an additional [quant,_1,section].',$numsec).' '.
                &mt('For each new section enter the insititutional section code (e.g., 004), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in this particular section.').' '.                 &mt('For each new section enter the institutional section code (e.g., 004), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in this particular section.').' '.
                &mt('The LON-CAPA section ID can be left blank, if you do not wish to designate a section ID for this course section.').' '.                 &mt('The LON-CAPA section ID can be left blank, if you do not wish to designate a section ID for this course section.').' '.
                &mt("The institutional section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course section numbers to your institution's student information system.").'                 &mt("The institutional section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course section numbers to your institution's student information system.").'
                <br /><br />                 <br /><br />
Line 2726  sub print_update_result { Line 2727  sub print_update_result {
     my %settings =       my %settings = 
         &Apache::lonnet::get('environment',          &Apache::lonnet::get('environment',
             ['internal.coursecode','internal.sectionnums','internal.crosslistings',              ['internal.coursecode','internal.sectionnums','internal.crosslistings',
              'internal.authtype','internal.autharg','internal.showphoto','internal.defaultcredits'],               'internal.authtype','internal.autharg','internal.showphoto','internal.defaultcredits',
                'internal.textbook'],
             $dom,$crs);              $dom,$crs);
     my $coursecode = $settings{'internal.coursecode'};      my $coursecode = $settings{'internal.coursecode'};
     my $authtype = $settings{'internal.authtype'};      my $authtype = $settings{'internal.authtype'};
     my $autharg = $settings{'internal.autharg'};      my $autharg = $settings{'internal.autharg'};
     my $showphotos = $settings{'internal.showphoto'};      my $showphotos = $settings{'internal.showphoto'};
       my $textbook = $settings{'internal.textbook'};
     my ($showcredits,$defaultcredits);      my ($showcredits,$defaultcredits);
     my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);      my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
     if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'}) {      if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'}) {
         $showcredits = 1;          $showcredits = 1;
         $defaultcredits = $settings{'internal.defaultcredits'};          $defaultcredits = $settings{'internal.defaultcredits'};
         if ($defaultcredits eq '') {          if ($defaultcredits eq '') {
             if ($coursecode ne '') {              if ($coursecode ne '') {
                 $defaultcredits = $domdefaults{'officialcredits'};                     $defaultcredits = $domdefaults{'officialcredits'};   
               } elsif ($textbook ne '') {
                   $defaultcredits = $domdefaults{'textbookcredits'};
             } else {              } else {
                 $defaultcredits = $domdefaults{'unofficialcredits'};                  $defaultcredits = $domdefaults{'unofficialcredits'};
             }              }

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


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