Skip to content

Commit

Permalink
iss1162 oddly enough yet another place where the active language was …
Browse files Browse the repository at this point in the history
…not present.
  • Loading branch information
aharjula committed Apr 8, 2024
1 parent 545d87d commit 3c47f95
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,12 @@ public function get_generalfeedback_castext() {

// Init a session with question-variables and the related details.
$session = new stack_cas_session2([], $this->options, $this->seed);
if (count($this->get_cached('langs')) > 0) {
$ml = new stack_multilang();
$selected = $ml->pick_lang($this->get_cached('langs'));
$session->add_statement(new stack_secure_loader('%_STACK_LANG:' .
stack_utils::php_string_to_maxima_string($selected), 'language setting'), false);
}
if ($this->get_cached('preamble-qv') !== null) {
$session->add_statement(new stack_secure_loader($this->get_cached('preamble-qv'), 'preamble'));
}
Expand Down Expand Up @@ -652,6 +658,12 @@ public function get_questiondescription_castext() {

// Init a session with question-variables and the related details.
$session = new stack_cas_session2([], $this->options, $this->seed);
if (count($this->get_cached('langs')) > 0) {
$ml = new stack_multilang();
$selected = $ml->pick_lang($this->get_cached('langs'));
$session->add_statement(new stack_secure_loader('%_STACK_LANG:' .
stack_utils::php_string_to_maxima_string($selected), 'language setting'), false);
}
if ($this->get_cached('preamble-qv') !== null) {
$session->add_statement(new stack_secure_loader($this->get_cached('preamble-qv'), 'preamble'));
}
Expand Down

0 comments on commit 3c47f95

Please sign in to comment.