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

nirvanajyothi’s picture

Title: 'Edit own multichoice' permission not seen? » 'Edit own multichoice' option not seen?
mbutcher’s picture

Category: support » bug

I've set this as a bug report, as this does not seem to be the intended behavior.

nirvanajyothi’s picture

ok.

-thank you

nirvanajyothi’s picture

just asking,has this been fixed in the present dev version?

-thank you

nirvanajyothi’s picture

Version: 6.x-2.0-rc2 » 6.x-2.0
mbutcher’s picture

Status: Active » Fixed

Okay... 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.

nirvanajyothi’s picture

yup, long message!
the changes being brought in to Quiz seem to be cool.will report after testing.

-thank you

nirvanajyothi’s picture

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.

In 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.

nirvanajyothi’s picture

Am 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.

The following queries were executed
quiz module
Update #6300

    * ALTER TABLE {quiz_node_properties} ADD `aid` VARCHAR(255) DEFAULT NULL
    * ALTER TABLE {quiz_node_properties} CHANGE aid `aid` VARCHAR(255) NOT NULL

will be adding more here very soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.