Can't post a quiz to the front page for logged in users?

Can't post a quiz to the front page for logged in users?

by Doug Funnie -
Number of replies: 4
So I've created a quiz for a placement test which I've put on my homepage.
Now, for some reason when the user is not logged in, the file shows up, but if the user is logged in, the link is not there.
Does anyone know what the problem could be?
Average of ratings: -
In reply to Doug Funnie

Re: Can't post a quiz to the front page for logged in users?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Your issue is with roles.  Slightly surprisingly a "logged in" user has few rights than someone not logged in. 

When you are simply viewing the front page - not logged in - your capabilities (your rights to do things) are governed by the 'Guest' role. This role allows mod/quiz:view capability. You can see quizzes.

However, when you log in, you are now governed by the 'Authenticated user' role. In this role the mod/quiz:view capability is NOT allowed. You cannot see quizzes. 

The simplest solution would be to modify the 'Authenticated user' role and allow that capability. Do consider that once you start tweaking roles you are getting into scenarios that may never have been tested so make sure you check out everything works as you expect. 

In reply to Howard Miller

Re: Can't post a quiz to the front page for logged in users?

by Doug Funnie -
Okay, so I've found the capability. It's located under Authenticated user on frontpage.

It's this here:
Activity: Quiz
Attempt quizzes
mod/quiz: attempt

But I get this warning:
"Users could send spam o site users or others."
Is there a way to deal with this?

Thanks!
In reply to Doug Funnie

Re: Can't post a quiz to the front page for logged in users?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes - ignore the warning. It's simply a reminder to consider this minor risk - that is, does it apply to you on your site for your needs? Probably not.

In reply to Howard Miller

Re: Can't post a quiz to the front page for logged in users?

by Doug Funnie -

Alright. Thanks, buddy.