Diff for /rat/lonuserstate.pm between versions 1.169 and 1.170

version 1.169, 2022/10/04 20:39:57 version 1.170, 2022/10/05 16:11:25
Line 504  sub error_detail { Line 504  sub error_detail {
                 } else {                  } else {
                     $errinfo .= &mt('To rectify this problem, create and publish the missing file');                      $errinfo .= &mt('To rectify this problem, create and publish the missing file');
                 }                  }
                   my $fileurl = $uri;
                   $fileurl =~s{^/res/}{/priv/};
                 if ($fileswitch) {                  if ($fileswitch) {
                     my $rolename = &Apache::lonnet::plaintext($filerole);                      my $rolename = &Apache::lonnet::plaintext($filerole);
                     my $rolecode;                      my $rolecode;
Line 513  sub error_detail { Line 515  sub error_detail {
                         $rolecode = $filerole.'./'.$audomfile.'/'.$aunamefile;                          $rolecode = $filerole.'./'.$audomfile.'/'.$aunamefile;
                     }                      }
                     $errinfo .= '.<br />'.&mt('You will need to [_1]switch server[_2].',                      $errinfo .= '.<br />'.&mt('You will need to [_1]switch server[_2].',
                                              '<a href="/adm/switchserver?otherserver='.$switchserver.'&amp;role='.$rolecode.'">','</a>');                                               '<a href="/adm/switchserver?otherserver='.$switchserver.'&amp;role='.$rolecode.
                                                '&amp;origurl='.&escape($fileurl).'">','</a>');
                 } else {                  } else {
                     my $fileurl = $uri;                      &js_escape(\$fileurl);
                     $fileurl =~s{^/res/}{/priv/};  
                     $errinfo .= ':&nbsp;<a href="javascript:go('."'$fileurl'".');">'.&mt('Create the missing file').'</a>';                      $errinfo .= ':&nbsp;<a href="javascript:go('."'$fileurl'".');">'.&mt('Create the missing file').'</a>';
                 }                  }
             }              }
Line 537  sub error_detail { Line 539  sub error_detail {
                     } else {                      } else {
                         $errinfo .= &mt('To rectify this problem edit the parent map to remove the reference to the missing file');                          $errinfo .= &mt('To rectify this problem edit the parent map to remove the reference to the missing file');
                     }                      }
                       my $mapurl = $hash{'map_id_'.$parent_pc};
                       $mapurl =~s{^/res/}{/priv/};
                     if ($switchserver) {                      if ($switchserver) {
                         $errinfo .= '.<br />';                          $errinfo .= '.<br />';
                         if ((&Apache::lonnet::will_trust('othcoau',$env{'user.domain'},$audom)) &&                          if ((&Apache::lonnet::will_trust('othcoau',$env{'user.domain'},$audom)) &&
                             (&Apache::lonnet::will_trust('coaurem',$audom,$env{'user.domain'}))) {                              (&Apache::lonnet::will_trust('coaurem',$audom,$env{'user.domain'}))) {
                             $errinfo .= &mt('You will need to [_1]switch server[_2].',                              $errinfo .= &mt('You will need to [_1]switch server[_2].',
                                             '<a href="/adm/switchserver?otherserver='.$switchserver.'&amp;role='.$rolecode.'">','</a>');                                              '<a href="/adm/switchserver?otherserver='.$switchserver.'&amp;role='.$rolecode.
                                               '&amp;origurl='.&escape($mapurl).'">','</a>');
                         } else {                          } else {
                             $errinfo .= &mt('Session switch required but prohibited.');                              $errinfo .= &mt('Session switch required but prohibited.');
                         }                          }
                     } else {                      } else {
                         my $mapurl = $hash{'map_id_'.$parent_pc};                          &js_escape(\$mapurl);
                         $mapurl =~s{^/res/}{/priv/};  
                         $errinfo .= ':&nbsp;<a href="javascript:go('."'$mapurl'".');">'.&mt('Edit the map').'</a>';                          $errinfo .= ':&nbsp;<a href="javascript:go('."'$mapurl'".');">'.&mt('Edit the map').'</a>';
                     }                      }
                 } elsif ($uploaded && $courseid) {                  } elsif ($uploaded && $courseid) {

Removed from v.1.169  
changed lines
  Added in v.1.170


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