--- loncom/homework/lonsimpleproblemedit.pm 2003/09/21 21:40:06 1.6 +++ loncom/homework/lonsimpleproblemedit.pm 2004/11/30 22:57:16 1.11 @@ -1,7 +1,7 @@ # The LearningOnline Network # Simple Problem Parameter Setting "Editor" # -# $Id: lonsimpleproblemedit.pm,v 1.6 2003/09/21 21:40:06 www Exp $ +# $Id: lonsimpleproblemedit.pm,v 1.11 2004/11/30 22:57:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -50,29 +50,20 @@ sub evaloptionhash { } sub rawrendering { - my ($request,$uri)=@_; - my $problem=&Apache::lonnet::getfile - (&Apache::lonnet::filelocation('',$uri)); - &Apache::lonnet::devalidatecourseresdata( - $ENV{'course.'.$ENV{'request.course.id'}.'.num'}, - $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}); - my $uname=$ENV{'user.name'}; - my $udom=$ENV{'user.domain'}; - $ENV{'user.name'}=time; - $ENV{'user.domain'}=time; - my $result = &Apache::lonxml::xmlparse($request,'web', $problem); - $ENV{'user.name'}=$uname; - $ENV{'user.domain'}=$udom; - $result=~s/^.*\
]*\>//si; - $result=~s/\<\/body[^\>]*\>.*$//si; - return $result; + my ($symb)=@_; + my %data=('show_errors'=>'on', + 'devalidatecourseresdata'=>'on'); + return &Apache::loncommon::get_student_view($symb,time,time, + $ENV{'request.course.id'}, + 'web',\%data); } sub questiontext { my $text=$qparms{$prefix.'questiontext'}; + my $qt=&mt('Question Text'); return (<'. - &rawrendering($r,$uri). + &rawrendering($symb). ' |