original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Renders the form for editing default completion
  
  @param moodleform $form
  @param array $modules
  @return string
docstring_tokens: Renders the form for editing default completion