Casting spells from a staff gives experience to the school of the most expensive part of the enchantment, but only if a target is actually hit with the spell (just like vanilla spells work).
Any scripted effects will not grant experience.
Will most likely behave strangely with mods that manipulate how much experience a spell gives depending on spell cost/level:
Will not work with any mods that replace use based skill leveling with something else, like Oblivion XP or the similar mode from Ultimate Leveling.
If you somehow manage to cast multiple times before the projectile actually hits a target, you will not get XP for all of them.