Let V be a \(C_2\) -cofinite vertex operator algebra without nonzero elements of negative weights. We prove the conjecture that the spaces spanned by analytic extensions of pseudo-q-traces ( \(q=e^{2\pi i\tau }\) ) shifted by \(-\frac{c}{24}\) of products of geometrically-modified (logarithmic) intertwining operators among grading-restricted generalized V-modules are invariant under modular transformations. The convergence and analytic extension result needed to formulate this conjecture and some consequences on such shifted pseudo-q-traces were proved by Fiordalisi (Logarithmic intertwining operator and genus-one correlation functions, 2015) and Fiordalisi (Commun Contemp Math 18:1650026, 2016) using the method developed in Huang (Commun Contemp Math 7:649–706, 2005). The method that we use to prove this conjecture is based on the theory of the associative algebras \(A^{N}(V)\) for \(N\in \mathbb {N}\) , their graded modules and their bimodules introduced and studied by the author in Huang (Associative algebras and the representation theory of grading-restricted vertex algebras, 2020) and Huang (Commun Math Phys 396:1–44, 2022). This modular invariance result gives a construction of \(C_2\) -cofinite genus-one logarithmic conformal field theories from the corresponding genus-zero logarithmic conformal field theories.