--- loncom/xml/lonxml.pm 2004/10/18 19:50:43 1.332.2.2 +++ loncom/xml/lonxml.pm 2004/08/10 18:03:30 1.334 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.332.2.2 2004/10/18 19:50:43 albertel Exp $ +# $Id: lonxml.pm,v 1.334 2004/08/10 18:03:30 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,13 +165,20 @@ sub xmlbegin { } sub xmlend { + my ($target,$tagstack,$parstack,$parser,$safeeval)=@_; my $mode='xml'; my $status='OPEN'; if ($Apache::lonhomework::parsing_a_problem) { $mode='problem'; $status=$Apache::inputtags::status[-1]; } - return &Apache::lonfeedback::list_discussion($mode,$status).''; + my $discussion=&Apache::lonfeedback::list_discussion($mode,$status,'',$target,$tagstack,$parstack,$parser,$safeeval); + if ($target eq 'tex') { + &Apache::lonxml::newparser($parser,\$discussion,''); + return ''; + } else { + return $discussion.''; + } } sub tokeninputfield { @@ -1127,7 +1134,8 @@ sub inserteditinfo { my $initialize=''; if ($filetype eq 'html') { my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons(); - $initialize=&Apache::lonhtmlcommon::htmlareaheaders().(< $addbuttons @@ -1157,12 +1165,12 @@ $cleanbut BUTTONS - $buttons.=&Apache::lonhtmlcommon::htmlareaselectactive('filecont'); + $buttons.=&Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $editfooter=(< -
+ $xml_help $buttons
@@ -1529,12 +1537,6 @@ sub whichuser { if (defined($ENV{'form.grade_symb'})) { my $tmp_courseid=$ENV{'form.grade_courseid'}; my $allowed=&Apache::lonnet::allowed('vgr',$tmp_courseid); - if (!$allowed && - exists($ENV{'request.course.sec'}) && - $ENV{'request.course.sec'} !~ /^\s*$/) { - $allowed=&Apache::lonnet::allowed('vgr',$ENV{'form.grade_courseid'}. - '/'.$ENV{'request.course.sec'}); - } if ($allowed) { $symb=$ENV{'form.grade_symb'}; $courseid=$ENV{'form.grade_courseid'};