Apexal / late

A web app for RPI students to manage their course load.
https://www.late.work
MIT License
54 stars 19 forks source link

Suggest Course Links #593

Closed Apexal closed 4 years ago

Apexal commented 4 years ago

I am exploring MongoDB aggregations and turns out its exactly what we need for crowd-sourcing data.

We can use this aggregation to get all links for each (or a single) course:

[
  {
    '$match': {}
  }, {
    '$unwind': {
      'path': '$links', 
      'preserveNullAndEmptyArrays': false
    }
  }, {
    '$group': {
      '_id': '$summary', 
      'links': {
        '$addToSet': '$links'
      }
    }
  }
]

We can use this to suggest links for users when they add their courses.

Apexal commented 4 years ago

Out of LATE's scope.