[LON-CAPA-cvs] cvs: loncom / LONCAPA.pm /interface domainprefs.pm /lonnet/perl lonnet.pm /xml lontexconvert.pm
raeburn
raeburn at source.lon-capa.org
Fri Feb 15 15:56:23 EST 2019
raeburn Fri Feb 15 20:56:23 2019 EDT
Modified files:
/loncom LONCAPA.pm
/loncom/interface domainprefs.pm
/loncom/lonnet/perl lonnet.pm
/loncom/xml lontexconvert.pm
Log:
- Default renderer for unconfigured domains set in a single location.
Index: loncom/LONCAPA.pm
diff -u loncom/LONCAPA.pm:1.34 loncom/LONCAPA.pm:1.35
--- loncom/LONCAPA.pm:1.34 Fri Feb 8 14:49:51 2013
+++ loncom/LONCAPA.pm Fri Feb 15 20:56:10 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Base routines
#
-# $Id: LONCAPA.pm,v 1.34 2013/02/08 14:49:51 raeburn Exp $
+# $Id: LONCAPA.pm,v 1.35 2019/02/15 20:56:10 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -138,6 +138,13 @@
return $result;
}
+# Return the default engine to use to render content of <m></m> tags unless
+# a domain, course, or user specific value exists.
+
+sub texengine {
+ return 'MathJax';
+}
+
# Return the Linux distro where this LON-CAPA instance is running
sub distro {
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.348 loncom/interface/domainprefs.pm:1.349
--- loncom/interface/domainprefs.pm:1.348 Thu Jan 31 17:44:07 2019
+++ loncom/interface/domainprefs.pm Fri Feb 15 20:56:14 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.348 2019/01/31 17:44:07 raeburn Exp $
+# $Id: domainprefs.pm,v 1.349 2019/02/15 20:56:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5272,7 +5272,6 @@
mysqltables => 'Lifetime (s) of "Temporary" MySQL tables (student performance data) on homeserver',
);
my %staticdefaults = (
- texengine => 'MathJax',
anonsurvey_threshold => 10,
uploadquota => 500,
postsubmit => 60,
@@ -5286,7 +5285,7 @@
'canclone' => 'none',
);
@toggles = ('canuse_pdfforms','uselcmath','usejsme');
- my $deftex = $staticdefaults{'texengine'};
+ my $deftex = $Apache::lonnet::deftex;
if (ref($settings) eq 'HASH') {
if ($settings->{'texengine'}) {
if ($settings->{'texengine'} =~ /^(MathJax|mimetex|tth)$/) {
@@ -16133,7 +16132,6 @@
$defaultshash{'coursedefaults'}{$setting}{$type} = $newdef;
}
if ($currdef ne $newdef) {
- my $staticdef;
if ($item eq 'anonsurvey_threshold') {
unless (($currdef eq '') && ($newdef == $staticdefaults{$item})) {
$changes{$item} = 1;
@@ -16149,11 +16147,12 @@
my $texengine;
if ($env{'form.texengine'} =~ /^(MathJax|mimetex|tth)$/) {
$texengine = $env{'form.texengine'};
- if ($defaultshash{'coursedefaults'}{'texengine'} eq '') {
- unless ($texengine eq 'MathJax') {
+ my $currdef = $domconfig{'coursedefaults'}{'texengine'};
+ if ($currdef eq '') {
+ unless ($texengine eq $Apache::lonnet::deftex) {
$changes{'texengine'} = 1;
}
- } elsif ($defaultshash{'coursedefaults'}{'texengine'} ne $texengine) {
+ } elsif ($currdef ne $texengine) {
$changes{'texengine'} = 1;
}
}
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1404 loncom/lonnet/perl/lonnet.pm:1.1405
--- loncom/lonnet/perl/lonnet.pm:1.1404 Mon Jan 28 21:37:03 2019
+++ loncom/lonnet/perl/lonnet.pm Fri Feb 15 20:56:18 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1404 2019/01/28 21:37:03 raeburn Exp $
+# $Id: lonnet.pm,v 1.1405 2019/02/15 20:56:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -77,7 +77,7 @@
use Encode;
-use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir
+use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir $deftex
$_64bit %env %protocol %loncaparevs %serverhomeIDs %needsrelease
%managerstab);
@@ -14811,6 +14811,11 @@
}
+# ------------- set default texengine (domain default overrides this)
+{
+ $deftex = LONCAPA::texengine();
+}
+
$memcache=new Cache::Memcached({'servers' => ['127.0.0.1:11211'],
'compress_threshold'=> 20_000,
});
@@ -15536,7 +15541,6 @@
for the sheet of paper
FirstName - column that the first name starts in
FirstNameLength - number of columns that the first name spans
-
LastName - column that the last name starts in
LastNameLength - number of columns that the last name spans
BubblesPerRow - number of bubbles available in each row used to
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.121 loncom/xml/lontexconvert.pm:1.122
--- loncom/xml/lontexconvert.pm:1.121 Mon Apr 23 18:59:28 2018
+++ loncom/xml/lontexconvert.pm Fri Feb 15 20:56:22 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.121 2018/04/23 18:59:28 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.122 2019/02/15 20:56:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -321,7 +321,7 @@
if (exists($env{'form.texengine'})) {
if ($env{'form.texengine'} ne '') {
if (lc($env{'form.texengine'}) eq 'jsmath') {
- return 'MathJax';
+ return 'MathJax';
}
return $env{'form.texengine'};
}
@@ -344,7 +344,7 @@
if ($domdefaults{'texengine'} ne '') {
return $domdefaults{'texengine'};
}
- return 'MathJax';
+ return $Apache::lonnet::deftex;
}
sub init_math_support {
More information about the LON-CAPA-cvs
mailing list