--- loncom/interface/lonparmset.pm 2023/07/06 19:24:31 1.522.2.28.4.10
+++ loncom/interface/lonparmset.pm 2024/08/19 17:01:00 1.522.2.28.4.12
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.522.2.28.4.10 2023/07/06 19:24:31 raeburn Exp $
+# $Id: lonparmset.pm,v 1.522.2.28.4.12 2024/08/19 17:01:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -321,6 +321,7 @@ use Apache::lonnavmaps;
use Apache::longroup;
use Apache::lonrss;
use HTML::Entities;
+use Text::Wrap();
use LONCAPA qw(:DEFAULT :match);
@@ -1880,6 +1881,7 @@ sub lookUpTableParameter {
'lenient' => 'grading',
'retrypartial' => 'tries',
'discussvote' => 'misc',
+ 'texdisplay' => 'misc',
'examcode' => 'high_level_randomization',
);
}
@@ -1953,6 +1955,8 @@ sub parmboxes {
&whatIsMyCategory($tempparameter, \%categoryList);
}
#part to print the parm-list
+ $Text::Wrap::columns=60;
+ $Text::Wrap::separator='
';
$r->print('
'."\n");
#Print parameters
@@ -1970,8 +1974,9 @@ sub parmboxes {
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
$r->print(' checked="checked"');
}
- $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
- : $tempkey)
+ $r->print(' />'.($$allparms{$tempkey}=~/\S/ ?
+ Text::Wrap::wrap('',' 'x4,$$allparms{$tempkey})
+ : $tempkey)
.'
'."\n");
}
$r->print("
\n");
@@ -2890,7 +2895,7 @@ sub assessparms {
'date_interval','int','float','string','string_lenient',
'string_examcode','string_deeplink','string_discussvote',
'string_useslots','string_problemstatus','string_ip',
- 'string_questiontype') {
+ 'string_questiontype','string_tex') {
$r->print('').
'" name="recent_'.$item.'" />');
@@ -3572,6 +3577,8 @@ sub storedata {
if ($thiskey =~ /\.retrypartial$/) {
$name = 'retrypartial';
}
+ } elsif ($typeof eq 'string_tex') {
+ $name = 'texdisplay';
}
} elsif ($cmd eq 'datepointer') {
$data=&Apache::lonhtmlcommon::get_date_from_form($env{$key});
@@ -4376,6 +4383,9 @@ my %strings =
['_denyfrom_','Hostname(s) or IP(s) from which access is disallowed']],
'string_deeplink'
=> [['on','Set choices for link protection, resource listing, access scope, shown menu items, embedding, and exit link']],
+ 'string_tex'
+ => [['tth', 'tth (TeX to HTML)'],
+ ['mathjax', 'MathJax']],
);
my %stringmatches = (
@@ -4394,6 +4404,7 @@ my %stringtypes = (
examcode => 'string_examcode',
acc => 'string_ip',
deeplink => 'string_deeplink',
+ texdisplay => 'string_tex',
);
sub standard_string_options {