Diff for /loncom/enrollment/Enrollment.pm between versions 1.40 and 1.41

version 1.40, 2009/03/09 01:58:52 version 1.41, 2009/08/19 18:43:31
Line 540  sub create_newuser { Line 540  sub create_newuser {
                 } else {                  } else {
                     my $subject = &mt('New LON-CAPA account');                      my $subject = &mt('New LON-CAPA account');
                     my $body;                      my $body;
                       my $portalurl = 'http://'.$ENV{'SERVER_NAME'};
                       my $protocol = 'http';
                       my $lonhost=&Apache::lonnet::domain($udom,'primary');
                       if ($lonhost ne '') {
                           my $ip = &Apache::lonnet::get_host_ip($lonhost);
                           if ($Apache::lonnet::protocol{$lonhost} eq 'https') {
                               $protocol = 'https';
                           }
                           if ($ip ne '') {
                               $portalurl = $protocol.'://'.$ip
                           }
                       }
                     if ($context eq 'createowner') {                      if ($context eq 'createowner') {
                         $body = &mt('A user account has been created for you while creating your new course in the LON-CAPA course management and online homework system.')."\n\n".&mt('You should log-in to the system using the following credentials:')."\n".&mt('username: ').$uname."\n".&mt('password: ').$authparam."\n\n".&mt('The URL you should use to access the LON-CAPA system at your school is: ').'http://'.$ENV{'SERVER_NAME'}."\n\n";                          $body = &mt('A user account has been created for you while creating your new course in the LON-CAPA course management and online homework system.')."\n\n".&mt('You should log-in to the system using the following credentials:')."\n".&mt('username: ').$uname."\n".&mt('password: ').$authparam."\n\n".&mt('The URL you should use to access the LON-CAPA system at your institution is: ').$portalurl."\n\n";
                     } elsif ($context eq 'createcourse') {                      } elsif ($context eq 'createcourse') {
                         $body = &mt('You have been assigned the role of [_1] in a new course: [_2] - [_3] in the LON-CAPA course management and online homework system.',$$longroles{$role},$$courseinfo{'description'},$$courseinfo{'inst_code'}).' '.&mt('As you did not have an existing user account in the system, one has been created for you.')."\n\n".&mt("You should log-in to the system using the following credentials:\nusername: [_1]\npassword: [_2]",$uname,$authparam)."\n\n".&mt('The URL you should use to access the LON-CAPA system at your school is: '),'http://'.$ENV{'SERVER_NAME'}."\n\n";                           $body = &mt('You have been assigned the role of [_1] in a new course: [_2] - [_3] in the LON-CAPA course management and online homework system.',$$longroles{$role},$$courseinfo{'description'},$$courseinfo{'inst_code'}).' '.&mt('As you did not have an existing user account in the system, one has been created for you.')."\n\n".&mt("You should log-in to the system using the following credentials:\nusername: [_1]\npassword: [_2]",$uname,$authparam)."\n\n".&mt('The URL you should use to access the LON-CAPA system at your institution is: ').$portalurl."\n\n"; 
                     } else {                      } else {
                         my $access_start = 'immediately';                          my $access_start = 'immediately';
                         if ($start > 0) {                          if ($start > 0) {
                             $access_start = localtime($start)                              $access_start = localtime($start)
                         }                          }
                         $body = &mt('You have been enrolled in the LON-CAPA system at your school, because you are a registered student in a class that is using the LON-CAPA couse management and online homework system.')."\n\n".&mt("You should log-in to the system using the following credentials:\nusername: [_1]\npassword: [_2]",$uname,$authparam)."\n\n".&mt('The URL you should use to access the LON-CAPA system at your school is: ').'http://'.$ENV{'SERVER_NAME'}."\n\n".&mt('When you log-in you will be able to access the LON-CAPA course for [_1] - [_2] starting [_3].',$$courseinfo{'description'},$$courseinfo{'inst_code'},$access_start)."\n";                          $body = &mt('You have been enrolled in the LON-CAPA system at your institution, because you are a registered student in a class which is using the LON-CAPA couse management and online homework system.')."\n\n".&mt("You should log-in to the system using the following credentials:\nusername: [_1]\npassword: [_2]",$uname,$authparam)."\n\n".&mt('The URL you should use to access the LON-CAPA system at your institution is: ').$portalurl."\n\n".&mt('When you log-in you will be able to access the LON-CAPA course for [_1] - [_2] starting [_3].',$$courseinfo{'description'},$$courseinfo{'inst_code'},$access_start)."\n";
                     }                      }
                     &Apache::lonmsg::sendemail($emailaddr,$subject,$body);                      &Apache::lonmsg::sendemail($emailaddr,$subject,$body);
                 }                  }
Line 621  sub execute_add { Line 633  sub execute_add {
 # Get the user's e-mail address  # Get the user's e-mail address
     if ($userenv{critnotification} =~ m/%40/) {      if ($userenv{critnotification} =~ m/%40/) {
         unless ($emailenc eq $userenv{critnotification}) {          unless ($emailenc eq $userenv{critnotification}) {
             $$logmsg .= &mt('Current critical notification e-mail              $$logmsg .= &mt('Current critical notification e-mail - [_1] for [_2] is different to e-mail address in institutional classlist - [_3].',
 - [_1] for [_2] is different to e-mail address in institutional classlist - [_3].',$userenv{critnotification},$uname,$emailenc).$linefeed;                             $userenv{critnotification},$uname,$emailenc).
                           $linefeed;
         }          }
     }      }
     if ($userenv{notification} =~ m/%40/) {      if ($userenv{notification} =~ m/%40/) {
         unless ($emailenc eq $userenv{notification}) {          unless ($emailenc eq $userenv{notification}) {
             $$logmsg .= &mt('Current standard notification e-mail              $$logmsg .= &mt('Current standard notification e-mail - [_1] for [_2] is different to e-mail address in institutional classlist - [_3].',
 - [_1] for [_2] is different to e-mail address in institutional classlist - [_3]',$userenv{notification},$uname,$emailenc).$linefeed;                              $userenv{notification},$uname,$emailenc).
                           $linefeed;
         }          }
     }      }
     if ($userenv{permanentemail} =~ m/%40/) {      if ($userenv{permanentemail} =~ m/%40/) {

Removed from v.1.40  
changed lines
  Added in v.1.41


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