Sums Of Quadratic Functions With Two Discriminants And Farkas' Identities With Quartic Characters