Skip to content

Commit

Permalink
Merge branch 'MDL-68635' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 6, 2021
2 parents f72cc98 + 7107649 commit 68a6915
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ protected function get_sql_and_params($count = false) {
FROM {tool_cohortroles} uca
JOIN {user} u ON u.id = uca.userid
JOIN {cohort} c ON c.id = uca.cohortid";
$params = array();

// Check if any additional filtering is required.
[$sqlwhere, $params] = $this->get_sql_where();
if ($sqlwhere) {
$sql .= " WHERE {$sqlwhere}";
}

// Add order by if needed.
if (!$count && $sqlsort = $this->get_sql_sort()) {
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/cohortroles/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@

$title = get_string('existingcohortroles', 'tool_cohortroles');
echo $output->heading($title);
$url = new moodle_url('/admin/tool/cohortroles/index.php');
$table = new tool_cohortroles\output\cohort_role_assignments_table(uniqid(), $url);

$table = new tool_cohortroles\output\cohort_role_assignments_table('cohort-role-assignments', $pageurl);
echo $table->out(50, true);

echo $output->spacer();
Expand Down

0 comments on commit 68a6915

Please sign in to comment.