Odd behaviour editing questions

Odd behaviour editing questions

by mart van der niet -
Number of replies: 6

(Version 2013111802.03)

I have defined a role that has permissions to edit questions:

Add new questionsmoodle/question:add No
Edit all questionsmoodle/question:editall Yes
Edit your own questionsmoodle/question:editmine Yes
Flag questions while attempting themmoodle/question:flag Yes
Edit question categoriesmoodle/question:managecategory No
Move all questionsmoodle/question:moveall No
Move your own questionsmoodle/question:movemine Yes
Use all questionsmoodle/question:useall Yes
Use your own questionsmoodle/question:usemine Yes
View all questionsmoodle/question:viewall Yes
View your own questionsmoodle/question:viewmine Yes

 

 

The role is defined at system level (and on user,course, category).

A user has this role in a course.

He can see the questionbank (questions/export)

He can open a question for editing

He can save the question, and after the save the changed content is visible on his screen.

However, the "Last saved " timestamp is not updated, and the changes are not stored.

Debugging shows no messages.

 

What am I missing here??????

Average of ratings: -
In reply to mart van der niet

Re: Odd behaviour editing questions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Mart, that version number is not enough in it's own. we also need something like 2.5.4+

Also, given the symptoms you describe, can you tell us how you have got caching set up (particularly of question definitions). Does doing 'Purge all caches' fix things.

Are you able to look at the data in the database (particularly the mdl_quetion table) and see if it changes when the editing form is saved.

In reply to Tim Hunt

Re: Odd behaviour editing questions

by mart van der niet -

Tim,

 

Thanks for your reply.

Version info:  Moodle 2.6.2+ (Build: 20140327)

 

The changes are not saved to the db (tables mdl_question & mdl_question_answers). I'm not aware of anything I have setup re. caching.

When removing the profile I described, and adding the Teacher profile, changes are saved into the db.

In reply to mart van der niet

Re: Odd behaviour editing questions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I am baffled. I would expect it to either save the data, or generate an error message. I can't see how it can silently do nothing.

Aha! a bit of debugging let me work out what is going wrong: MDL-44894. Can I now work out the fix?

Thank you for spotting the problem.

In reply to Tim Hunt

Re: Odd behaviour editing questions

by mart van der niet -

Hi Tim,

Thanks for the reply. Yes, you can fix it now smile

What would you advise as a workaround (giving full Teacher is not my favourite...)?

Rgds, Mart van der Niet

In reply to mart van der niet

Re: Odd behaviour editing questions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I think the simplest and safest option is to give the role you created moodle/question:add capability as well as the others you listed.

If you don't want them to create new questions, then just ask them nicely not to, then point out that Moodle tracks who created each question, so if they ignore your request, you will be able to find out, and beat them with a big stick wink

In reply to Tim Hunt

Re: Odd behaviour editing questions

by mart van der niet -

Thanks, works like a charm, and I'm allways friendly but also carry a very big stick!