--- loncom/homework/response.pm 2009/03/06 16:13:29 1.211 +++ loncom/homework/response.pm 2009/04/17 01:00:15 1.214 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.211 2009/03/06 16:13:29 raeburn Exp $ +# $Id: response.pm,v 1.214 2009/04/17 01:00:15 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,6 +54,7 @@ use strict; use Apache::lonlocal; use Apache::lonnet; use Apache::lonmaxima(); +use Apache::lonr(); BEGIN { &Apache::lonxml::register('Apache::response',('responseparam','parameter','dataresponse','customresponse','mathresponse')); @@ -283,7 +284,7 @@ sub check_for_previous { my %previous; $previous{'used'} = 0; foreach my $key (sort(keys(%Apache::lonhomework::history))) { - if ($key =~ /resource\.$partid\.$id\.submission$/) { + if ($key =~ /resource\.\Q$partid\E\.\Q$id\E\.submission$/) { if ( $last && $key =~ /^(\d+):/ ) { next if ($1 >= $last); } @@ -508,7 +509,7 @@ sub start_mathresponse { 'answerdisplay',$token); $result.=&Apache::edit::select_arg('Algebra System:', 'cas', - ['maxima'], + ['maxima','R'], $token); $result.=&Apache::edit::text_arg('Argument Array:', 'args',$token). @@ -538,7 +539,7 @@ sub edit_mathresponse_button { # my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor'); my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'}; return(< +