Keplerian accretion discs around massive black holes (MBHs) are gravitationally unstable beyond a few hundredths of parsec and should collapse to form stars. Indeed an accretion/star formation episode took place a few millions years ago in the Galactic Center (GC). This raises the question of how the disc can survive in AGN and quasars and continue to transport matter towards the black hole. We study the accretion/star formation process, with one aim in mind, to show that a spectrum similar to the observed AGN one can be produced by the disc. We compute models of stationary accretion discs, both continuous and clumpy. Continuous discs must be maintained in a state of marginal stability for the rate of star formation to remain modest, so they require additional heating and transport of angular momentum. Non-viscous heating can be provided by stellar illumination, but momentum transport by supernovae is insufficient to sustain a marginal state, except at the very periphery of the disc. In clumpy discs it is possible to account for the required accretion rate through interactions between clouds, but this model is unsatisfactory as its parameters are tightly constrained without any physical justification. Finally one must appeal to non-stationary discs with intermittent accretion episodes like those that occurred in the GC, but such a model is probably not applicable to luminous high redshift quasars neither to radio-loud quasars.