protected function get_drag_item_repeats() {
        $countimages = 0;
        if (isset($this->question->id)) {
            foreach ($this->question->options->drags as $drag) {
                $countimages = max($countimages, $drag->no);
            }
        }

        if (!$countimages) {
            $countimages = self::START_NUM_ITEMS;
        }
        $itemrepeatsatstart = $countimages;

        $imagerepeats = optional_param('noitems', $itemrepeatsatstart, PARAM_INT);
        $addfields = optional_param('additems', false, PARAM_BOOL);
        if ($addfields) {
            $imagerepeats += self::ADD_NUM_ITEMS;
        }
        return array($itemrepeatsatstart, $imagerepeats);
    }
protected function get_drag_item_repeats() {
        $countimages = 0;
        if (isset($this->question->id)) {
            foreach ($this->question->options->drags as $drag) {
                $countimages = max($countimages, $drag->no);
            }
        }

        if (!$countimages) {
            $countimages = self::START_NUM_ITEMS;
        }
        $itemrepeatsatstart = $countimages;

        $imagerepeats = optional_param('noitems', $itemrepeatsatstart, PARAM_INT);
        $addfields = optional_param('additems', false, PARAM_BOOL);
        if ($addfields) {
            $imagerepeats += self::ADD_NUM_ITEMS;
        }
        return array($itemrepeatsatstart, $imagerepeats);
    }
protected function get_drag_item_repeats ( ) { $ countimages = 0 ; if ( isset ( $ this -> question -> id ) ) { foreach ( $ this -> question -> options -> drags as $ drag ) { $ countimages = max ( $ countimages , $ drag -> no ) ; } } if ( ! $ countimages ) { $ countimages = self :: START_NUM_ITEMS ; } $ itemrepeatsatstart = $ countimages ; $ imagerepeats = optional_param ( 'noitems' , $ itemrepeatsatstart , PARAM_INT ) ; $ addfields = optional_param ( 'additems' , false , PARAM_BOOL ) ; if ( $ addfields ) { $ imagerepeats += self :: ADD_NUM_ITEMS ; } return array ( $ itemrepeatsatstart , $ imagerepeats ) ; }
Returns an array of starting number of repeats, and the total number of repeats.

@return array
Returns an array of starting number of repeats and the total number of repeats .