Realizing that 1.9 is no longer being fixed, there is a problem with scheduled backups (cron) failing to include certain question categories, and hence their associated questions, that have a quiz course-module context, rather than just a course context.
We are planning our migration for Fall 2013, and so we have to get through one more semester on the 1.9 code base. If there are other institutions still using the 1.9 code, I thought they might need to know.
Is there an appropriate place to publish a fix? Seems pointless to put in tracker. A git patch in the forum post?
Detail of the problem is that when run as part of a scheduled backup, the $instances argument in the call to question_insert_c_and_q_ids_for_module() [question/backuplib.php] is null. This is the routine that preps the mdl_backup_ids table with the key values of entities that will be included in the backup file.
To correct the problem, the last part of the SQL WHERE clause ( AND cm.instance IN ... ) needs to be conditional on whether $instances is empty, rather than the entire assignment of $cmcontexts being based on that condition.