--- loncom/xml/lonxml.pm 2008/05/02 22:00:12 1.477
+++ loncom/xml/lonxml.pm 2008/06/25 12:00:37 1.481
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.477 2008/05/02 22:00:12 www Exp $
+# $Id: lonxml.pm,v 1.481 2008/06/25 12:00:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -718,6 +718,7 @@ sub init_safespace {
$safeeval->permit(":base_math");
$safeeval->permit("sort");
$safeeval->permit("time");
+ $safeeval->permit("caller");
$safeeval->deny("rand");
$safeeval->deny("srand");
$safeeval->deny(":base_io");
@@ -737,6 +738,9 @@ sub init_safespace {
$safehole->wrap(\&Apache::caparesponse::capa_formula_fix,$safeeval,
'&capa_formula_fix');
+ $safehole->wrap(\&Apache::lonlocal::locallocaltime,$safeeval,
+ '&locallocaltime');
+
$safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin');
$safehole->wrap(\&Math::Cephes::acos,$safeeval,'&acos');
$safehole->wrap(\&Math::Cephes::atan,$safeeval,'&atan');
@@ -1080,7 +1084,7 @@ Optional Arguments:
sub increment_counter {
my ($increment, $part_response) = @_;
- if ($env{'form.grade_target'} eq 'analyze') { return; }
+ if ($env{'form.grade_noincrement'}) { return; }
if (!defined($increment) || $increment le 0) {
$increment = 1;
}
@@ -1497,6 +1501,30 @@ sub verify_html {
return '';
}
+sub renderingoptions {
+ my %langchoices=('' => '');
+ foreach (&Apache::loncommon::languageids()) {
+ if (&Apache::loncommon::supportedlanguagecode($_)) {
+ $langchoices{&Apache::loncommon::supportedlanguagecode($_)}
+ = &Apache::loncommon::plainlanguagedescription($_);
+ }
+ }
+ return
+ ''.
+ &mt('Language:').' '.
+ &Apache::loncommon::select_form($env{'form.languages'},'languages',
+ %langchoices).'
+
+ '.
+ &mt('Math Rendering:').' '.
+ &Apache::loncommon::select_form($env{'form.texengine'},'texengine',
+ ('' => '',
+ 'tth' => 'tth (Tex-to-HTML)',
+ 'jsMath' => 'jsMath',
+ 'mimetex' => 'mimetex (Convert to Images)')).'
+ ';
+}
+
sub inserteditinfo {
my ($filecontents, $filetype, $filename)=@_;
$filecontents = &HTML::Entities::encode($filecontents,'<>&"');