--- rat/lonpage.pm 2010/07/30 22:40:53 1.94.2.1 +++ rat/lonpage.pm 2011/07/28 02:53:33 1.95 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.94.2.1 2010/07/30 22:40:53 raeburn Exp $ +# $Id: lonpage.pm,v 1.95 2011/07/28 02:53:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -354,6 +354,8 @@ sub handler { $output=~s/\<\/form[^\>]*\>//gsi; $output=~ s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi; + $output=~ + s/\<((?:input|select)[^\>]+\Qjavascript:setSubmittedPart\E)\(\s*[\'\"]([^\'\"]+)[\'\"]*\s*\)/\<$1('$2','$prefix')/gsi; } $thisdir=~s/\/[^\/]*$//; foreach (@rlinks) { @@ -553,10 +555,6 @@ sub handler { sub get_buttons { my ($hash,$rid) = @_; - # which icons do we use? - my $extension='png'; - if ($env{'environment.icons'} eq 'classic') { $extension='gif'; } - my $metainfo = ''; my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid}); my ($mapid,$resid)=split(/\./,$rid); @@ -573,13 +571,13 @@ sub get_buttons { || !$hash->{'encrypted_'.$rid})) { $metainfo .=''. ''. - ''. + ''. ''; } $metainfo .= ''. - ''. + ''. ''; if (($hash->{'src_'.$rid}=~/\.(problem|exam|quiz|assess|survey|form)$/) && ($hash->{'src_'.$rid} !~ m-^/uploaded/-)) { @@ -589,12 +587,12 @@ sub get_buttons { ''. '&command=submission">'. - ''. + ''. ''. ''. '&command=gradingmenu">'. - ''. + ''. ''; } if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { @@ -602,7 +600,7 @@ sub get_buttons { ''. '" >'. - ''. + ''. ''; } }