Diff for /loncom/interface/loncommon.pm between versions 1.1376 and 1.1378

version 1.1376, 2022/02/14 01:15:24 version 1.1378, 2022/05/24 16:23:03
Line 1310  sub help_open_topic { Line 1310  sub help_open_topic {
     if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {      if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
         $target = '';          $target = '';
     }      }
       if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
           $target = ' target="'.$env{'request.deeplink.target'}.'"';
       }
     if ($text ne "") {      if ($text ne "") {
  $template.='<span class="LC_help_open_topic">'   $template.='<span class="LC_help_open_topic">'
                   .'<a'.$target.' href="'.$link.'">'                    .'<a'.$target.' href="'.$link.'">'
Line 1520  sub help_open_bug { Line 1523  sub help_open_bug {
     if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {      if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
         $target = '';          $target = '';
     }      }
       if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
           $target = ' target="'.$env{'request.deeplink.target'}.'"';
       }
     # Add the text      # Add the text
     if ($text ne "")      if ($text ne "")
     {      {
Line 3649  sub check_passwd_rules { Line 3655  sub check_passwd_rules {
 }  }
   
 sub passwd_validation_js {  sub passwd_validation_js {
     my ($currpasswdval,$domain) = @_;      my ($currpasswdval,$domain,$context,$id) = @_;
     my %passwdconf = &Apache::lonnet::get_passwdconf($domain);      my (%passwdconf,$alertmsg);
       if ($context eq 'linkprot') {
           my %domconfig = &Apache::lonnet::get_dom('configuration',['ltisec'],$domain);
           if (ref($domconfig{'ltisec'}) eq 'HASH') {
               if (ref($domconfig{'ltisec'}{'rules'}) eq 'HASH') {
                   %passwdconf = %{$domconfig{'ltisec'}{'rules'}};
               }
           }
           if ($id eq 'add') {
               $alertmsg = &mt('Secret for added launcher did not satisfy requirement(s):').'\n\n';
           } elsif ($id =~ /^\d+$/) {
               my $pos = $id+1;
               $alertmsg = &mt('Secret for launcher [_1] did not satisfy requirement(s):','#'.$pos).'\n\n';
           } else {
               $alertmsg = &mt('A secret did not satisfy requirement(s):').'\n\n';
           }
       } else {
           %passwdconf = &Apache::lonnet::get_passwdconf($domain);
           $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n';
       }
     my ($min,$max,@chars,$numrules,$intargjs,%alert);      my ($min,$max,@chars,$numrules,$intargjs,%alert);
     $numrules = 0;      $numrules = 0;
     $min = $Apache::lonnet::passwdmin;      $min = $Apache::lonnet::passwdmin;
Line 3673  sub passwd_validation_js { Line 3698  sub passwd_validation_js {
         $numrules ++;          $numrules ++;
     }      }
     if (($min > 0) || ($max ne '') || (@chars > 0)) {      if (($min > 0) || ($max ne '') || (@chars > 0)) {
         my $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n';  
         if ($min) {          if ($min) {
             $alert{'min'} = &mt('minimum [quant,_1,character]',$min).'\n';              $alert{'min'} = &mt('minimum [quant,_1,character]',$min).'\n';
         }          }
Line 6251  sub CSTR_pageheader { Line 6275  sub CSTR_pageheader {
         $target = '';          $target = '';
         $crumbtarget = '';          $crumbtarget = '';
     }      }
       if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
           $target = ' target="'.$env{'request.deeplink.target'}.'"';
           $crumbtarget = $env{'request.deeplink.target'};
       }
   
     my $output =      my $output =
          '<div>'           '<div>'
Line 9436  sub menucoll_in_effect { Line 9464  sub menucoll_in_effect {
                 }                  }
             }              }
             if ($deeplink ne '') {              if ($deeplink ne '') {
                 my ($state,$others,$listed,$scope,$protect,$display) = split(/,/,$deeplink);                  my ($state,$others,$listed,$scope,$protect,$display,$target) = split(/,/,$deeplink);
                 if ($display =~ /^\d+$/) {                  if ($display =~ /^\d+$/) {
                     $deeplinkmenu = 1;                      $deeplinkmenu = 1;
                     $menucoll = $display;                      $menucoll = $display;

Removed from v.1.1376  
changed lines
  Added in v.1.1378


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