mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-32126 replaced _order with sortorder to make sorting work in oracle
This commit is contained in:
parent
af75421c54
commit
0a498686c0
@ -3548,7 +3548,7 @@ function data_get_advanced_search_sql($sort, $data, $recordids, $selectdata, $so
|
||||
}
|
||||
|
||||
$nestselectsql = 'SELECT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . '
|
||||
AS _order
|
||||
AS sortorder
|
||||
FROM {data_content} c,
|
||||
{data_records} r,
|
||||
{user} u ';
|
||||
|
@ -541,7 +541,7 @@ if ($showactivity) {
|
||||
$sortcontent = $DB->sql_compare_text('c.' . $sortfield->get_sort_field());
|
||||
$sortcontentfull = $sortfield->get_sort_sql($sortcontent);
|
||||
|
||||
$what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . ' AS _order ';
|
||||
$what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . ' AS sortorder ';
|
||||
$count = ' COUNT(DISTINCT c.recordid) ';
|
||||
$tables = '{data_content} c, {data_records} r, {data_content} cs, {user} u ';
|
||||
$where = 'WHERE c.recordid = r.id
|
||||
@ -551,7 +551,7 @@ if ($showactivity) {
|
||||
AND cs.recordid = r.id ';
|
||||
$params['dataid'] = $data->id;
|
||||
$params['sort'] = $sort;
|
||||
$sortorder = ' ORDER BY _order '.$order.' , r.id ASC ';
|
||||
$sortorder = ' ORDER BY sortorder '.$order.' , r.id ASC ';
|
||||
$searchselect = '';
|
||||
|
||||
// If requiredentries is not reached, only show current user's entries
|
||||
|
Loading…
x
Reference in New Issue
Block a user