list($twhere, $tparams) = $table->get_sql_where();
if ($twhere) {
+ $params = array_merge($params, $tparams);
$matchcount = $DB->count_records_sql($countsql.' AND '.$twhere, $params);
} else {
$matchcount = $totalcount;
" GROUP BY userid) l ON (l.userid = ra.userid)";
if ($twhere) {
$sql .= ' WHERE '.$twhere; // Initial bar.
- $params = array_merge($params, $tparams);
}
if ($table->get_sql_sort()) {
if ($twhere) {
$sql .= ' WHERE '.$twhere; // Initial bar.
- $params = array_merge($params, $tparams);
}
if ($table->get_sql_sort()) {