^good explanation,
God speaks in the present,past and future tenses, all being equal given that he is God.
also, there are the "seven letters" in which the qur'an was revealed, one of the letters is that all verb tenses are interchangeable, the past, present , future and order could substitute one another.
note in Arabic verbs also have an 'order' tense, so if one reads the letters comprising "Ya'llam" in this verse, it could be read as:
Ya'lam: he knows, present.
Yu'allim: he teaches, present.
Yu'lim: he informs, present,
and so on and so forth.
note there are two ways in which the "seven letters" are interpreted, one is that there are seven Arabic dialects that the qur'an could be read in, which is probably the most correct interpretation, the second one is very hard to explain to someone who is not a native speaker so 'll forgo it, note that I used the second one, which is still valid.
there is another construct called "the seven readings", these are different ways in which different mams of the past read the qur'an, the scholars have agreed that a "reading" is correct when:
it is possible to interpret the verses in that way, in either writing or meaning, ie. if the meaning is plausible in Arabic or if the meaning could be reached from the way the letters are arranged since in earlier Arabic script many vowels were not written,
and that the "sanad" or chain of narration stretching form the Prophet to the Imam reading in such a way is correct and sound.
for more, note that the link is in arabic