def _get_score_from_submissions(submissions_scores, block):
    """
    Returns the score values from the submissions API if found.
    """
    if submissions_scores:
        submission_value = submissions_scores.get(str(block.location))
        if submission_value:
            first_attempted = submission_value['created_at']
            weighted_earned = submission_value['points_earned']
            weighted_possible = submission_value['points_possible']
            assert weighted_earned >= 0.0 and weighted_possible > 0.0  # per contract from submissions API
            return (None, None) + (weighted_earned, weighted_possible) + (first_attempted,)