When you are displaying a page that sits within a course, you should pass the $courseid to the require_login call - the approve/decline/delete files all have a required_param that seems to include the courseid, so you should pass that into the require login call:
When you are displaying a page that sits within a course, you should pass the $courseid to the require_login call - the approve/decline/delete files all have a required_param that seems to include the courseid, so you should pass that into the require login call:
eg: