protected function make_new_subq_stat_for($displaynumber, $slot, $subqid, $variant = null) {
        $slotstat = fullclone($this->for_subq($subqid, $variant));
        $slotstat->question->number = $this->for_slot($slot)->question->number;
        $slotstat->subqdisplayorder = $displaynumber;
        return $slotstat;
    }
protected function make_new_subq_stat_for($displaynumber, $slot, $subqid, $variant = null) {
        $slotstat = fullclone($this->for_subq($subqid, $variant));
        $slotstat->question->number = $this->for_slot($slot)->question->number;
        $slotstat->subqdisplayorder = $displaynumber;
        return $slotstat;
    }
protected function make_new_subq_stat_for ( $ displaynumber , $ slot , $ subqid , $ variant = null ) { $ slotstat = fullclone ( $ this -> for_subq ( $ subqid , $ variant ) ) ; $ slotstat -> question -> number = $ this -> for_slot ( $ slot ) -> question -> number ; $ slotstat -> subqdisplayorder = $ displaynumber ; return $ slotstat ; }
We need a new object for display. Sub-question stats can appear more than once in different slots.
So we create a clone of the object and then we can set properties on the object that are per slot.

@param int  $displaynumber                   The display number for this sub question.
@param int  $slot                            The slot number.
@param int  $subqid                          The sub question id.
@param null|int $variant                     The variant no.
@return calculated_for_subquestion           The object for display.
We need a new object for display . Sub - question stats can appear more than once in different slots . So we create a clone of the object and then we can set properties on the object that are per slot .