';
+ }
}
}
}
@@ -9812,7 +9850,7 @@ sub process_textbook_image {
} elsif ($author_ok eq 'ok') {
my ($result,$imageurl) =
&publishlogo($r,'upload',$caller,$dom,$confname,
- "$type/$dom/$cnum/cover",$width,$height);
+ "$type/$cdom/$cnum/cover",$width,$height);
if ($result eq 'ok') {
$url = $imageurl;
} else {
@@ -12273,8 +12311,8 @@ sub modify_selfcreation {
}
}
$chgtext .= '';
+ my $typename;
if (@types) {
- my $typename;
if ($type eq 'default') {
$typename = $othertitle;
} else {
@@ -12290,10 +12328,9 @@ sub modify_selfcreation {
'';
} else {
$resulttext .= '
'.
- &mt('There are now no restrictions on e-mail addresses which may be used for verification when a user requests an account.',
- $usertypes{$type}).
+ &mt('There are now no restrictions on e-mail addresses which may be used for verification when a user requests an account.').
'
'.
- &mt('(Affiliation: [_1])',$type);
+ &mt('(Affiliation: [_1])',$typename);
}
}
}
@@ -13656,7 +13693,11 @@ sub modify_coursedefaults {
postsubmit => 60,
mysqltables => 172800,
);
-
+ my %texoptions = (
+ MathJax => 'MathJax',
+ mimetex => &mt('Convert to Images'),
+ tth => &mt('TeX to HTML'),
+ );
$defaultshash{'coursedefaults'} = {};
if (ref($domconfig{'coursedefaults'}) ne 'HASH') {
@@ -13716,6 +13757,20 @@ sub modify_coursedefaults {
}
}
}
+ my $texengine;
+ if ($env{'form.texengine'} =~ /^(MathJax|mimetex|tth)$/) {
+ $texengine = $env{'form.texengine'};
+ if ($defaultshash{'coursedefaults'}{'texengine'} eq '') {
+ unless ($texengine eq 'MathJax') {
+ $changes{'texengine'} = 1;
+ }
+ } elsif ($defaultshash{'coursedefaults'}{'texengine'} ne $texengine) {
+ $changes{'texengine'} = 1;
+ }
+ }
+ if ($texengine ne '') {
+ $defaultshash{'coursedefaults'}{'texengine'} = $texengine;
+ }
my $currclone = $domconfig{'coursedefaults'}{'canclone'};
my @currclonecode;
if (ref($currclone) eq 'HASH') {
@@ -13836,8 +13891,8 @@ sub modify_coursedefaults {
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1);
if (($changes{'canuse_pdfforms'}) || ($changes{'uploadquota'}) || ($changes{'postsubmit'}) ||
($changes{'coursecredits'}) || ($changes{'uselcmath'}) || ($changes{'usejsme'}) ||
- ($changes{'canclone'}) || ($changes{'mysqltables'})) {
- foreach my $item ('canuse_pdfforms','uselcmath','usejsme') {
+ ($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'})) {
+ foreach my $item ('canuse_pdfforms','uselcmath','usejsme','texengine') {
if ($changes{$item}) {
$domdefaults{$item}=$defaultshash{'coursedefaults'}{$item};
}
@@ -13906,6 +13961,11 @@ sub modify_coursedefaults {
} else {
$resulttext .= '
'.&mt('Molecule editor uses JME (Java), if supported by client OS.').'
';
}
+ } elsif ($item eq 'texengine') {
+ if ($defaultshash{'coursedefaults'}{'texengine'} ne '') {
+ $resulttext .= '
'.&mt('Default method to display mathematics set to: "[_1]"',
+ $texoptions{$defaultshash{'coursedefaults'}{'texengine'}}).'