public function html() {
        global $OUTPUT;

        $text = new text_attribute($this->insertname, "0", 'bulk');
        $context = (object) [
            'label' => get_string('bulklegend', 'gradereport_singleview'),
            'applylabel' => get_string('bulkperform', 'gradereport_singleview'),
            'applyname' => $this->applyname,
            'menuname' => $this->selectname,
            'menulabel' => get_string('bulkappliesto', 'gradereport_singleview'),
            'menuoptions' => [
                ['value' => 'all', 'name' => get_string('all_grades', 'gradereport_singleview')],
                ['value' => 'blanks', 'name' => get_string('blanks', 'gradereport_singleview'), 'selected' => true],
            ],
            'valuename' => $this->insertname,
            'valuelabel' => get_string('bulkinsertvalue', 'gradereport_singleview'),
            'valuefield' => $text->html()
        ];

        return $OUTPUT->render_from_template('gradereport_singleview/bulk_insert', $context);
    }
public function html() {
        global $OUTPUT;

        $text = new text_attribute($this->insertname, "0", 'bulk');
        $context = (object) [
            'label' => get_string('bulklegend', 'gradereport_singleview'),
            'applylabel' => get_string('bulkperform', 'gradereport_singleview'),
            'applyname' => $this->applyname,
            'menuname' => $this->selectname,
            'menulabel' => get_string('bulkappliesto', 'gradereport_singleview'),
            'menuoptions' => [
                ['value' => 'all', 'name' => get_string('all_grades', 'gradereport_singleview')],
                ['value' => 'blanks', 'name' => get_string('blanks', 'gradereport_singleview'), 'selected' => true],
            ],
            'valuename' => $this->insertname,
            'valuelabel' => get_string('bulkinsertvalue', 'gradereport_singleview'),
            'valuefield' => $text->html()
        ];

        return $OUTPUT->render_from_template('gradereport_singleview/bulk_insert', $context);
    }
public function html ( ) { global $ OUTPUT ; $ text = new text_attribute ( $ this -> insertname , "0" , 'bulk' ) ; $ context = ( object ) [ 'label' => get_string ( 'bulklegend' , 'gradereport_singleview' ) , 'applylabel' => get_string ( 'bulkperform' , 'gradereport_singleview' ) , 'applyname' => $ this -> applyname , 'menuname' => $ this -> selectname , 'menulabel' => get_string ( 'bulkappliesto' , 'gradereport_singleview' ) , 'menuoptions' => [ [ 'value' => 'all' , 'name' => get_string ( 'all_grades' , 'gradereport_singleview' ) ] , [ 'value' => 'blanks' , 'name' => get_string ( 'blanks' , 'gradereport_singleview' ) , 'selected' => true ] , ] , 'valuename' => $ this -> insertname , 'valuelabel' => get_string ( 'bulkinsertvalue' , 'gradereport_singleview' ) , 'valuefield' => $ text -> html ( ) ] ; return $ OUTPUT -> render_from_template ( 'gradereport_singleview/bulk_insert' , $ context ) ; }
Generate the html for this form element.

@return string HTML
Generate the html for this form element .