[LON-CAPA-users] Access to effective language in scriptblock?
Tue, 19 Jun 2007 12:40:48 +0200
Imagine that you'd like to create a problem which should be offered in
two or more different languages. The effective language which will be
used for the student depends on the different settings within LON-CAPA,
e.g. user's language preference or course setting.
For problem texts in different languages, the languageblock could be used:
<languageblock include="de">Deutscher Text</languageblock>
<languageblock exclude="de">English text</languageblock>
But what to do if the text elements must be "calculated" in the script
block? Is there any possibility to access the effective language within
the script block? For example, this is necessary for the option list and
the answer for optionresponse and for the answer for stringresponse, etc.
I can send example code if needed. There are quite a lot of different
problems where this is needed.
Thanks for any help,