mozilla/openbadger — pull request #182 by brianloveswords (2013-06-03 19:10:30+00:00)
Title: User recommendations, level 1

Right now we are doing the following:

* Filter earned badges
* Filter category-level badges
* Filter offline badges

We store this collection as `allBadges`, then

* Filter participation badges
* Filter badges that belong to categories where the user has already
earned the category-level badge
* Filter badges that are "off-track", meaning, badges in categories
where the user hasn't completed any other badges.

And we store this collection as `filtered`. If `filtered` is an empty
set, we shuffle `allBadges` and recommend that set.

There are a number of ways this can be improved:

* Only recommend age appropriate badges.
* Deal with offline badges: right now we are not recommending them
because getting access to the program start date is annoying, and we
don't want to recommend badges that haven't started yet
* Be smarter about recommending badges that will complete a category
level badge.
* Be smarter about falling back when a filter reduces the recommendation
set to zero items. For example, in the case where a user hasn't earned
any badges yet, we are going to fall back completely to `allBadges`,
but we should probably still filter out participation badges.