(TL;DR Try thinking of the "に" here in the same way you'd think of it in "〜に広がる".)
From デジタル大辞泉:
しゅう‐ち〔シウ‐〕【周知】
[名](スル)世間一般に広く知れ渡っていること。また、広く知らせること。「周知の事実」「周知の通り」「運動の趣旨を社会に周知させる」
This definition is not entirely accurate, as we can and often do specify who we are making something widely known to, rather than it just being 世間一般に widely known.
For example:
「各位の研究室の皆様にも周知するようお願いいたします。」
"Please also let everyone in your respective labs know about (something)."
or
「関係者に周知すべき内容」
"Content that related parties should be informed about"
We can also specify who knows about a certain thing, as opposed to who something is being made known to.
「商標が香港において一般大衆に周知であること.」
"That the trademark is, in Hong Kong, widely known by the populace." (They most likely would be seeing the trademark, not being consciously informed by anyone about it.)
or
「全ての地方政府に周知の事実であるものとする。」
"(We) define (something) as a fact widely known by all local governments"
This is the sense in which 周知 is being used in your sentence.
Let's take it in parts. Writing the first half as an independent sentence, we get:
既に教室でも例のナイフアクションを繰り広げている。
(We) even already displayed/had a knife fight in the classroom as well.
(IMO 例の〜 is very hard to translate into English, but it means something along the lines of "the 〜 we/you've been hearing about")
By making this 連用形, we could be implicating a few things, but based on the context gleaned from your example, the second half of the sentence is acting as the consequence of the first half, so:
既に教室でも例のナイフアクションを繰り広げており、、、
We even already had a knife fight in the classroom as well, and (as a result)...
This result is revealed in the second half of the sentence.
クラスの連中にも俺とXXXとの事は周知の事実となっていた。
・俺とXXXとの事 = The thing between me and XXX
・クラスの連中 = (my) mates in class
・周知の事実 = a commonly/widely known fact
Putting these together we get:
クラスの連中にも周知の事実
(as per my example above) "A fact also widely known by my mates in class".
クラスの連中にも俺とXXXとの事は周知の事実(である)
"The thing between me and XXX (is) a fact also widely known by my mates in class."
However, by using なっていた instead of である, we express that fact that the state of affairs had changed from this not being a 周知の事実 to it in fact being a 周知の事実, as a result of 教室でも例のナイフアクションを繰り広げていること。
Thus, your sentence translates to:
"We even already had a knife fight in the classroom as well, and (as a result) the thing between me and XXX had become a fact also widely known by my mates in class."