mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-69017 user: Show all links should work for students
This commit is contained in:
parent
71a34a039f
commit
d3bfae8fcc
2 changed files with 39 additions and 31 deletions
|
@ -171,19 +171,17 @@ $participanttable->out($perpage, true);
|
|||
$participanttablehtml = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
if ($bulkoperations) {
|
||||
echo html_writer::start_tag('form', [
|
||||
'action' => 'action_redir.php',
|
||||
'method' => 'post',
|
||||
'id' => 'participantsform',
|
||||
'data-course-id' => $course->id,
|
||||
'data-table-unique-id' => $participanttable->uniqueid,
|
||||
'data-table-default-per-page' => ($perpage < DEFAULT_PAGE_SIZE) ? $perpage : DEFAULT_PAGE_SIZE,
|
||||
]);
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="returnto" value="'.s($PAGE->url->out(false)).'" />';
|
||||
}
|
||||
echo html_writer::start_tag('form', [
|
||||
'action' => 'action_redir.php',
|
||||
'method' => 'post',
|
||||
'id' => 'participantsform',
|
||||
'data-course-id' => $course->id,
|
||||
'data-table-unique-id' => $participanttable->uniqueid,
|
||||
'data-table-default-per-page' => ($perpage < DEFAULT_PAGE_SIZE) ? $perpage : DEFAULT_PAGE_SIZE,
|
||||
]);
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="returnto" value="'.s($PAGE->url->out(false)).'" />';
|
||||
|
||||
echo html_writer::tag(
|
||||
'p',
|
||||
|
@ -229,6 +227,10 @@ echo $OUTPUT->container(html_writer::link(
|
|||
]
|
||||
), [], 'showall');
|
||||
|
||||
$bulkoptions = (object) [
|
||||
'uniqueid' => $participanttable->uniqueid,
|
||||
];
|
||||
|
||||
if ($bulkoperations) {
|
||||
echo '<br /><div class="buttons"><div class="form-inline">';
|
||||
|
||||
|
@ -310,15 +312,12 @@ if ($bulkoperations) {
|
|||
echo '<input type="hidden" name="id" value="' . $course->id . '" />';
|
||||
echo '<div class="d-none" data-region="state-help-icon">' . $OUTPUT->help_icon('publishstate', 'notes') . '</div>';
|
||||
echo '</div></div></div>';
|
||||
echo '</form>';
|
||||
|
||||
$options = (object) [
|
||||
'uniqueid' => $participanttable->uniqueid,
|
||||
'noteStateNames' => note_get_state_names(),
|
||||
];
|
||||
$PAGE->requires->js_call_amd('core_user/participants', 'init', [$options]);
|
||||
$bulkoptions->noteStateNames = note_get_state_names();
|
||||
}
|
||||
echo '</form>';
|
||||
|
||||
$PAGE->requires->js_call_amd('core_user/participants', 'init', [$bulkoptions]);
|
||||
echo '</div>'; // Userlist.
|
||||
|
||||
$enrolrenderer = $PAGE->get_renderer('core_enrol');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue