POST request

def POST_AUTH(self, courseid):  # pylint: disable=arguments-differ
        """ POST request """
        course, __ = self.get_course_and_check_rights(courseid)

        if course.is_lti():
            raise web.notfound()

        error = False
        try:
            if self.user_manager.has_admin_rights_on_course(course):
                data = web.input()
                if 'classroom' in data:
                    default = True if self.database.aggregations.find_one({"courseid": courseid, "default": True}) is None else False
                    self.database.aggregations.insert({"default": default, "courseid": courseid, "students": [],
                                                     "tutors": [], "groups": [],
                                                     "description": data['classroom']})
                    msg = _("New classroom created.")
                elif 'default' in data:
                    self.database.aggregations.find_one_and_update({"courseid": courseid, "default": True},
                                                                 {"$set": {"default": False}})
                    self.database.aggregations.find_one_and_update({"_id": ObjectId(data['default'])},
                                                                 {"$set": {"default": True}})
                    msg = _("Default classroom changed.")
                else:  # default, but with no classroom detected
                    msg = _("Invalid classroom selected.")
            else:
                msg = _("You have no rights to add/change classrooms")
                error = True
        except:
            msg = _('User returned an invalid form.')
            error = True

        return self.page(course, msg, error)