replace mysql with  queryDB(), and other adjustments to start upgrade for ATutor 2.2