Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using new function to print out custom categories and fields. This sh…

…ouldn't

interfere with skodaks work on splitting the user edit form.
  • Loading branch information...
commit 88dda743cf25617100d6f4254688bfce9043f407 1 parent 7240a6e
ikawhero authored
Showing with 3 additions and 19 deletions.
  1. +3 −19 user/edit_form.php
View
22 user/edit_form.php
@@ -318,26 +318,10 @@ function definition () {
}
$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
Please sign in to comment.
Something went wrong with that request. Please try again.