Git commits in Moodle 2.2.0 by Gerwood Stewart

commit 2388e7ca7d9e63dde9a7780e3e8db581e2263240
Author: Gerwood Stewart <gerwood@gmail.com>
Date:   Mon, 16 May 2011 09:57:33 +0800
Tag:    v2.2.0-beta

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.