Refactor mahara plugin classes

... in order to silence all the E_ALL notices

Change-Id: I0fdc9fc68ae7ffd2fa2dffe68dfbd79ee9599c06