I realise this is a bit vague but hoping someone might be able to point me in the right direction.
This is the error: Fatal error: Call to undefined function print_row() on line 418
Cause by this line:
**$something = profile_display_fields($css->id);**
In this code:
$customcss = get_records_select('user_info_field', '', 'sortorder ASC');
foreach ($customcss as $css) {
if ($css->name == 'usercss') {
$something = profile_display_fields($css->id);
}
}
Here is line 418:
print_row(s($formfield->field->name.':'), $formfield->display_data());
And here is the whole function:
function profile_display_fields($userid) {
global $CFG, $USER;
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')) {
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, $userid);
if ($formfield->is_visible() and !$formfield->is_empty()) {
print_row(s($formfield->field->name.':'), $formfield->display_data());
}
}
}
}
}
}
print_row()defined? The error is because PHP can't find it.