--- loncom/xml/lonxml.pm 2004/05/21 21:07:54 1.318 +++ loncom/xml/lonxml.pm 2004/06/04 14:03:57 1.321 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.318 2004/05/21 21:07:54 matthew Exp $ +# $Id: lonxml.pm,v 1.321 2004/06/04 14:03:57 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +40,7 @@ package Apache::lonxml; use vars -qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $errorcount $warningcount); +qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $errorcount $warningcount @htmlareafields); use strict; use HTML::LCParser(); use HTML::TreeBuilder(); @@ -743,7 +743,7 @@ sub init_safespace { my $rndseed; my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); $rndseed=&Apache::lonnet::rndseed($symb,$courseid,$domain,$name); - $safeinit .= ';$external::randomseed='.$rndseed.';'; + $safeinit .= ';$external::randomseed="'.$rndseed.'";'; &Apache::lonxml::debug("Setting rndseed to $rndseed"); &Apache::run::run($safeinit,$safeeval); @@ -1094,21 +1094,20 @@ sub storefile { } sub createnewhtml { - my $filecontents=(< - - Title of Document Goes Here - +$title - - Body of Document Goes Here - +$body SIMPLECONTENT - return $filecontents; + return $filecontents; } sub createnewsty { @@ -1129,8 +1128,24 @@ sub inserteditinfo { $filecontents = &HTML::Entities::encode($filecontents,'<>&"'); # my $editheader='Edit below
'; my $xml_help = ''; + my $activate=''; + my $initialize=''; if ($filetype eq 'html') { - $xml_help=Apache::loncommon::helpLatexCheatsheet(); + $initialize=&Apache::lonhtmlcommon::htmlareaheaders().(< + HTMLArea.loadPlugin("FullPage"); + + function initDocument() { + var editor=new HTMLArea("editor"); + editor.registerPlugin(FullPage); + editor.generate(); + } + +FULLPAGE + $result=~s/\]*)\>/\/i; + $xml_help=&Apache::loncommon::helpLatexCheatsheet(); +#FIXME: need to install FullPage plugin during install +# $activate=&Apache::lonhtmlcommon::htmlareaactive(); } my $cleanbut = ''; if ($filetype eq 'html') { @@ -1147,17 +1162,20 @@ $cleanbut BUTTONS my $editfooter=(<
$xml_help $buttons
- +
$buttons
$titledisplay +$activate + ENDFOOTER # $result=~s/(\]*\>)/$1$editheader/is; $result=~s/(\<\/body\>)/$editfooter/is;