Diff for /loncom/interface/lontiny.pm between versions 1.8.2.2 and 1.10

version 1.8.2.2, 2022/05/27 18:10:44 version 1.10, 2022/05/25 18:03:43
Line 172  sub handler { Line 172  sub handler {
                                     }                                      }
                                 }                                  }
                                 my @allposs = keys(%possroles);                                  my @allposs = keys(%possroles);
                                   if ($env{'request.lti.login'}) {
                                       &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
                                       if ($env{'request.lti.target'} eq '') {
                                           if ($env{'form.ltitarget'} eq 'iframe') {
                                               &Apache::lonnet::appenv({'request.lti.target' => 'iframe'});
                                               delete($env{'form.ltitarget'});
                                           }
                                       }
                                       if ($env{'form.selectrole'}) {
                                           foreach my $role (@allposs) {
                                               my $newrole = "$role./$cdom/$cnum";
                                               if ($possroles{$allposs[0]} ne '') {
                                                   $newrole .= "/$possroles{$role}";
                                               }
                                               if ($env{"form.$newrole"}) {
                                                   my $destination .= '/adm/roles?selectrole=1&'.$newrole.'=1'.
                                                                      '&destinationurl='.&HTML::Entities::encode($r->uri);
                                                   if ($env{'form.ltitarget'} eq 'iframe') {
                                                       $destination .= '&ltitarget=iframe';
                                                   }
                                                   &do_redirect($r,$destination);
                                                   return OK;
                                               }
                                           }
                                       }
                                   }
                                 if (@allposs == 0) {                                  if (@allposs == 0) {
                                     &show_roles($r,\%crsenv,\%possroles);                                      &show_roles($r,\%crsenv,\%possroles);
                                 } elsif (@allposs == 1) {                                  } elsif (@allposs == 1) {
Line 377  sub launch_check { Line 403  sub launch_check {
 sub do_redirect {  sub do_redirect {
     my ($r,$destination) = @_;      my ($r,$destination) = @_;
     my $windowname = 'loncapaclient';      my $windowname = 'loncapaclient';
       if ($env{'request.lti.login'}) {
           $windowname .= 'lti';
       }
     my $header = '<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$destination.'" />';      my $header = '<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$destination.'" />';
     my $args = {'bread_crumbs' => [{'href' => '','text' => 'Role initialization'},],};      my $args = {'bread_crumbs' => [{'href' => '','text' => 'Role initialization'},],};
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
Line 521  ENDJS Line 550  ENDJS
 sub generic_error {  sub generic_error {
     my ($r) = @_;      my ($r) = @_;
     my $continuelink;      my $continuelink;
     my $linktext;      unless ($env{'request.lti.login'}) {
     if ($env{'user.adv'}) {          my $linktext;
         $linktext = &mt('Continue to your roles page');          if ($env{'user.adv'}) {
     } else {              $linktext = &mt('Continue to your roles page');
         $linktext = &mt('Continue to your courses page');          } else {
               $linktext = &mt('Continue to your courses page');
           }
           $continuelink='<a href="/adm/roles">'.$linktext.'</a>';
     }      }
     $continuelink='<a href="/adm/roles">'.$linktext.'</a>';  
     my $msg = &mt('The page you requested does not exist.');      my $msg = &mt('The page you requested does not exist.');
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;

Removed from v.1.8.2.2  
changed lines
  Added in v.1.10


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