--- rat/lonwrapper.pm 2017/04/22 16:15:13 1.59 +++ rat/lonwrapper.pm 2017/04/25 22:19:03 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.59 2017/04/22 16:15:13 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.60 2017/04/25 22:19:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,7 +42,7 @@ use LONCAPA qw(:DEFAULT :match);; # ================================================================ Main Handler sub wrapper { - my ($url,$brcrum,$absolute,$is_ext,$is_pdf,$exttool,$title) = @_; + my ($url,$brcrum,$absolute,$is_ext,$is_pdf,$exttool,$linktext,$explanation,$title) = @_; my $forcereg; unless ($env{'form.folderpath'}) { @@ -100,10 +100,16 @@ sub wrapper { } $output .= ''.&mt('Link to PDF (for mobile devices)').''; } elsif ($exttool eq 'window') { + if ($linktext eq '') { + $linktext = &mt('Launch External Tool'); + } $output .= '
'. ''. - &mt('Launch External Tool').''. + $linktext.''. '
'; + if ($explanation ne '') { + $output .= '
'.$explanation.'
'; + } } else { $output .= '
'."\n". '