I let a user with 'edit own multichoice' permission under multichoice module, create a mcq.
He could do that ,but after creation there is no 'edit' option shown anywhere.
It showed an 'access denied' error when i tried to do it through the mcq's url (node/366/edit)
-thank you
Comments
Comment #1
nirvanajyothi commentedComment #2
mbutcher commentedI've set this as a bug report, as this does not seem to be the intended behavior.
Comment #3
nirvanajyothi commentedok.
-thank you
Comment #4
nirvanajyothi commentedjust asking,has this been fixed in the present dev version?
-thank you
Comment #5
nirvanajyothi commentedComment #6
mbutcher commentedOkay... I have a long message here.
On 6.x-2.x, I believe I have now fixed the bug. A user will need to have at least 'create quiz', 'create multichoice', and 'edit own multichoice' in order to edit his/her own quiz questions. ('create quiz' is required to view a question outside of a quiz context.)
So two bugs have been fixed:
- The one you document here.
- Another (unreported) bug where accessing questions outside of a quiz creates a mangled-up access denied page (with multiple pages squashed into one). Now, the access denied page is displayed properly.
That's about all I have changed for the 2.x branch.
While looking at your issue, I evaluated the modules' implementations of the access and permissions system. The 2.0 and previous systems used very basic controls that did not quite match the permissions normally used for nodes.
I have now changed several aspects of the permissions system in the 3.x branch. If you are willing to test the 3.x branch, which is actually pretty stable right now, I'd *really* appreciate it.
The following permissions-related things have changed:
* More permissions have been added (edit all quizzes, edit all multichoice, etc.) to bring this module abreast of the standard
node module's permissions.
* All hook_access implementations have been changed in the following ways:
- Big change: Viewing a question has been locked down considerably. In previous versions, the viewing of quiz questions was
not checked by multichoice_access. Under certain conditions, this made it possible for users to view questions without taking
the quiz. Now, users must be able to create quiz questions (e.g. have 'create multichoice') before they can view quiz
questions. THIS COULD RESULT IN BUGS, so this is something that needs testing.
- Detail: The access hooks now use $account instead of assuming $user. This is the recommended practice.
* Modifying a quiz's list of questions now requires that you have access to edit the quiz ('edit own quiz' or 'edit any quiz'.
Before, it required only that you could create a quiz.
So... there are some relatively big changes to the dev version. I recognize that some of this might need to be backed out if it is too stringent for general quiz usage... but I'd rather err on the side of caution since some people use this module for serious academic evaluation.
I will only backport *bugs fixes* to 6.x-2.x, and new permissions aren't really bug fixes (unless you can convince me otherwise). So it is unlikely that these changes will all make it back into the 2.x branch.
Comment #7
nirvanajyothi commentedyup, long message!
the changes being brought in to Quiz seem to be cool.will report after testing.
-thank you
Comment #8
nirvanajyothi commentedIn the 2.x dev version user with 'create multichoice' and 'edit own multichoice' can edit the mcq.
And i guess this is the intended behaviour.So as of now the user need not have 'create quiz' permission to edit the multichoice they submitted and that seems perfect to me.
Comment #9
nirvanajyothi commentedAm trying out the Quiz 3 module.
Upgraded from Quiz 6.x-2.0 to 6.x-3.x-dev (Nov 27)
The Update.php showed no errors.
will be adding more here very soon.