Skip to content

Commit

Permalink
Revert "Fix #229"
Browse files Browse the repository at this point in the history
This reverts commit ec2b44d.
  • Loading branch information
ndunand committed Nov 19, 2024
1 parent f02053e commit b6c7f1d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -851,14 +851,12 @@ function choicegroup_get_choicegroup($choicegroupid) {
$grpfilter = "AND grp_o.groupid = :groupid";
}

$castorderby = ($sortcolumn == 'name') ? $DB->sql_cast_char2int("REGEXP_SUBSTR($sortcolumn, '[0-9]+')") . "," : "";

$sql = "SELECT grp_m.id grpmemberid, grp_m.userid, grp_o.id, grp_o.groupid, grp_o.maxanswers
FROM {groups} grp
INNER JOIN {choicegroup_options} grp_o on grp.id = grp_o.groupid
LEFT JOIN {groups_members} grp_m on grp_m.groupid = grp_o.groupid
WHERE grp_o.choicegroupid = :choicegroupid $grpfilter
ORDER BY $castorderby $sortcolumn ASC";
ORDER BY $sortcolumn ASC";

$rs = $DB->get_recordset_sql($sql, $params);

Expand Down

0 comments on commit b6c7f1d

Please sign in to comment.