diff --git a/lang/en/qtype_stack.php b/lang/en/qtype_stack.php index fe4c86bb14..1caa8bafef 100644 --- a/lang/en/qtype_stack.php +++ b/lang/en/qtype_stack.php @@ -1544,7 +1544,7 @@ $string['castext_debug_header_value_no_simp'] = 'Value'; $string['castext_debug_header_disp_simp'] = 'Simplified displayed value'; $string['castext_debug_header_disp_no_simp'] = 'Displayed value'; -$string['castext_debug_no_vars'] = 'This question has no question variables to debug!'; +$string['castext_debug_no_vars'] = 'This question has no variables to debug here! Display question variables in question text and feedback variables in node feedback.'; $string['castext_error_header'] = 'Rendering of text content failed.'; $string['castext_error_unevaluated'] = 'This text content was never evaluated.'; diff --git a/stack/cas/castext2/blocks/debug.block.php b/stack/cas/castext2/blocks/debug.block.php index a452cc9904..42a7fa7478 100644 --- a/stack/cas/castext2/blocks/debug.block.php +++ b/stack/cas/castext2/blocks/debug.block.php @@ -56,7 +56,7 @@ public function compile($format, $options): ?MP_Node { $castext .= "\n| `$key` | `{#$key,simp#}` | `{#$key,simp=false#}` | {@$key,simp@} | {@$key,simp=false@} |"; } } else { - $castext = '' . + $castext = '
[[commonstring key="castext_debug_header_key"/]]
' . '' . '' . '' . @@ -74,7 +74,8 @@ public function compile($format, $options): ?MP_Node { // phpcs:ignore moodle.Commenting.MissingDocblock.Function public function is_flat(): bool { - return true; + //ISS1085 - Change to false. Common strings need to be evaluated. + return false; } // phpcs:ignore moodle.Commenting.MissingDocblock.Function diff --git a/tests/walkthrough_adaptive_test.php b/tests/walkthrough_adaptive_test.php index d11de027d0..421dd3cc20 100644 --- a/tests/walkthrough_adaptive_test.php +++ b/tests/walkthrough_adaptive_test.php @@ -4422,7 +4422,10 @@ public function test_test3_debug(): void { $this->check_output_does_not_contain_prt_feedback(); $this->check_output_does_not_contain_stray_placeholders(); $this->check_current_output( - new question_pattern_expectation('/This question has no question variables to debug/'), + new question_pattern_expectation( + '/This question has no variables to debug here! ' . + 'Display question variables in question text and feedback variables in node feedback./' + ), $this->get_does_not_contain_feedback_expectation(), $this->get_does_not_contain_num_parts_correct(), $this->get_no_hint_visible_expectation()
[[commonstring key="castext_debug_header_key"/]][[commonstring key="castext_debug_header_value_simp"/]][[commonstring key="castext_debug_header_value_no_simp"/]][[commonstring key="castext_debug_header_disp_simp"/]]