A Generalized Jacobi Theta Function and Quasimodular Forms