[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /interface loncommon.pm
www
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 27 May 2008 22:26:20 -0000
www Tue May 27 18:26:20 2008 EDT
Modified files:
/loncom/homework structuretags.pm
/loncom/interface loncommon.pm
Log:
Bug #5641: select math renderer on problem testing screen
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.420 loncom/homework/structuretags.pm:1.421
--- loncom/homework/structuretags.pm:1.420 Tue May 27 15:48:55 2008
+++ loncom/homework/structuretags.pm Tue May 27 18:25:56 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.420 2008/05/27 19:48:55 www Exp $
+# $Id: structuretags.pm,v 1.421 2008/05/27 22:25:56 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -451,9 +451,6 @@
$show_all
";
}
- if (($env{'form.problemlanguage'}) && ($env{'form.problemlanguage'}!~/notset/)) {
- $env{'environment.languages'}=$env{'form.problemlanguage'};
- }
my %langchoices=('' => '');
foreach (&Apache::loncommon::languageids()) {
if (&Apache::loncommon::supportedlanguagecode($_)) {
@@ -470,9 +467,17 @@
</div><div class="LC_edit_problem_header_row1">
<span class="LC_nobreak">'.
&mt('Language: ').
- &Apache::loncommon::select_form($env{'environment.languages'},'problemlanguage',
+ &Apache::loncommon::select_form($env{'form.languages'},'languages',
%langchoices).'
</span>
+ <span class="LC_nobreak">'.
+ &mt('Math Rendering: ').
+ &Apache::loncommon::select_form($env{'form.texengine'},'texengine',
+ ('' => '',
+ 'tth' => 'tth',
+ 'jsMath' => 'jsMath',
+ 'mimetex' => 'mimetex')).'
+ </span>
</div>
<input type="submit" name="changeproblemmode" value="'.&mt("Change View").'" />
<input type="submit" name="clear_style_file" accesskey="d" value="'.&mt('Show Default View').'" />
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.653 loncom/interface/loncommon.pm:1.654
--- loncom/interface/loncommon.pm:1.653 Mon May 19 13:00:22 2008
+++ loncom/interface/loncommon.pm Tue May 27 18:26:11 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.653 2008/05/19 17:00:22 raeburn Exp $
+# $Id: loncommon.pm,v 1.654 2008/05/27 22:26:11 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2932,10 +2932,14 @@
sub preferred_languages {
my @languages=();
+ if (($env{'request.role.adv'}) && ($env{'form.languages'})) {
+ @languages=(@languages,split(/\s*(\,|\;|\:)\s*/,$env{'form.languages'}));
+ }
if ($env{'course.'.$env{'request.course.id'}.'.languages'}) {
@languages=(@languages,split(/\s*(\,|\;|\:)\s*/,
$env{'course.'.$env{'request.course.id'}.'.languages'}));
}
+
if ($env{'environment.languages'}) {
@languages=(@languages,
split(/\s*(\,|\;|\:)\s*/,$env{'environment.languages'}));