Why do I get "invalid JSON string" every time I upload a file for an assignment or other on Moodle?
Try theses steps in this order:
1) Refresh the page – it is possible AJAX just didn’t load when the page loaded.
2) Log out of Moodle and back in – this may cause AJAX to load in the browser instance
3) Close the browser and re-open it
4) Try another browser (I.E. 9.0 is a browser known to have these issues)
Each of these is aimed at getting AJAX to load without errors, and therefore fixing the issue.