Diff for /loncom/interface/Attic/londropadd.pm between versions 1.72 and 1.73

version 1.72, 2003/07/03 19:26:20 version 1.73, 2003/07/05 10:07:11
Line 218  sub javascript_validations { Line 218  sub javascript_validations {
     my $authheader = &Apache::loncommon::authform_header(%param);      my $authheader = &Apache::loncommon::authform_header(%param);
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();      my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
     return (<<ENDPICK);      return (<<ENDPICK);
 function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec) {  function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail) {
     var foundatype=0;      var foundatype=0;
     var message='';      var message='';
     if (founduname==0) {      if (founduname==0) {
Line 254  function verify_message (vf,founduname,f Line 254  function verify_message (vf,founduname,f
         }          }
     }      }
   
     if (foundname==0) { message='No name fields specified. '; }      if (foundname==0) { message='name fields'; }
     if (foundid==0) { message+='No ID or student number field specified. '; }      if (foundid==0) { if (message!='') { message+=', '; } message+='student number field'; }
     if (foundsec==0) { message+='No section or group field specified. '; }      if (foundsec==0) {  if (message!='') { message+=', '; } message+='section or group field'; }
       if (foundemail==0) {  if (message!='') { message+=', '; } message+='email address field'; }
     if (message!='') {      if (message!='') {
        message+='Continue enrollment?';         message='Not specified (optional): '+message+'.  Continue enrollment?';
        if (confirm(message)) {         if (confirm(message)) {
           vf.state.value='enrolling';            vf.state.value='enrolling';
   vf.submit();    vf.submit();
Line 284  function verify(vf) { Line 285  function verify(vf) {
     var foundname=0;      var foundname=0;
     var foundid=0;      var foundid=0;
     var foundsec=0;      var foundsec=0;
       var foundemail=0;
     var tw;      var tw;
     for (i=0;i<=vf.nfields.value;i++) {      for (i=0;i<=vf.nfields.value;i++) {
         tw=eval('vf.f'+i+'.selectedIndex');          tw=eval('vf.f'+i+'.selectedIndex');
Line 292  function verify(vf) { Line 294  function verify(vf) {
         if (tw==7) { foundid=1; }          if (tw==7) { foundid=1; }
         if (tw==8) { foundsec=1; }          if (tw==8) { foundsec=1; }
         if (tw==9) { foundpwd=1; }          if (tw==9) { foundpwd=1; }
           if (tw==10) { foundemail=1; }
     }      }
     verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec);      verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail);
 }  }
   
 //  //
Line 312  function verify(vf) { Line 315  function verify(vf) {
 // 7 = id  // 7 = id
 // 8 = section  // 8 = section
 // 9 = ipwd  (password)  // 9 = ipwd  (password)
 //  // 10 = email address
   
 function flip(vf,tf) {  function flip(vf,tf) {
    var nw=eval('vf.f'+tf+'.selectedIndex');     var nw=eval('vf.f'+tf+'.selectedIndex');
    var i;     var i;
Line 499  sub print_upload_manager_form { Line 503  sub print_upload_manager_form {
                ['gen','Generation'],                 ['gen','Generation'],
        ['id','ID/Student Number'],         ['id','ID/Student Number'],
                ['sec','Group/Section'],                 ['sec','Group/Section'],
        ['ipwd','Initial Password']);         ['ipwd','Initial Password'],
                  ['email','EMail Address']);
  if ($ENV{'form.upfile_associate'} eq 'reverse') {   if ($ENV{'form.upfile_associate'} eq 'reverse') {
     &Apache::loncommon::csv_print_samples($r,\@records);      &Apache::loncommon::csv_print_samples($r,\@records);
     $i=&Apache::loncommon::csv_print_select_table($r,\@records,\@d);      $i=&Apache::loncommon::csv_print_select_table($r,\@records,\@d);
Line 1515  sub upfile_drop_add { Line 1520  sub upfile_drop_add {
                         }                          }
                         $id=~tr/A-Z/a-z/;                          $id=~tr/A-Z/a-z/;
                     }                      }
                       # determine email address
                       my $email='';
                       if (defined($fields{'email'})) {
                           if (defined($entries{$fields{'email'}})) {
                               $email=$entries{$fields{'email'}};
                               unless ($email=~/^[^\@]+\@[^\@]+$/) { $email=''; }
                           }
                       }
                     # determine student password                      # determine student password
                     my $password='';                      my $password='';
                     if ($genpwd) {                       if ($genpwd) { 
Line 1537  sub upfile_drop_add { Line 1550  sub upfile_drop_add {
                         my $reply=&Apache::lonnet::modifystudent                          my $reply=&Apache::lonnet::modifystudent
                             ($domain,$username,$id,$amode,$password,                              ($domain,$username,$id,$amode,$password,
                              $fname,$mname,$lname,$gen,$sec,$enddate,                               $fname,$mname,$lname,$gen,$sec,$enddate,
                              $startdate,$ENV{'form.forceid'},$desiredhost);                               $startdate,$ENV{'form.forceid'},$desiredhost,
                                $email);
                         if ($reply ne 'ok') {                          if ($reply ne 'ok') {
                             $reply =~ s/^error://;                              $reply =~ s/^error://;
                             $r->print('<br /><b>'.$username.'</b>:'.                              $r->print('<br /><b>'.$username.'</b>:'.

Removed from v.1.72  
changed lines
  Added in v.1.73


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