original_string: public function any_error_messages() {
          $errors = array();
          foreach ($this->get_all_slots() as $slot) {
              foreach ($this->for_slot($slot)->get_sub_question_ids() as $subqid) {
                  if ($this->for_subq($subqid)->differentweights) {
                      $name = $this->for_subq($subqid)->question->name;
                      $errors[] = get_string('erroritemappearsmorethanoncewithdifferentweight', 'question', $name);
                  }
              }
          }
          return $errors;
      }
code: public function any_error_messages() {
          $errors = array();
          foreach ($this->get_all_slots() as $slot) {
              foreach ($this->for_slot($slot)->get_sub_question_ids() as $subqid) {
                  if ($this->for_subq($subqid)->differentweights) {
                      $name = $this->for_subq($subqid)->question->name;
                      $errors[] = get_string('erroritemappearsmorethanoncewithdifferentweight', 'question', $name);
                  }
              }
          }
          return $errors;
      }
code_tokens: public function any_error_messages ( ) { $ errors = array ( ) ; foreach ( $ this -> get_all_slots ( ) as $ slot ) { foreach ( $ this -> for_slot ( $ slot ) -> get_sub_question_ids ( ) as $ subqid ) { if ( $ this -> for_subq ( $ subqid ) -> differentweights ) { $ name = $ this -> for_subq ( $ subqid ) -> question -> name ; $ errors [ ] = get_string ( 'erroritemappearsmorethanoncewithdifferentweight' , 'question' , $ name ) ; } } } return $ errors ; }
docstring: Call after calculations to output any error messages.
  
  @return string[] Array of strings describing error messages found during stats calculation.
docstring_tokens: Call after calculations to output any error messages .