original_string: public static function calculate_all_expressions(
              qtype_calculated_question_with_expressions $question) {
          $question->questiontext = $question->vs->replace_expressions_in_text(
                  $question->questiontext);
          $question->generalfeedback = $question->vs->replace_expressions_in_text(
                  $question->generalfeedback);
  
          foreach ($question->answers as $ans) {
              if ($ans->answer && $ans->answer !== '*') {
                  $ans->answer = $question->vs->replace_expressions_in_text($ans->answer,
                          $ans->correctanswerlength, $ans->correctanswerformat);
              }
              $ans->feedback = $question->vs->replace_expressions_in_text($ans->feedback,
                      $ans->correctanswerlength, $ans->correctanswerformat);
          }
      }
code: public static function calculate_all_expressions(
              qtype_calculated_question_with_expressions $question) {
          $question->questiontext = $question->vs->replace_expressions_in_text(
                  $question->questiontext);
          $question->generalfeedback = $question->vs->replace_expressions_in_text(
                  $question->generalfeedback);
  
          foreach ($question->answers as $ans) {
              if ($ans->answer && $ans->answer !== '*') {
                  $ans->answer = $question->vs->replace_expressions_in_text($ans->answer,
                          $ans->correctanswerlength, $ans->correctanswerformat);
              }
              $ans->feedback = $question->vs->replace_expressions_in_text($ans->feedback,
                      $ans->correctanswerlength, $ans->correctanswerformat);
          }
      }
code_tokens: public static function calculate_all_expressions ( qtype_calculated_question_with_expressions $ question ) { $ question -> questiontext = $ question -> vs -> replace_expressions_in_text ( $ question -> questiontext ) ; $ question -> generalfeedback = $ question -> vs -> replace_expressions_in_text ( $ question -> generalfeedback ) ; foreach ( $ question -> answers as $ ans ) { if ( $ ans -> answer && $ ans -> answer !== '*' ) { $ ans -> answer = $ question -> vs -> replace_expressions_in_text ( $ ans -> answer , $ ans -> correctanswerlength , $ ans -> correctanswerformat ) ; } $ ans -> feedback = $ question -> vs -> replace_expressions_in_text ( $ ans -> feedback , $ ans -> correctanswerlength , $ ans -> correctanswerformat ) ; } }
docstring: Calculate all the exressions in a qtype_calculatedmulti_single_question
  or qtype_calculatedmulti_multi_question.
  @param unknown_type $question
docstring_tokens: Calculate all the exressions in a qtype_calculatedmulti_single_question or qtype_calculatedmulti_multi_question .