Repository: oppia/oppia

Issue:
Profile page doesn't sort the explorations correctly
It can be seen here that the user edited explorations are programmed to get sorted according to ratings and number of views
https://github.com/oppia/oppia/blob/3e915890d34ec0990ec8544bf6f4d74bf040fa26/core/templates/pages/profile-page/profile-page.component.ts#L80-L97

But going to a profile (for ex -> https://www.oppia.org/profile/sean) we can see that the explorations are not sorted.

NOTE -> I'll be fixing this in my next PR.
Profile page doesn't sort the explorations correctly
It can be seen here that the user edited explorations are programmed to get sorted according to ratings and number of views
https://github.com/oppia/oppia/blob/3e915890d34ec0990ec8544bf6f4d74bf040fa26/core/templates/pages/profile-page/profile-page.component.ts#L80-L97

But going to a profile (for ex -> https://www.oppia.org/profile/sean) we can see that the explorations are not sorted.

NOTE -> I'll be fixing this in my next PR.


Discussion:

Resolving patch:
diff --git a/core/controllers/profile.py b/core/controllers/profile.py
--- a/core/controllers/profile.py
+++ b/core/controllers/profile.py
@@ -89,7 +89,7 @@ def get(self, username):
 
         self.values.update({
             'profile_is_of_current_user': profile_is_of_current_user,
-            'profile_username': user_settings.username,
+            'username_of_viewed_profile': user_settings.username,
             'user_bio': user_settings.user_bio,
             'subject_interests': user_settings.subject_interests,
             'first_contribution_msec': (
diff --git a/core/controllers/topics_and_skills_dashboard.py b/core/controllers/topics_and_skills_dashboard.py
--- a/core/controllers/topics_and_skills_dashboard.py
+++ b/core/controllers/topics_and_skills_dashboard.py
@@ -126,16 +126,12 @@ def get(self):
                     skills_list.append(skill_dict)
                 categorized_skills_dict[topic.name][
                     subtopic.title] = skills_list
-        categorized_skills_dict['untriaged_skills'] = []
+
         for skill_summary_dict in skill_summary_dicts:
             skill_id = skill_summary_dict['id']
             if (skill_id not in skill_ids_assigned_to_some_topic) and (
                     skill_id not in merged_skill_ids):
                 untriaged_skill_summary_dicts.append(skill_summary_dict)
-                categorized_skills_dict['untriaged_skills'].append({
-                    'skill_id': skill_id,
-                    'skill_description': skill_summary_dict['description']
-                })
             if (skill_id in skill_ids_assigned_to_some_topic) and (
                     skill_id not in merged_skill_ids):
                 mergeable_skill_summary_dicts.append(skill_summary_dict)


Test patch:
diff --git a/core/controllers/topics_and_skills_dashboard_test.py b/core/controllers/topics_and_skills_dashboard_test.py
--- a/core/controllers/topics_and_skills_dashboard_test.py
+++ b/core/controllers/topics_and_skills_dashboard_test.py
@@ -104,7 +104,7 @@ def test_get(self):
             if skill_dict['description'] == 'Description 3':
                 self.assertEqual(skill_dict['id'], self.linked_skill_id)
         self.assertEqual(
-            len(json_response['categorized_skills_dict']), 2)
+            len(json_response['categorized_skills_dict']), 1)
         self.assertEqual(
             json_response['untriaged_skill_summary_dicts'][0]['id'],
             skill_id)