Diff for /loncom/interface/resetpw.pm between versions 1.11.2.1 and 1.12

version 1.11.2.1, 2009/09/14 14:48:20 version 1.12, 2008/12/06 20:35:15
Line 1 Line 1
 # The LearningOnline Network  # The LearningOnline Network
 # Allow access to password changing via a token sent to user's e-mail.   # Allow access to password changing via a token sent to user's e-mail. 
 #  #
 # $Id$  
 #  
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
Line 124  sub get_uname { Line 122  sub get_uname {
                                          proc => 'Proceed');                                           proc => 'Proceed');
   
     my $msg = &mt('If you use the same account for other campus services besides LON-CAPA, (e.g., e-mail, course registration, etc.), a separate centrally managed mechanism likely exists to reset a password.  However, if your account is used for just LON-CAPA access you will probably be able to reset a password from this page.');      my $msg = &mt('If you use the same account for other campus services besides LON-CAPA, (e.g., e-mail, course registration, etc.), a separate centrally managed mechanism likely exists to reset a password.  However, if your account is used for just LON-CAPA access you will probably be able to reset a password from this page.');
     $msg .= &mt('Three conditions must be met:')      $msg .= '<br /><br />'.&mt('Three conditions must be met:')
            .'<ul><li>'.&mt('An e-mail address must have previously been associated with your GCI WebCenter username.').'</li>'             .'<ul><li>'.&mt('An e-mail address must have previously been associated with your LON-CAPA username.').'</li>'
            .'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>'             .'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>'
            .'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.')             .'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.')
            .'</ul>';             .'</ul>';
Line 133  sub get_uname { Line 131  sub get_uname {
 <form name="forgotpw" method="post">  <form name="forgotpw" method="post">
 <table>  <table>
 <tr><td>  <tr><td>
 <tr><td align="left">GCI WebCenter $lt{'unam'}:                      </td>  <tr><td align="left">LON-CAPA $lt{'unam'}:                      </td>
     <td><input type="text" name="uname" size="15"  /> </td></tr>      <td><input type="text" name="uname" size="15"  /> </td></tr>
 <tr><td align="left">GCI WebCenter $lt{'udom'}:                      </td>  <tr><td align="left">LON-CAPA $lt{'udom'}:                      </td>
     <td>|;      <td>|;
     $msg .= &Apache::loncommon::select_dom_form($defdom,'udom');      $msg .= &Apache::loncommon::select_dom_form($defdom,'udom');
     $msg .= qq|</td></tr>      $msg .= qq|</td></tr>
Line 166  sub send_token { Line 164  sub send_token {
     my $token = &Apache::lonnet::tmpput(\%info,$server,'resetpw');      my $token = &Apache::lonnet::tmpput(\%info,$server,'resetpw');
     if ($token !~ /^error/ && $token ne 'no_such_host') {      if ($token !~ /^error/ && $token ne 'no_such_host') {
         my $esc_token = &escape($token);          my $esc_token = &escape($token);
         my $showtime = &Apache::lonlocal::locallocaltime(time);          my $mailmsg = "A request was submitted on ".&Apache::lonlocal::locallocaltime(time)." for a reset of the ".
         my $reseturl = &Apache::lonnet::absolute_url().'/adm/resetpw?token='.$esc_token;               "password for your LON-CAPA account.".
         my $mailmsg = &mt('A request was submitted on [_1] for a reset of the password for your LON-CAPA account.',$showtime).' '.&mt('To complete this process please open a web browser and enter the following URL in the address/location box: [_1]',$reseturl);               "To complete this process please open a web browser and enter the following ".
                "URL in the address/location box: ".&Apache::lonnet::absolute_url()."/adm/resetpw?token=$esc_token";
         my $result = &send_mail($domdesc,$email,$mailmsg,$contact_name,          my $result = &send_mail($domdesc,$email,$mailmsg,$contact_name,
                                 $contact_email);                                  $contact_email);
         if ($result eq 'ok') {          if ($result eq 'ok') {

Removed from v.1.11.2.1  
changed lines
  Added in v.1.12


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