Git commits in Moodle 2.1.x by Gerwood Stewart

commit 5e876cd379e2d2055aea32d16f7e13bfa94c3577
Author: Gerwood Stewart <gerwood@gmail.com>
Date:   Mon, 16 May 2011 09:57:33 +0800
Tag:    v2.1.3

MDL-27521 Updates the can_finalize and can_unfinalize methods to deal with passing a submission object that isn't one (in this case is a Boolean value). This will result in both methods now returning false. Kick on effect is that it corrects the bug described in MDL-27521 by removing the button if it isn't possible to finalize the submission.