MDL-75423 gradereport_singleview: Add back bulk insert menu.

This menu will be used in edit mode. So rather than removing
it, we make it hidden.
This commit is contained in:
Ilya Tregubov 2022-10-26 09:12:38 +03:00 committed by Mihail Geshoski
parent fba91abe5e
commit 102e39d26d

View File

@ -28,6 +28,7 @@ use html_table;
use html_writer;
use stdClass;
use grade_grade;
use gradereport_singleview\local\ui\bulk_insert;
defined('MOODLE_INTERNAL') || die;
@ -208,13 +209,26 @@ abstract class tablelike extends screen {
['type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()]);
$html = html_writer::tag('form',
html_writer::table($table) . $buttons . $sessionvalidation,
html_writer::table($table) . $this->bulk_insert() . $buttons . $sessionvalidation,
['method' => 'POST']
);
return $html;
}
/**
* Get the HTML for the bulk insert form
*
* @return string
*/
public function bulk_insert() {
return html_writer::tag(
'div',
(new bulk_insert($this->item))->html(),
['class' => 'singleview_bulk', 'hidden' => true]
);
}
/**
* Get the buttons for saving changes.
*