layout database not updating

Added by S. McKay over 6 years ago

I came across a rather strange problem when processing an exam recently. After snooping around in layout.sqlite I figured out what happened. This is what I did, and the result.

1. I updated the document, then did Layout detection.

2. A collegue decided he wanted to change one problem. I removed that problem and included another one with a different name. I then updated and layout detected again.

I didn't realize until I started processing the exam, that layout_question was not updated when I redid layout detection. The name of the old question was still present, and the name of the new question was not there. So even though the gui warns you that the layout information will be lost (when you update the exam), and even though it tells you there is no layout information, the old information can persist.

Has anyone else seen this? At this point it seems to me that when update is clicked, if the databases exist, then it is better to delete them and have them recreated in the next step. I don't know if this creates other problems, but it would prevent problems like this.

Of course, there may be other ways to fix this problem, but this is the easiest I can think of.

Replies (1)

RE: layout database not updating - Added by Alexis Bienvenüe over 6 years ago

Good diagnosis: The AMC::DataModule::layout::clear_all clears all the tables but question. I corrected this bug in hg:917ce8f9662a. Thank you!