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;
    }
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;
    }
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 ; }
Call after calculations to output any error messages.

@return string[] Array of strings describing error messages found during stats calculation.
Call after calculations to output any error messages .