Skip to content

Commit

Permalink
Merge pull request #115 from ts-tech-repo/origin/open-release/quince.…
Browse files Browse the repository at this point in the history
…updated_peer_profile_changes

Handled designation and company
  • Loading branch information
Chandana3008 authored Dec 3, 2024
2 parents 41a72d2 + 7fc5f30 commit 1c7d274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/djangoapps/student/views/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,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')
)

Expand All @@ -1687,7 +1687,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
})

Expand Down
2 changes: 1 addition & 1 deletion lms/templates/peerProfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h5>Build Connections Beyond Boundaries</h5>
<div class="ed-section mt-3">
<p style="height:50px;color: rgba(0,0,0,0.5);font-size: 17px; overflow: hidden;display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;" id="level_of_education">{{ profile.designation }}, {{ profile.company }}</p>
-webkit-box-orient: vertical;" id="level_of_education">{{ profile.designation }} {% if profile.designation and profile.company %},{% endif %} {{ profile.company }}</p>
</p>
<p id="bio" style="display: none;">{{ profile.bio }}</p>
<div id="social-links" style="display: none;">
Expand Down

0 comments on commit 1c7d274

Please sign in to comment.