Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile page doesn't sort the explorations correctly #9914

Closed
nishantwrp opened this issue Jul 15, 2020 · 0 comments · Fixed by #9917
Closed

Profile page doesn't sort the explorations correctly #9914

nishantwrp opened this issue Jul 15, 2020 · 0 comments · Fixed by #9917
Assignees

Comments

@nishantwrp
Copy link
Contributor

nishantwrp commented Jul 15, 2020

It can be seen here that the user edited explorations are programmed to get sorted according to ratings and number of views

ctrl.userEditedExplorations = data.edited_exp_summary_dicts.sort(
function(exploration1, exploration2) {
if (exploration1.ratings > exploration2.ratings) {
return 1;
} else if (exploration1.ratings === exploration2.ratings) {
if (exploration1.playthroughs > exploration2.playthroughs) {
return 1;
} else if (
exploration1.playthroughs === exploration2.playthroughs) {
return 0;
} else {
return -1;
}
} else {
return -1;
}
}
);

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.

@nishantwrp nishantwrp self-assigned this Jul 15, 2020
seanlip pushed a commit that referenced this issue Jul 20, 2020
…urn domain objects. (#9917)

* Topics and Skills Dashboard (All checks passing)

* Backend tests

* All other files done (Tests passing)

* Fix issues with merge

* Minor Bug

* reviews

* reviews

* reviews

* reviews

* reviews

* reviews

* Fix issues with merge
shavavo pushed a commit to shavavo/oppia that referenced this issue Aug 20, 2020
…ces to return domain objects. (oppia#9917)

* Topics and Skills Dashboard (All checks passing)

* Backend tests

* All other files done (Tests passing)

* Fix issues with merge

* Minor Bug

* reviews

* reviews

* reviews

* reviews

* reviews

* reviews

* Fix issues with merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant