mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-75276 mod_data: Re-add ordering to get_field_records
In MDL-75146, the get_fields_record() method was added without any ordering criteria. In MDL-75276, this method is reused to get the fields. We need to re-add the order to guarantee the field are always returned in the same order (and avoid some Oracle ordering failures).
This commit is contained in:
parent
e2d606eba8
commit
9e7cc5103d
@ -244,7 +244,7 @@ class manager {
|
||||
public function get_field_records() {
|
||||
global $DB;
|
||||
if ($this->_fieldrecords === null) {
|
||||
$this->_fieldrecords = $DB->get_records('data_fields', ['dataid' => $this->instance->id]);
|
||||
$this->_fieldrecords = $DB->get_records('data_fields', ['dataid' => $this->instance->id], 'id');
|
||||
}
|
||||
return $this->_fieldrecords;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user