[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
www
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 27 May 2008 19:48:55 -0000
www Tue May 27 15:48:55 2008 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
Bug #5637: setting of language on problem testing screen
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.419 loncom/homework/structuretags.pm:1.420
--- loncom/homework/structuretags.pm:1.419 Wed Feb 13 11:21:44 2008
+++ loncom/homework/structuretags.pm Tue May 27 15:48:55 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.419 2008/02/13 16:21:44 bisitz Exp $
+# $Id: structuretags.pm,v 1.420 2008/05/27 19:48:55 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -451,13 +451,28 @@
$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($_)) {
+ $langchoices{&Apache::loncommon::supportedlanguagecode($_)}
+ = &Apache::loncommon::plainlanguagedescription($_);
+ }
+ }
$result.='
<span class="LC_nobreak">
'.&mt('Apply style file: ').'
<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" />
<a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a>
</span>
+ </div><div class="LC_edit_problem_header_row1">
+ <span class="LC_nobreak">'.
+ &mt('Language: ').
+ &Apache::loncommon::select_form($env{'environment.languages'},'problemlanguage',
+ %langchoices).'
+ </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').'" />