Fix issues with viewid = 0 (no page submitted)

Submitting 'no page' is possible when assignment requires more than one
item (e.g. mahara page and a file), but this causing the issues with some
actions that are trying to lock/unlock page with id = 0 (no page submitted)
on the remote mahara site. The patch is fixing misbehaviour.