Locally assigned role in Quiz

Locally assigned role in Quiz

by Heidi Beezley -
Number of replies: 4
Hello,
I was wanting to make a quiz where I locally assigned students as the teacher in the quiz to make the quiz questions. I noticed when I did that it gave them access to all the shared questions for the entire site. So I created a new role called Moderator for our site that had limited permissions such as having moodle/question:view all and moodle/question: use all set to prohibit. But even with those set at prohibit, the student who was made moderator in that quiz still was able to see and use all the questions in the site test bank. Is there any way to set up the role permissions for this new role so that a student would be able to create a quiz and grade it but not be able to access the shared quiz questions for the whole site?

Thank you!
Average of ratings: -
In reply to Heidi Beezley

Re: Locally assigned role in Quiz

by John Isner -
Heidi,
As administrator, create the following three roles:
  • CanAddQuestions, setting moodle/question:add = Allow and leaving all other capabilities Not set

  • CanViewAllQuestions with moodle/question:viewall = Allow and leaving all other capabilities Not set

  • CanManageQuizzes, having mod/quiz:view, mod/quiz:manage, mod/quiz:preview, mod/quiz:grade, mod/quiz:viewreports, and mod/quiz:deleteattempts all = Allow, leaving all other capabilities Not set. Note: these are the same quiz permissions that Teacher has.
Allow anyone with the Teacher roleof to assign all three of the above roles. The easiest (but not the best) way to do this is go to Site administration -> Users -> Permissions -> Define roles -> Allow role assignments tab and put three checkmarks in the Teacher row under each of the above rolenames.

Then, as teacher, create a new quiz inside your course. Go into the quiz "Locally assigned roles" interface and assign all three roles to the student (or students) that you want to be able to create questions and build the quiz.

Now when the selected students click on the quiz, they will see an Edit tab. On the editing quiz page, in the Category dropdown, they will see a new, EMPTY question category. They will be able to add questions to it.

If you want to allow them to use other questions from other contexts, you will need to assign the students additional roles in the course, category, or system context. But with the setup I gave you, they will have complete control over a brand new, initially empty, question context. If you don't know what this means, tell me what you're trying to do and I'll give you some more help.
In reply to John Isner

Re: Locally assigned role in Quiz

by Heidi Beezley -
Thanks for the quick response. I just tried adding those three roles, but it didn't seem to work. The student that I assigned those roles to was able to see the info, results, and preview tabs but didn't get the edit tab.

Also, why would I not want all of those permissions to be integrated into the same role? Why three different? Just curious. I'm not sure I understand role assignments as well as I'd like to.

I really want this to work because I think it would be great to have students moderate a test, but I don't want to compromise our sites test bank and give students access to the test questions their other teachers have created. I tried a few other suggestions along the lines of the suggestion you made, but everything I try still gives them that access.
In reply to Heidi Beezley

Re: Locally assigned role in Quiz

by John Isner -
why would I not want all of those permissions to be integrated into the same role?

Because you will reuse some of them later.

As to why the student did not see the Edit tab, I cannot tell you without more information. Have you removed the old Moderator role from the picture? Are all of the predefined roles roles using the default permissions? Put everything back to the factory settings. Then re-check the setup I gave you. It should work.

If the student can see the Attempt tab, then I suspect that you have not set mod/quiz:preview = Allow in the CanManageQuizzes role. Remember: CanManageQuizzes should have six capabilities with the value Allow.

I did not suggest QuestionCreator (see Helen's post) because it does not address your specific requirements. You said "I was wanting to make a quiz where I locally assigned students as the teacher in the quiz to make the quiz questions."
In reply to Heidi Beezley

Re: Locally assigned role in Quiz

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Heidi,

How about enabling students to create questions by assigning them the role of question creator (see the question creator role documentation for details), then once they have done so, the teacher can use the questions in a quiz. Note that the use of capabilities containing the word "mine" restricts students' capabilities to only the questions that they have created.

Regarding enabling students to grade essay questions in a quiz, I think the easiest way is to assign them the role of non-editing teacher in the quiz module context.