I'm trying to import a database preset which I previously exported from another course, but whenever I click on "Choose" file (next to "Import from zip file") I get an error message: "That's an invalid course id".
I looked at the HTML source code of the page calling the file selection dialog, and obviously the wrong course id is passed to files/index.php (e.g, id=2 instead of 330). In fact, id=2 is hardcoded (!!!) in /moodle/mod/data/preset.php (220.127.116.11, line 330) instead of passing on the current course id
The same bug is in HEAD as well.