public function on_elements_end() {

        $numofrubrics = 0;
        foreach ($this->rubrics as $itemid => $levels) {
            $numofrubrics += count($levels);
        }

        if ($numofrubrics == 0) {
            $this->convert_legacy_criterion_elements();

        } else {
            $this->convert_legacy_rubric_elements();
        }
    }
public function on_elements_end() {

        $numofrubrics = 0;
        foreach ($this->rubrics as $itemid => $levels) {
            $numofrubrics += count($levels);
        }

        if ($numofrubrics == 0) {
            $this->convert_legacy_criterion_elements();

        } else {
            $this->convert_legacy_rubric_elements();
        }
    }
public function on_elements_end ( ) { $ numofrubrics = 0 ; foreach ( $ this -> rubrics as $ itemid => $ levels ) { $ numofrubrics += count ( $ levels ) ; } if ( $ numofrubrics == 0 ) { $ this -> convert_legacy_criterion_elements ( ) ; } else { $ this -> convert_legacy_rubric_elements ( ) ; } }
Processes gathered elements and rubrics
Processes gathered elements and rubrics