Skip to content

Commit

Permalink
MDL-75423 gradereport_singleview: remove some redundant ui components
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies authored and Mihail Geshoski committed Nov 10, 2022
1 parent 4e15e03 commit 2890172
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
22 changes: 3 additions & 19 deletions grade/report/singleview/classes/local/screen/tablelike.php
Expand Up @@ -28,7 +28,6 @@
use html_writer;
use stdClass;
use grade_grade;
use gradereport_singleview\local\ui\bulk_insert;

defined('MOODLE_INTERNAL') || die;

Expand Down Expand Up @@ -204,31 +203,16 @@ public function html(): string {
$buttonhtml = implode(' ', $this->buttons());

$buttons = html_writer::tag('div', $buttonhtml, $buttonattr);
$selectview = new select($this->courseid, $this->itemid, $this->groupid);

$sessionvalidation = html_writer::empty_tag('input',
['type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()]);

$html = $selectview->html();
$html .= html_writer::tag('form',
$buttons . html_writer::table($table) . $this->bulk_insert() . $buttons . $sessionvalidation,
$html = html_writer::tag('form',
html_writer::table($table) . $buttons . $sessionvalidation,
['method' => 'POST']
);
$html .= $selectview->html();
return $html;
}

/**
* Get the HTML for the bulk insert form
*
* @return string
*/
public function bulk_insert(): string {
return html_writer::tag(
'div',
(new bulk_insert($this->item))->html(),
['class' => 'singleview_bulk']
);
return $html;
}

/**
Expand Down
11 changes: 0 additions & 11 deletions grade/report/singleview/index.php
Expand Up @@ -165,21 +165,10 @@
}
}

if (!is_null($graderleftnav)) {
echo $graderleftnav;
}
if (!is_null($graderrightnav)) {
echo $graderrightnav;
}

if ($report->screen->supports_paging()) {
echo $report->screen->pager();
}

if ($report->screen->display_group_selector()) {
echo $report->group_selector;
}

echo $report->output();

if ($report->screen->supports_paging()) {
Expand Down

0 comments on commit 2890172

Please sign in to comment.