--- loncom/homework/lonmaxima.pm 2007/08/13 10:21:46 1.20 +++ loncom/homework/lonmaxima.pm 2008/06/10 13:31:38 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Interface routines to MAXIMA CAS # -# $Id: lonmaxima.pm,v 1.20 2007/08/13 10:21:46 riegler Exp $ +# $Id: lonmaxima.pm,v 1.22 2008/06/10 13:31:38 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -63,7 +63,8 @@ sub blacklisted { foreach my $forbidden ('save','load','plot','lisp','includ','compil', 'file','batch','stringout','translat','stout', 'stin','block','system','concat','read','inchar', - 'outchar','ttyoff','with_stdout','writefile') { + 'outchar','ttyoff','with_stdout','writefile', + 'reset') { if ($cmd=~/$forbidden/s) { return 1; } } return 0; @@ -138,6 +139,8 @@ sub maxima_check { # integer to string mappings come from capaParser.h # 1 maps to 'EXACT_ANS' if ($reply eq 'true') { return 1; } + # 11 maps to 'BAD_FORMULA' + if ($reply=~/^Error\:/) { return 11; } # 7 maps to 'INCORRECT' return 7; }