lsuits/moodle — pull request #8 by rlorenzo (2013-08-27 00:54:36+00:00)
Title: Upgrade stuck at 2013052800

When upgrading I would always just stuck with an error message saying "Cannot downgrade graderreport_grader from 2013052800 to 2013052800". See attached image.

The reason why the upgrade would always get stuck is that upgrade_plugin_savepoint() gets called twice with trying to save version 2013052800.

A simple fix would have been to change one of the 2013052800 references in the upgrade.php code to another number, like 2013052801.

But in this commit I also reformatted upgrade code to follow standard Moodle coding conventions. I also added additional code comments about what is happened in each upgrade step.

![screen shot 2013-08-23 at 5 30 38 pm](https://f.cloud.github.com/assets/349765/1030333/b0cd1256-0eb2-11e3-90cf-1637e31c5576.png)