From 88dda743cf25617100d6f4254688bfce9043f407 Mon Sep 17 00:00:00 2001 From: ikawhero Date: Thu, 25 Jan 2007 05:23:56 +0000 Subject: [PATCH] Using new function to print out custom categories and fields. This shouldn't interfere with skodaks work on splitting the user edit form. --- user/edit_form.php | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/user/edit_form.php b/user/edit_form.php index 4c4591ab48..5e27db44b9 100644 --- a/user/edit_form.php +++ b/user/edit_form.php @@ -318,26 +318,10 @@ class user_edit_form extends moodleform { } $mform->hardFreeze($freezefields); - /// Next the customisable categories - if ($categories = get_records_select('user_info_category', '', 'sortorder ASC')) { - foreach ($categories as $category) { - if ($fields = get_records_select('user_info_field', "categoryid=$category->id", 'sortorder ASC')) { - - $mform->addElement('header', 'category_'.$category->id, $category->name); - - foreach ($fields as $field) { - - require_once($CFG->dirroot.'/user/profile/field/'.$field->datatype.'/field.class.php'); - $newfield = 'profile_field_'.$field->datatype; - $formfield = new $newfield($field->id,$user->id); - $formfield->display_field($mform); - unset($formfield); - - } - } /// End of $fields if - } /// End of $categories foreach - } /// End of $categories if + /// Next the customisable profile fields + profile_print_custom_fields($mform, $user->id); + $this->add_action_buttons(false, get_string('updatemyprofile')); } /// End of function -- 2.39.5