--- loncom/interface/courseprefs.pm 2021/12/12 21:52:15 1.49.2.26
+++ loncom/interface/courseprefs.pm 2021/12/24 21:09:09 1.49.2.28
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.49.2.26 2021/12/12 21:52:15 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49.2.28 2021/12/24 21:09:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -464,7 +464,7 @@ sub handler {
help => 'Course_Prefs_Display',
ordered => ['default_xml_style','pageseparators',
'disable_receipt_display','texengine',
- 'tthoptions','uselcmath','usejsme'],
+ 'tthoptions','uselcmath','usejsme','inline_chem'],
itemtext => {
default_xml_style => 'Default XML style file',
pageseparators => 'Visibly Separate Items on Pages',
@@ -473,6 +473,7 @@ sub handler {
tthoptions => 'Default set of options to pass to tth/m when converting TeX',
uselcmath => 'Student formula entry uses inline preview, not DragMath pop-up',
usejsme => 'Molecule editor uses JSME (HTML5) in place of JME (Java)',
+ inline_chem => 'Chemical reaction response uses inline preview, not pop-up',
},
},
'grading' =>
@@ -1475,7 +1476,8 @@ sub store_changes {
$displayval = &Apache::lonlocal::locallocaltime($displayval);
} elsif ($key eq 'categories') {
$displayval = $env{'form.categories_display'};
- } elsif (($key eq 'canuse_pdfforms') || ($key eq 'usejsme') || ($key eq 'uselcmath')) {
+ } elsif (($key eq 'canuse_pdfforms') || ($key eq 'usejsme') ||
+ ($key eq 'uselcmath') || ($key eq 'inline_chem')) {
if ($changes->{$item}{$key} eq '1') {
$displayval = &mt('Yes');
} elsif ($changes->{$item}{$key} eq '0') {
@@ -4016,6 +4018,10 @@ sub print_appearance {
text => ''.&mt($itemtext->{'usejsme'}).'',
input => 'radio',
},
+ 'inline_chem' => {
+ text => ''.&mt($itemtext->{'inline_chem'}).'',
+ input => 'radio',
+ },
);
return &make_item_rows($cdom,\%items,$ordered,$settings,$rowtotal,$crstype,'appearance',$noedit);
}
@@ -4228,7 +4234,7 @@ sub print_other {
input => 'textbox',
size => '30',
};
- my $output = &make_item_rows($cdom,\%items,\@ordered,$settings,$rowtotal,$crstype,'other',$noedit);
+ return &make_item_rows($cdom,\%items,\@ordered,$settings,$rowtotal,$crstype,'other',$noedit);
}
sub get_other_items {
@@ -4398,7 +4404,7 @@ sub make_item_rows {
$settings->{$item},$disabled);
} elsif ($items->{$item}{input} eq 'radio') {
my ($unsetdefault,$valueyes,$valueno);
- if (($item eq 'usejsme') || ($item eq 'uselcmath')) {
+ if (($item eq 'usejsme') || ($item eq 'uselcmath') || ($item eq 'inline_chem')) {
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom);
unless ($domdefs{$item} eq '0') {
$unsetdefault = 1;