In this example, the gender agreement of the participle of accorder is feminine.
Therefore, you were correct in your example sentence:
Pour comprendre la portée qu’ils ont accordée à cette théorie
Here is why:
You asked about the COD, or complément d’objet direct, which here is the relative pronoun que. This relative pronoun refers to the feminine noun portée. Therefore, in order to make the past participle (accordé) agree, you must make it feminine as well (accordée).
théorie is the COI (complément d’objet indirect). This is marked by the preposition à in à cette théorie. The COI does not affect agreement of gender or number in your sentence.
Leave a comment