mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Fixed typo that was affecting the reordering of custom profile fields.
MDL-13909.
This commit is contained in:
parent
c7a7112781
commit
258db59a44
@ -185,12 +185,12 @@ class profile_define_base {
|
||||
*/
|
||||
function profile_reorder_fields() {
|
||||
if ($categories = get_records_select('user_info_category')) {
|
||||
$i = 1;
|
||||
foreach ($categories as $category) {
|
||||
$i = 1;
|
||||
if ($fields = get_records_select('user_info_field', 'categoryid='.$category->id, 'sortorder ASC')) {
|
||||
foreach ($fields as $field) {
|
||||
$f = new object();
|
||||
$f->if = $field->id;
|
||||
$f->id = $field->id;
|
||||
$f->sortorder = $i++;
|
||||
update_record('user_info_field', $f);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user