public function edit_default_completion($form, $modules) {
        ob_start();
        $form->display();
        $formhtml = ob_get_contents();
        ob_end_clean();

        $data = (object)[
            'form' => $formhtml,
            'modules' => array_values($modules),
            'modulescount' => count($modules),
        ];
        return parent::render_from_template('core_course/editdefaultcompletion', $data);
    }
public function edit_default_completion($form, $modules) {
        ob_start();
        $form->display();
        $formhtml = ob_get_contents();
        ob_end_clean();

        $data = (object)[
            'form' => $formhtml,
            'modules' => array_values($modules),
            'modulescount' => count($modules),
        ];
        return parent::render_from_template('core_course/editdefaultcompletion', $data);
    }
public function edit_default_completion ( $ form , $ modules ) { ob_start ( ) ; $ form -> display ( ) ; $ formhtml = ob_get_contents ( ) ; ob_end_clean ( ) ; $ data = ( object ) [ 'form' => $ formhtml , 'modules' => array_values ( $ modules ) , 'modulescount' => count ( $ modules ) , ] ; return parent :: render_from_template ( 'core_course/editdefaultcompletion' , $ data ) ; }
Renders the form for editing default completion

@param moodleform $form
@param array $modules
@return string
Renders the form for editing default completion