error/moodle/nopermissions

From MoodleDocs

This is a general error that indicates the current user account does not have permission to do what you were attempting.

One of the most likely causes is that you are trying to do something as a guest user (somebody who has not yet logged in to Moodle).

This feature is part of the Roles framework introduced in Moodle 1.7. If you believe that your roles for that user DO allow that action you were attempting, then you may have found a bug. Congratulations! Please help us by creating a new issue at http://tracker.moodle.org/browse/MDL and describing what you did in detail.