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

version 1.74, 2017/08/03 16:22:08 version 1.76, 2017/11/12 20:42:52
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="" method="post" '.                             '<form name="reportstatus" id="LC_reportstatus" action="/adm/createaccount" 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 {
                             }                              }
                         }                          }
                     }                      }
                     $output .= '<label><input type="radio" name="type" value="'.$type.'" />'.                      my $checked;
                       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 687  sub print_username_form { Line 691  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 1073  sub print_dataentry_form { Line 1089  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 1870  sub sso_logout_frag { Line 1886  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 1996  function checkVerification() { Line 2012  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.74  
changed lines
  Added in v.1.76


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