def get_record_status(recid):
    """
    Returns the current status of the record, i.e. current restriction to apply for newly submitted
    comments, and current commenting round.

    The restriction to apply can be found in the record metadata, in
    field(s) defined by config CFG_WEBCOMMENT_RESTRICTION_DATAFIELD. The restriction is empty string ""
    in cases where the restriction has not explicitely been set, even
    if the record itself is restricted.

    :param recid: the record id
    :type recid: int
    :return tuple(restriction, round_name), where 'restriction' is empty string when no restriction applies
    :rtype (string, int)
    """
    collections_with_rounds = CFG_WEBCOMMENT_ROUND_DATAFIELD.keys()
    commenting_round = ""
    for collection in collections_with_rounds:
        # Find the first collection defines rounds field for this
        # record
        if recid in get_collection_reclist(collection):
            commenting_rounds = get_fieldvalues(
                recid,
                CFG_WEBCOMMENT_ROUND_DATAFIELD.get(
                    collection,
                    ""))
            if commenting_rounds:
                commenting_round = commenting_rounds[0]
            break

    collections_with_restrictions = CFG_WEBCOMMENT_RESTRICTION_DATAFIELD.keys()
    restriction = ""
    for collection in collections_with_restrictions:
        # Find the first collection that defines restriction field for
        # this record
        if recid in get_collection_reclist(collection):
            restrictions = get_fieldvalues(
                recid,
                CFG_WEBCOMMENT_RESTRICTION_DATAFIELD.get(
                    collection,
                    ""))
            if restrictions:
                restriction = restrictions[0]
            break

    return (restriction, commenting_round)
Returns the current status of the record, i.e. current restriction to apply for newly submitted
    comments, and current commenting round.

    The restriction to apply can be found in the record metadata, in
    field(s) defined by config CFG_WEBCOMMENT_RESTRICTION_DATAFIELD. The restriction is empty string ""
    in cases where the restriction has not explicitely been set, even
    if the record itself is restricted.

    :param recid: the record id
    :type recid: int
    :return tuple(restriction, round_name), where 'restriction' is empty string when no restriction applies
    :rtype (string, int)