Diff for /loncom/interface/createaccount.pm between versions 1.72.4.2 and 1.74

version 1.72.4.2, 2019/07/29 13:54:02 version 1.74, 2017/08/03 16:22:08
Line 328  sub handler { Line 328  sub handler {
         &print_header($r,$start_page,$courseid,$pagetitle);          &print_header($r,$start_page,$courseid,$pagetitle);
         my $now=time;          my $now=time;
         if ((grep(/^login$/,@{$cancreate})) && (!grep(/^email$/,@{$cancreate}))) {          if ((grep(/^login$/,@{$cancreate})) && (!grep(/^email$/,@{$cancreate}))) {
             if (open(my $jsh,"<","$include/londes.js")) {              if (open(my $jsh,"<$include/londes.js")) {
                 while(my $line = <$jsh>) {                  while(my $line = <$jsh>) {
                     $r->print($line);                      $r->print($line);
                 }                  }
Line 634  sub print_username_form { Line 634  sub print_username_form {
                     push(@posstypes,'default');                      push(@posstypes,'default');
                 }                  }
                 $output .= '<p>'.&mt('Choose your affiliation at [_1]',$domdesc).'</p>'."\n".                  $output .= '<p>'.&mt('Choose your affiliation at [_1]',$domdesc).'</p>'."\n".
                            '<form name="reportstatus" id="LC_reportstatus" action="/adm/createaccount" method="post" '.                             '<form name="reportstatus" id="LC_reportstatus" action="" method="post" '.
                            'onsubmit="return checkVerification();"><p>';                             'onsubmit="return checkVerification();"><p>';
                 foreach my $type (@posstypes) {                  foreach my $type (@posstypes) {
                     my $name;                      my $name;
Line 648  sub print_username_form { Line 648  sub print_username_form {
                             }                              }
                         }                          }
                     }                      }
                     my $checked;                      $output .= '<label><input type="radio" name="type" value="'.$type.'" />'.
                     if ($env{'form.type'} eq $type) {  
                         $checked = ' checked="checked"';  
                     }  
                     $output .= '<label><input type="radio" name="type" value="'.$type.'"'.$checked.' />'.  
                                $name.'</label>'.('&nbsp;'x2);                                 $name.'</label>'.('&nbsp;'x2);
                 }                  }
                 if ($env{'form.courseid'} =~ /^$match_domain\_$match_courseid$/) {                  if ($env{'form.courseid'} =~ /^$match_domain\_$match_courseid$/) {
Line 691  sub print_username_form { Line 687  sub print_username_form {
                     }                      }
                     if ($usertype eq '') {                      if ($usertype eq '') {
                         $usertype = 'default';                          $usertype = 'default';
                     } elsif (ref($usertypes) eq 'HASH') {  
                         my $usertitle;  
                         if ($usertype eq 'default') {  
                             $usertitle = $othertitle;  
                         } elsif (exists($usertypes->{$usertype})) {  
                             $usertitle = $usertypes->{$usertype};  
                         }  
                         if ($usertitle ne '') {  
                             $output .= &mt('Self-reported affiliation: [_1]',  
                                            '<span style="font-style: italic;">'.$usertitle.'</span>').  
                                        '<br />';  
                         }  
                     }                      }
                     $output .= &print_dataentry_form($r,$domain,$lonhost,$include,$now,$captchaform,                      $output .= &print_dataentry_form($r,$domain,$lonhost,$include,$now,$captchaform,
                                                      $courseid,$emailusername,$captcha,$usertype,                                                       $courseid,$emailusername,$captcha,$usertype,
Line 1089  sub print_dataentry_form { Line 1073  sub print_dataentry_form {
     my ($r,$domain,$lonhost,$include,$now,$captchaform,$courseid,$emailusername,$captcha,      my ($r,$domain,$lonhost,$include,$now,$captchaform,$courseid,$emailusername,$captcha,
         $usertype,$recaptchaversion,$usernameset,$condition,$excluded) = @_;          $usertype,$recaptchaversion,$usernameset,$condition,$excluded) = @_;
     my ($error,$output);      my ($error,$output);
     if (open(my $jsh,"<","$include/londes.js")) {      if (open(my $jsh,"<$include/londes.js")) {
         while(my $line = <$jsh>) {          while(my $line = <$jsh>) {
             $r->print($line);              $r->print($line);
         }          }
Line 1886  sub sso_logout_frag { Line 1870  sub sso_logout_frag {
     if (defined($r->dir_config('lonSSOUserLogoutMessageFile_'.$domain))) {      if (defined($r->dir_config('lonSSOUserLogoutMessageFile_'.$domain))) {
         my $msgfile = $r->dir_config('lonSSOUserLogoutMessageFile_'.$domain);          my $msgfile = $r->dir_config('lonSSOUserLogoutMessageFile_'.$domain);
         if (-e $msgfile) {          if (-e $msgfile) {
             open(my $fh,"<",$msgfile);              open(my $fh,"<$msgfile");
             $endsessionmsg = join('',<$fh>);              $endsessionmsg = join('',<$fh>);
             close($fh);              close($fh);
         }          }
     } elsif (defined($r->dir_config('lonSSOUserLogoutMessageFile'))) {      } elsif (defined($r->dir_config('lonSSOUserLogoutMessageFile'))) {
         my $msgfile = $r->dir_config('lonSSOUserLogoutMessageFile');          my $msgfile = $r->dir_config('lonSSOUserLogoutMessageFile');
         if (-e $msgfile) {               if (-e $msgfile) {     
             open(my $fh,"<",$msgfile);              open(my $fh,"<$msgfile");
             $endsessionmsg = join('',<$fh>);              $endsessionmsg = join('',<$fh>);
             close($fh);              close($fh);
         }          }
Line 2012  function checkVerification() { Line 1996  function checkVerification() {
             if (curr == types[j]) {              if (curr == types[j]) {
                 if (!cancreate) {                  if (!cancreate) {
                     alert('Creation of an account via verification by e-mail unavailable for user type: "'+names[j]+'"');                      alert('Creation of an account via verification by e-mail unavailable for user type: "'+names[j]+'"');
                     setElements();  
                 }                  }
                 break;                  break;
             }              }

Removed from v.1.72.4.2  
changed lines
  Added in v.1.74


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