From 7fc5f30b4052cd402503f8524a62ded49aec5f5c Mon Sep 17 00:00:00 2001 From: manojp3 <150236045+manojp3@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:47:49 +0530 Subject: [PATCH] Handled designation and company --- common/djangoapps/student/views/management.py | 4 ++-- lms/templates/peerProfile.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 847720102a40..0639a4d39a7c 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -1667,7 +1667,7 @@ def extras_get_peer_profiles(request): .exclude(user__id__in=user_ids_with_roles) .select_related('user') .prefetch_related(Prefetch('social_links')) - .only('id', 'bio', 'level_of_education', 'profile_image_uploaded_at', + .only('id', 'bio', 'level_of_education', 'company', 'designation', 'profile_image_uploaded_at', 'user__id', 'user__username', 'user__email', 'user__first_name', 'user__last_name', 'user__is_staff', 'user__is_superuser') ) @@ -1682,7 +1682,7 @@ def extras_get_peer_profiles(request): profiles.append({ "user_id": profile.user.id, "username": profile.user.username, "email": profile.user.email, "first_name": profile.user.first_name, "last_name": profile.user.last_name,"is_superuser" : profile.user.is_superuser, "is_staff": profile.user.is_staff, "level_of_education": level_of_education.get(profile.level_of_education, ""), - "bio": profile.bio, "social_links": [{'platform': link.platform, 'url': link.social_link} for link in profile.social_links.all()], + "company": profile.company, "designation": profile.designation, "bio": profile.bio, "social_links": [{'platform': link.platform, 'url': link.social_link} for link in profile.social_links.all()], "has_profile_image": has_image, "profile_image_urls": profile_image_urls }) diff --git a/lms/templates/peerProfile.html b/lms/templates/peerProfile.html index 63f1b25f8904..d016ca176528 100644 --- a/lms/templates/peerProfile.html +++ b/lms/templates/peerProfile.html @@ -195,7 +195,7 @@