Diff for /loncom/interface/loncoursequeueadmin.pm between versions 1.52.2.2 and 1.52.2.2.4.1

version 1.52.2.2, 2016/10/23 20:55:41 version 1.52.2.2.4.1, 2017/08/15 23:45:30
Line 105  sub send_selfserve_notification { Line 105  sub send_selfserve_notification {
         $rawsubj = 'Self-enrollment requests processed';          $rawsubj = 'Self-enrollment requests processed';
         push(@rawmsg,{          push(@rawmsg,{
                       mt => 'Enrollment requests in the following course: [_1] have been processed.',                        mt => 'Enrollment requests in the following course: [_1] have been processed.',
                       args => ["\n$contextdesc"],                        args => ["\n$contextdesc\n"],
                      });                       });
     } elsif ($context eq 'domainmanagers') {      } elsif ($context eq 'domainmanagers') {
         $rawsubj = 'Course/Community requests reviewed';          $rawsubj = 'Course/Community requests reviewed';
         push(@rawmsg,{          push(@rawmsg,{
                       mt  => 'Course/Community creation requests in the following domain: "[_1]" have been reviewed.',                        mt  => 'Course/Community creation requests in the following domain: [_1] have been reviewed.',
                       args => ["\n$contextdesc"],                        args => ["\n$contextdesc\n"],
                      });                       });
         if (ref($textstr) eq 'ARRAY') {          if (ref($textstr) eq 'ARRAY') {
             push(@rawmsg,@{$textstr});              push(@rawmsg,@{$textstr});
Line 119  sub send_selfserve_notification { Line 119  sub send_selfserve_notification {
     } elsif ($context eq 'authormanagers') {      } elsif ($context eq 'authormanagers') {
         $rawsubj = 'Authoring Space requests reviewed';          $rawsubj = 'Authoring Space requests reviewed';
         push(@rawmsg,{          push(@rawmsg,{
                       mt  => 'Authoring requests in the following domain: "[_1]" have been reviewed.',                        mt  => 'Authoring requests in the following domain: [_1] have been reviewed.',
                       args => ["\n$contextdesc"],                        args => ["\n$contextdesc\n"],
                      });                       });
         if (ref($textstr) eq 'ARRAY') {          if (ref($textstr) eq 'ARRAY') {
             push(@rawmsg,@{$textstr});              push(@rawmsg,@{$textstr});
Line 128  sub send_selfserve_notification { Line 128  sub send_selfserve_notification {
     } elsif ($context eq 'usernamemanagers') {      } elsif ($context eq 'usernamemanagers') {
         $rawsubj = 'LON-CAPA account requests reviewed';          $rawsubj = 'LON-CAPA account requests reviewed';
         push(@rawmsg,{          push(@rawmsg,{
                       mt  => 'Account requests in the following domain: "[_1]" have been reviewed.',                        mt  => 'Account requests in the following domain: [_1] have been reviewed.',
                       args => ["\n$contextdesc"],                        args => ["\n$contextdesc\n"],
                      });                       });
         if (ref($textstr) eq 'ARRAY') {          if (ref($textstr) eq 'ARRAY') {
             push(@rawmsg,@{$textstr});              push(@rawmsg,@{$textstr});
Line 879  sub update_request_queue { Line 879  sub update_request_queue {
             my $dbname = 'nohist_requestedusernames';              my $dbname = 'nohist_requestedusernames';
             my $domconfiguser = &Apache::lonnet::get_domainconfiguser($cdom);              my $domconfiguser = &Apache::lonnet::get_domainconfiguser($cdom);
             my %curr = &Apache::lonnet::get($dbname,[$uname],$cdom,$domconfiguser);              my %curr = &Apache::lonnet::get($dbname,[$uname],$cdom,$domconfiguser);
               
             if (ref($curr{$uname}) eq 'HASH') {              if (ref($curr{$uname}) eq 'HASH') {
                 my ($username,$logtoken,$serverid,$encpass,$courseid,$id,$firstname,                  my ($logtoken,$serverid,$encpass,$courseid,$id,$firstname,
                     $middlename,$lastname,$generation,$inststatus);                      $middlename,$lastname,$generation,$inststatus,$email);
                 $curr{$uname}{'timestamp'} = $now;                  $curr{$uname}{'timestamp'} = $now;
                 $curr{$uname}{'adjudicator'} = $env{'user.name'}.':'.$env{'user.domain'};                  $curr{$uname}{'adjudicator'} = $env{'user.name'}.':'.$env{'user.domain'};
                 $courseid   = $curr{$uname}{'courseid'};                  $courseid   = $curr{$uname}{'courseid'};
Line 893  sub update_request_queue { Line 893  sub update_request_queue {
                 $generation = $curr{$uname}{'generation'};                  $generation = $curr{$uname}{'generation'};
                 $inststatus = $curr{$uname}{'inststatus'};                  $inststatus = $curr{$uname}{'inststatus'};
   
                 my ($key,$caller)=split(/&/,$curr{$uname}{'tmpinfo'});                  if ($curr{$uname}{'email'} ne '') {
                 if ($caller eq 'createaccount') {                      $email = $curr{$uname}{'email'};
                     my $upass = &Apache::loncommon::des_decrypt($key,$curr{$uname}{'upass'});                  } elsif ($uname =~ /^[^\@]+\@[^\@]+$/) {
                       $email = $uname;
                   }
   
                   my $upass;
                   if ($curr{$uname}{'tmpinfo'}) {
                       my ($key,$caller)=split(/&/,$curr{$uname}{'tmpinfo'});
                       if ($caller eq 'createaccount') {
                           if ($curr{$uname}{'upass'} eq '') {
                               $upass = $curr{$uname}{'upass'};
                           } else {
                               $upass = &Apache::loncommon::des_decrypt($key,$curr{$uname}{'upass'});
                           }
                       } else {
                           push(@processing_errors,$uname);
                       }
                   } else {
                       $upass = $curr{$uname}{'upass'};
                   }
                   if ($upass eq '') {
                       push(@processing_errors,$uname);
                   } else {
                     undef($curr{$uname}{'upass'});                      undef($curr{$uname}{'upass'});
                     my $result =                      my $result =
                         &Apache::lonnet::modifyuser($cdom,$uname,$id,'internal',$upass,                          &Apache::lonnet::modifyuser($cdom,$uname,$id,'internal',$upass,
                                                     $firstname,$middlename,$lastname,                                                      $firstname,$middlename,$lastname,
                                                     $generation,undef,undef,$uname);                                                      $generation,undef,undef,$email);
                     if ($result eq 'ok') {                      if ($result eq 'ok') {
                         $curr{$uname}{'status'} = 'created';                          $curr{$uname}{'status'} = 'created';
                         push(@completed,$uname);                           push(@completed,$uname); 
Line 921  sub update_request_queue { Line 942  sub update_request_queue {
                     } else {                      } else {
                         push(@processing_errors,$uname);                          push(@processing_errors,$uname);
                     }                      }
                 } else {  
                     push(@processing_errors,$uname);  
                 }                  }
             } else {              } else {
                 push(@invalidusers,$uname);                  push(@invalidusers,$uname);

Removed from v.1.52.2.2  
changed lines
  Added in v.1.52.2.2.4.1


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