كُتِبَ الدَّرْسُ: past passive «كُتِبَ» is built on fatḥa; «الدَّرْسُ» is nominative passive subject.
يُكْتَبُ الدَّرْسُ: present passive «يُكْتَبُ» is indicative with ḍamma in the absence of a subjunctive or jussive particle; the noun remains nominative.
Voice and mood/iʿrāb are separate properties of a verb.