just saw you latest gradual changes about this issue and have found that here:
You've used the same error string "cannotusepage" in THREE places. If you look at this carefully you'll see that the second replacement is incorrect, only admins can use that page (whereas the rest are admins and teachers).
I'd suggesto you to fix this by:
1) Adding some different lang strings like:
(i.e. all them will start by "cannotuse" followed by the list of roles allowed to use the page). Just a example proposal, feel free to improve it.
2) Apply then where necessary.
That way, always you find one error message, you can resuse those langs strings safely in future changes of this gradual task.