--- loncom/xml/lonxml.pm 2017/09/24 01:52:53 1.558 +++ loncom/xml/lonxml.pm 2018/09/12 21:10:57 1.560 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.558 2017/09/24 01:52:53 raeburn Exp $ +# $Id: lonxml.pm,v 1.560 2018/09/12 21:10:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -70,6 +70,7 @@ use Safe::Hole(); use Math::Cephes(); use Math::Random(); use Math::Calculus::Expression(); +use Number::FormatEng(); use Opcode(); use POSIX qw(strftime); use Time::HiRes qw( gettimeofday tv_interval ); @@ -821,6 +822,8 @@ sub init_safespace { $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorlength,$safeeval,'&fpr_vectorlength'); $safehole->wrap(\&Apache::functionplotresponse::fpr_vectorangle,$safeeval,'&fpr_vectorangle'); $safehole->wrap(\&Math::Calculus::Expression::math_calculus_expression,$safeeval,'&math_calculus_expression'); + $safehole->wrap(\&Number::FormatEng::format_eng,$safeeval,'&number_format_eng'); + $safehole->wrap(\&Number::FormatEng::format_pref,$safeeval,'&number_format_pref'); # use Data::Dumper; # $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&LONCAPA_INTERNAL_Dumper'); @@ -2274,7 +2277,7 @@ sub register_insert { sub dump_insertlist { my ($ext) = @_; - open(XML,">/tmp/insertlist.xml.$ext"); + open(XML,">","/tmp/insertlist.xml.$ext"); print XML (""); my $i=0;