--- loncom/interface/courseprefs.pm 2021/08/04 19:59:10 1.93
+++ loncom/interface/courseprefs.pm 2021/12/24 11:07:42 1.95
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.93 2021/08/04 19:59:10 raeburn Exp $
+# $Id: courseprefs.pm,v 1.95 2021/12/24 11:07:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -473,7 +473,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',
@@ -482,6 +482,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' =>
@@ -995,8 +996,8 @@ sub process_changes {
}
}
}
-
}
+
foreach my $idx (@items) {
my $itemid = $itemids{$idx};
next unless ($itemid);
@@ -1852,7 +1853,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') {
@@ -4076,8 +4078,8 @@ sub print_feedback {
}
if ($position eq 'top') {
my $includeempty = 0;
- $datatable .= '
'.
- &user_table($cdom,$item,\@sections,
+ $datatable .= ' | '.
+ &user_table($cdom,$item,\@sections,
$settings->{$item},\%lt,$noedit);
} else {
$datatable .= &Apache::lonhtmlcommon::textbox($item.'.text',
@@ -4300,8 +4302,8 @@ sub print_discussion {
''.&role_checkboxes($cdom,$cnum,$item,$settings,undef,undef,$noedit).
' ';
} elsif ($item eq 'plc.users.denied') {
- $datatable .= ' | '.
- &user_table($cdom,$item,undef,
+ $datatable .= ' | '.
+ &user_table($cdom,$item,undef,
$settings->{$item},\%lt,$noedit);
} elsif ($item eq 'pch.roles.denied') {
$datatable .= ' | '.
@@ -4671,6 +4673,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);
}
@@ -5064,7 +5070,7 @@ sub print_menuitems {
my %checked;
my $on = ' checked="checked"';
foreach my $key (keys(%{$menu{$num}})) {
- if (($key eq 'top') || ($key eq 'inline') || ($key eq 'main')) {
+ if (($key eq 'top') || ($key eq 'inline') || ($key eq 'foot') || ($key eq 'main')) {
if ($menu{$num}{$key} eq 'y') {
$checked{$key} = $on;
}
@@ -5081,7 +5087,13 @@ sub print_menuitems {
foreach my $category (@order) {
if ((ref($categories{$category}) eq 'ARRAY') && (@{$categories{$category}} > 0)) {
$datatable .= ' |