--- loncom/homework/lonhomework.pm 2013/06/04 22:20:24 1.338 +++ loncom/homework/lonhomework.pm 2014/01/10 17:03:30 1.341 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.338 2013/06/04 22:20:24 raeburn Exp $ +# $Id: lonhomework.pm,v 1.341 2014/01/10 17:03:30 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1065,13 +1065,11 @@ sub renderpage { $problem=''; my $filename=(split('/',$file))[-1]; my $error = - '
' - .&mt('Unable to find [_1]', - ''.$filename.'') - ."
"; + &mt('Unable to find [_1]', + ''.$filename.''); $result.= &Apache::loncommon::simple_error_page($request,'Not available', - $error); + $error,{'no_auto_mt_msg' => 1}); return; } @@ -1135,6 +1133,7 @@ sub get_template_list { &mt(&Apache::lonnet::metadata($_, 'help'))]} (@files); @files = sort {$a->[2].$a->[1] cmp $b->[2].$b->[1]} (@files); my ($midpoint,$seconddiv,$numfiles); + my @noexamplelink = ('blank.problem','blank.library','script.library'); $numfiles = 0; foreach my $file (@files) { next if ($file->[1] !~ /\S/); @@ -1173,11 +1172,16 @@ sub get_template_list { if ($file->[3]) { $result.=&Apache::loncommon::help_open_topic($file->[3]); } + # Provide example link my $filename=$file->[0]; $filename=~s{^\Q$londocroot\E}{}; - $result.=' ' - .&Apache::loncommon::modal_link($filename.'?inhibitmenu=yes',&mt('Example'),600,420,'sample') - .'