protected function populate_question_numbers() {
        $number = 1;
        foreach ($this->slots as $slot) {
            if ($this->questions[$slot->questionid]->length == 0) {
                $slot->displayednumber = get_string('infoshort', 'quiz');
            } else {
                $slot->displayednumber = $number;
                $number += 1;
            }
        }
    }
protected function populate_question_numbers() {
        $number = 1;
        foreach ($this->slots as $slot) {
            if ($this->questions[$slot->questionid]->length == 0) {
                $slot->displayednumber = get_string('infoshort', 'quiz');
            } else {
                $slot->displayednumber = $number;
                $number += 1;
            }
        }
    }
protected function populate_question_numbers ( ) { $ number = 1 ; foreach ( $ this -> slots as $ slot ) { if ( $ this -> questions [ $ slot -> questionid ] -> length == 0 ) { $ slot -> displayednumber = get_string ( 'infoshort' , 'quiz' ) ; } else { $ slot -> displayednumber = $ number ; $ number += 1 ; } } }
Number the questions.
Number the questions .