version 1.430.2.2, 2006/12/29 20:36:13
|
version 1.437, 2007/01/29 23:51:04
|
Line 88 use Apache::loncommon();
|
Line 88 use Apache::loncommon();
|
use Apache::lonfeedback(); |
use Apache::lonfeedback(); |
use Apache::lonmsg(); |
use Apache::lonmsg(); |
use Apache::loncacc(); |
use Apache::loncacc(); |
|
use Apache::lonmaxima(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
|
#================================================== Main subroutine: xmlparse |
#================================================== Main subroutine: xmlparse |
Line 674 sub init_safespace {
|
Line 675 sub init_safespace {
|
'&chem_standard_order'); |
'&chem_standard_order'); |
$safehole->wrap(\&Apache::response::check_status,$safeeval,'&check_status'); |
$safehole->wrap(\&Apache::response::check_status,$safeeval,'&check_status'); |
|
|
|
$safehole->wrap(\&Apache::lonmaxima::maxima_eval,$safeeval,'&maxima_eval'); |
|
$safehole->wrap(\&Apache::lonmaxima::maxima_check,$safeeval,'&maxima_check'); |
|
$safehole->wrap(\&Apache::lonmaxima::maxima_cas_formula_fix,$safeeval, |
|
'&maxima_cas_formula_fix'); |
|
|
|
$safehole->wrap(\&Apache::caparesponse::capa_formula_fix,$safeeval, |
|
'&capa_formula_fix'); |
|
|
$safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin'); |
$safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin'); |
$safehole->wrap(\&Math::Cephes::acos,$safeeval,'&acos'); |
$safehole->wrap(\&Math::Cephes::acos,$safeeval,'&acos'); |
$safehole->wrap(\&Math::Cephes::atan,$safeeval,'&atan'); |
$safehole->wrap(\&Math::Cephes::atan,$safeeval,'&atan'); |
Line 1457 ENDNOTFOUND
|
Line 1466 ENDNOTFOUND
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['editmode']); |
['editmode']); |
} |
} |
&Apache::lonnet::logthis("edit mode is ".$env{'form.editmode'}); |
|
if (!$env{'form.editmode'} || $env{'form.viewmode'} || $env{'form.discardview'}) { |
if (!$env{'form.editmode'} || $env{'form.viewmode'} || $env{'form.discardview'}) { |
$result = &Apache::lonxml::xmlparse($request,$target,$filecontents, |
$result = &Apache::lonxml::xmlparse($request,$target,$filecontents, |
'',%mystyle); |
'',%mystyle); |
Line 1698 sub register_insert {
|
Line 1706 sub register_insert {
|
my ($tag,$descrip,$color,$function,$show,$helpfile,$helpdesc) = split(/,/, $line); |
my ($tag,$descrip,$color,$function,$show,$helpfile,$helpdesc) = split(/,/, $line); |
if ($tag) { |
if ($tag) { |
$insertlist{"$tagnum.tag"} = $tag; |
$insertlist{"$tagnum.tag"} = $tag; |
$insertlist{"$tagnum.description"} = $descrip; |
$insertlist{"$tag.description"} = $descrip; |
$insertlist{"$tagnum.color"} = $color; |
$insertlist{"$tag.color"} = $color; |
$insertlist{"$tagnum.function"} = $function; |
$insertlist{"$tag.function"} = $function; |
if (!defined($show)) { $show='yes'; } |
if (!defined($show)) { $show='yes'; } |
$insertlist{"$tagnum.show"}= $show; |
$insertlist{"$tag.show"}= $show; |
$insertlist{"$tagnum.helpfile"} = $helpfile; |
$insertlist{"$tag.helpfile"} = $helpfile; |
$insertlist{"$tagnum.helpdesc"} = $helpdesc; |
$insertlist{"$tag.helpdesc"} = $helpdesc; |
$insertlist{"$tag.num"}=$tagnum; |
$insertlist{"$tag.num"}=$tagnum; |
$tagnum++; |
$tagnum++; |
} |
} |
Line 1718 sub register_insert {
|
Line 1726 sub register_insert {
|
for (my $j=0;$j <=$#which;$j++) { |
for (my $j=0;$j <=$#which;$j++) { |
if ( $which[$j] eq 'Y' ) { |
if ( $which[$j] eq 'Y' ) { |
if ($insertlist{"$j.show"} ne 'no') { |
if ($insertlist{"$j.show"} ne 'no') { |
push(@{ $insertlist{"$tag.which"} },$j); |
push(@{ $insertlist{"$tag.which"} },$insertlist{"$j.tag"}); |
} |
} |
} |
} |
} |
} |
Line 1727 sub register_insert {
|
Line 1735 sub register_insert {
|
} |
} |
|
|
sub description { |
sub description { |
my ($token)=@_; |
my ($token)=@_; |
my $tagnum; |
my $tag = &get_tag($token); |
my $tag=$token->[1]; |
return $insertlist{$tag.'.description'}; |
foreach my $namespace (reverse @Apache::lonxml::namespace) { |
|
my $testtag=$namespace.'::'.$tag; |
|
$tagnum=$insertlist{"$testtag.num"}; |
|
if (defined($tagnum)) { last; } |
|
} |
|
if (!defined ($tagnum)) { $tagnum=$Apache::lonxml::insertlist{"$tag.num"}; } |
|
return $insertlist{$tagnum.'.description'}; |
|
} |
} |
|
|
# Returns a list containing the help file, and the description |
# Returns a list containing the help file, and the description |
sub helpinfo { |
sub helpinfo { |
my ($token)=@_; |
my ($token)=@_; |
my $tagnum; |
my $tag = &get_tag($token); |
my $tag=$token->[1]; |
return ($insertlist{$tag.'.helpfile'}, $insertlist{$tag.'.helpdesc'}); |
foreach my $namespace (reverse @Apache::lonxml::namespace) { |
} |
my $testtag=$namespace.'::'.$tag; |
|
$tagnum=$insertlist{"$testtag.num"}; |
sub get_tag { |
if (defined($tagnum)) { last; } |
my ($token)=@_; |
} |
my $tagnum; |
if (!defined ($tagnum)) { $tagnum=$Apache::lonxml::insertlist{"$tag.num"}; } |
my $tag=$token->[1]; |
return ($insertlist{$tagnum.'.helpfile'}, $insertlist{$tagnum.'.helpdesc'}); |
foreach my $namespace (reverse(@Apache::lonxml::namespace)) { |
|
my $testtag = $namespace.'::'.$tag; |
|
$tagnum = $insertlist{"$testtag.num"}; |
|
last if (defined($tagnum)); |
|
} |
|
if (!defined($tagnum)) { |
|
$tagnum = $Apache::lonxml::insertlist{"$tag.num"}; |
|
} |
|
return $insertlist{"$tagnum.tag"}; |
} |
} |
|
|
1; |
1; |