using manage capability Forbid to prevent activity creation & edit

using manage capability Forbid to prevent activity creation & edit

by Joseph Rézeau -
Number of replies: 4
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi,

I've just tested the manage capability with some activity modules (in moodle 2.0).

Choice, Feedback and Survey do not have a manage capability.

Quiz and Lesson have one (and so has the new version of Questionnaire in HEAD)

Well, even with a user's manage capability set to Forbid, it is possible for a user to create and update an instance of Quiz, to create a Lesson (but with error message) and Questionnaire activities. Does this mean that the manage capability does not include the capabilities to create and update such activities? And further, what exactly does forbidding a manage capability prevent a user from doing (in those modules)?

In Quiz, "manage forbidden" allows a user to create and update a quiz, but not to put questions in it.

In Lesson, "manage forbidden" allows a user to create a new lesson, but upon completion, displays a Navigation: first page not found error message! "manage forbidden" does not allow user to update a lesson.

Question: is there any way to use the Forbid setting of the manage capability to prevent creation and editing of all activities which have this capability available? At least, could there be some consistent common behavior of that setting for all moodle activities???

Joseph

Average of ratings: -
In reply to Joseph Rézeau

Re: using manage capability Forbid to prevent activity creation & edit

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Creating an activity and changing its settings is capability moodle/course:manageactivites, or something like that.

mod/quiz:manage is for managing which questions are in the quiz, how many points each one is worth, and so on.
In reply to Tim Hunt

Re: using manage capability Forbid to prevent activity creation & edit

by John Isner -
The only way to know what it does is read the code.

By the way, here's what the documentation says

Capabilities/mod/quiz:manage

  • This allows a user to manage quizzes


In reply to John Isner

Re: using manage capability Forbid to prevent activity creation & edit

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Right, or I have just explained a bit more fully here, so now someone could improve that documentation.
In reply to Tim Hunt

Re: using manage capability Forbid to prevent activity creation & edit

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Tim > Creating an activity and changing its settings is capability moodle/course:manageactivites

Yes, I have now understood that much. So there is only a "global" manageactivities capability for allowing/forbidding the creation and updating of all activities. It is not possible to set this capability individually for each activity, contrary to what I originally thought. Too bad, although it may not be needed.

Joseph