diff --git a/classes/post/post.php b/classes/post/post.php index efe83276e6..e9e2fa2f18 100644 --- a/classes/post/post.php +++ b/classes/post/post.php @@ -392,7 +392,8 @@ public function moodleoverflow_edit_post($time, $postmessage, $messageformat, $f } /** - * // TODO: RETHINK THIS FUNCTION. + * // NOTE: This function replaces the get_post_full() function and is not used until the print and print-related function for + * // printing the discussion and a post are adapted to the new post and discussion class. * Gets a post with all info ready for moodleoverflow_print_post. * Most of these joins are just to get the forum id. * diff --git a/locallib.php b/locallib.php index 80693d9eb4..c70935b1a2 100644 --- a/locallib.php +++ b/locallib.php @@ -655,7 +655,7 @@ function moodleoverflow_get_post_full($postid) { if ($CFG->branch >= 311) { $allnames = \core_user\fields::for_name()->get_sql('u', false, '', '', false)->selects; } else { - $allnames = get_all_user_name_fields(true, 'u'); + $allnames = implode(', ', fields::get_name_fields()); } $sql = "SELECT p.*, d.moodleoverflow, $allnames, u.email, u.picture, u.imagealt FROM {moodleoverflow_posts} p