protected function definition_drop_zones($mform, $imagerepeats) {
        $mform->addElement('header', 'dropzoneheader', get_string('dropzoneheader', 'qtype_'.$this->qtype()));

        $countdropzones = 0;
        if (isset($this->question->id)) {
            foreach ($this->question->options->drops as $drop) {
                $countdropzones = max($countdropzones, $drop->no);
            }
        }

        if (!$countdropzones) {
            $countdropzones = self::START_NUM_ITEMS;
        }
        $dropzonerepeatsatstart = $countdropzones;

        $this->repeat_elements($this->drop_zone($mform, $imagerepeats), $dropzonerepeatsatstart,
                $this->drop_zones_repeated_options(),
                'nodropzone', 'adddropzone', self::ADD_NUM_ITEMS,
                get_string('addmoredropzones', 'qtype_ddimageortext'), true);
    }
protected function definition_drop_zones($mform, $imagerepeats) {
        $mform->addElement('header', 'dropzoneheader', get_string('dropzoneheader', 'qtype_'.$this->qtype()));

        $countdropzones = 0;
        if (isset($this->question->id)) {
            foreach ($this->question->options->drops as $drop) {
                $countdropzones = max($countdropzones, $drop->no);
            }
        }

        if (!$countdropzones) {
            $countdropzones = self::START_NUM_ITEMS;
        }
        $dropzonerepeatsatstart = $countdropzones;

        $this->repeat_elements($this->drop_zone($mform, $imagerepeats), $dropzonerepeatsatstart,
                $this->drop_zones_repeated_options(),
                'nodropzone', 'adddropzone', self::ADD_NUM_ITEMS,
                get_string('addmoredropzones', 'qtype_ddimageortext'), true);
    }
protected function definition_drop_zones ( $ mform , $ imagerepeats ) { $ mform -> addElement ( 'header' , 'dropzoneheader' , get_string ( 'dropzoneheader' , 'qtype_' . $ this -> qtype ( ) ) ) ; $ countdropzones = 0 ; if ( isset ( $ this -> question -> id ) ) { foreach ( $ this -> question -> options -> drops as $ drop ) { $ countdropzones = max ( $ countdropzones , $ drop -> no ) ; } } if ( ! $ countdropzones ) { $ countdropzones = self :: START_NUM_ITEMS ; } $ dropzonerepeatsatstart = $ countdropzones ; $ this -> repeat_elements ( $ this -> drop_zone ( $ mform , $ imagerepeats ) , $ dropzonerepeatsatstart , $ this -> drop_zones_repeated_options ( ) , 'nodropzone' , 'adddropzone' , self :: ADD_NUM_ITEMS , get_string ( 'addmoredropzones' , 'qtype_ddimageortext' ) , true ) ; }
Make and add drop zones to the form.

@param object $mform The Moodle form object.
@param int $imagerepeats The initial number of repeat elements.
Make and add drop zones to the form .