She prides herself on never having been late to school.

Literal

She [topic-は] never school [target-に] was-late thing exists-not [nominalized-こと] [object-を] is-making-pride.

Two layers of nominalization with こと stack here. The inner core 学校に遅れたことがない ('have never been late to school') uses ~たことがない for 'no past experience of X.' That whole noun phrase is then nominalized again with こと and fed to ~を誇りにする ('to take pride in / make X one's pride'). This kind of double-nesting — ことがない事を誇りにしている — would be cleaner with kana for the second こと (ことを誇りにしている), but the kanji 事 is grammatically valid and slightly more formal-looking. Note 決して's reach: it modifies the negation deep inside the nested clause, producing the strong-negation 'never.'