code: def get_course_registered_users(self, course, with_admins=True):
          
  
          l = [entry['students'] for entry in list(self._database.aggregations.aggregate([
              {"$match": {"courseid": course.get_id()}},
              {"$unwind": "$students"},
              {"$project": {"_id": 0, "students": 1}}
          ]))]
          if with_admins:
              return list(set(l + course.get_staff()))
          else:
              return l
docs: Get all the users registered to a course
          :param course: a Course object
          :param with_admins: include admins?
          :return: a list of usernames that are registered to the course