Fixing warnings when user has no views

See https://github.com/catalyst/moodle-assignsubmission-mahara/issues/12