Diff for /loncom/interface/lonuserutils.pm between versions 1.109.2.7 and 1.109.2.8

version 1.109.2.7, 2010/11/08 21:11:14 version 1.109.2.8, 2010/11/09 14:14:55
Line 566  END Line 566  END
         if (message!='') {          if (message!='') {
             message+='\\n';              message+='\\n';
         }          }
           message+='$alert{'section'}';
     }      }
     if (foundemail==0) {      if (foundemail==0) {
         if (message!='') {          if (message!='') {
Line 668  function verify(vf,sec_caller) { Line 669  function verify(vf,sec_caller) {
     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');
         if (tw==1) { founduname=1; }          if (tw==1) { founduname=1; }
         if ((tw>=2) && (tw<=6)) { foundname=1; }          if (tw==2) { foundpwd=1; }
         if (tw==7) { foundid=1; }          if ((tw>=3) && (tw<=7)) { foundname=1; }
         if (tw==8) { foundsec=1; }          if (tw==8) { foundid=1; }
         if (tw==9) { foundpwd=1; }          if (tw==9) { foundsec=1; }
         if (tw==10) { foundemail=1; }          if (tw==10) { foundemail=1; }
         if (tw==11) { foundrole=1; }          if (tw==11) { foundrole=1; }
         if (tw==12) { founddomain=1; }          if (tw==12) { founddomain=1; }
Line 777  function verify(vf,sec_caller) { Line 778  function verify(vf,sec_caller) {
     var foundname=0;      var foundname=0;
     var foundid=0;      var foundid=0;
     var foundsec=0;      var foundsec=0;
       var foundemail=0;
     var foundrole=0;      var foundrole=0;
     var founddomain=0;      var founddomain=0;
     var foundinststatus=0;      var foundinststatus=0;
Line 784  function verify(vf,sec_caller) { Line 786  function verify(vf,sec_caller) {
     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');
         if (i==0 && tw!=0) { founduname=1; }          if (i==0 && tw!=0) { founduname=1; }
         if (((i>=1) && (i<=5)) && tw!=0 ) { foundname=1; }          if (i==1 && tw!=0) { foundpwd=1; }
         if (i==6 && tw!=0) { foundid=1; }          if (((i>=2) && (i<=6)) && tw!=0 ) { foundname=1; }
         if (i==7 && tw!=0) { foundsec=1; }          if (i==7 && tw!=0) { foundid=1; }
         if (i==8 && tw!=0) { foundpwd=1; }          if (i==8 && tw!=0) { foundsec=1; }
         if (i==9 && tw!=0) { foundrole=1; }          if (i==9 && tw!=0) { foundemail=1; }
         if (i==10 && tw!=0) { founddomain=1; }          if (i==10 && tw!=0) { foundrole=1; }
         if (i==13 && tw!=0) { foundinstatus=1; }          if (i==11 && tw!=0) { founddomain=1; }
           if (i==12 && tw!=0) { foundinstatus=1; }
     }      }
     verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundrole,founddomain,foundinststatus);      verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail,foundrole,founddomain,foundinststatus);
 }  }
   
 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;
    // picked the all one name field, reset the other name ones to blank     // picked the all one name field, reset the other name ones to blank
    if (tf==1 && nw!=0) {     if (tf==2 && nw!=0) {
       for (i=2;i<=5;i++) {        for (i=3;i<=6;i++) {
          eval('vf.f'+i+'.selectedIndex=0;')           eval('vf.f'+i+'.selectedIndex=0;')
       }        }
    }     }
    //picked one of the piecewise name fields, reset the all in     //picked one of the piecewise name fields, reset the all in
    //one field to blank     //one field to blank
    if ((tf>=2) && (tf<=5) && (nw!=0)) {     if ((tf>=3) && (tf<=6) && (nw!=0)) {
       eval('vf.f1.selectedIndex=0;')        eval('vf.f2.selectedIndex=0;')
    }     }
    $auth_update     $auth_update
 }  }
   
 function clearpwd(vf) {  function clearpwd(vf) {
     var i;      var i;
     if (eval('vf.f8.selectedIndex')!=0) {      if (eval('vf.f1.selectedIndex')!=0) {
         eval('vf.f8.selectedIndex=0;')          eval('vf.f1.selectedIndex=0;')
     }      }
 }  }
 ENDPICK  ENDPICK
Line 4310  sub upfile_drop_add { Line 4313  sub upfile_drop_add {
                         }                          }
                         $checkid = 1;                          $checkid = 1;
                         $newuser = 1;                          $newuser = 1;
                         my $user = $username.':'.$domain;  
                         if ($username =~/^[^\@]+\@[^\@]+$/) {                          if ($username =~/^[^\@]+\@[^\@]+$/) {
                             if ($email eq '') {                              if ($email eq '') {
                                 $email = $username;                                  $email = $username;
Line 4334  sub upfile_drop_add { Line 4336  sub upfile_drop_add {
                             }                              }
                         }                          }
                     }                      }
                       my $user = $username.':'.$userdomain;
                     if ($newuser) {                      if ($newuser) {
                         my $checkhash;                          my $checkhash;
                         my $checks = { 'username' => 1 };                          my $checks = { 'username' => 1 };

Removed from v.1.109.2.7  
changed lines
  Added in v.1.109.2.8


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