Setting essay question attachment default

Setting essay question attachment default

by Mike Jackson -
Number of replies: 3

Is there a way to set the default for essay questions on our site to allow uploading of one attachment? At the moment it seems as if the default is no attachments and I can't find where to change this (if it exists).

Moodle 2.6.6


Average of ratings: -
In reply to Mike Jackson

Re: Setting essay question attachment default

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 only way you could change this at the moment is by editing the code.

In question/type/essay/edit_essay_form.php, find where it sets the default for 'attachments'  to 0, and change that to 1.


Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Setting essay question attachment default

by Mike Jackson -

Thanks. That makes sense. If I want to go back and change the settings for several hundred questions created by an individual user, which table(s) should I be querying? It seems like running a SQL update query might be the best fix.


In reply to Mike Jackson

Re: Setting essay question attachment default

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

qtype_essay_options

(Yes, changing this in the DB is the most efficient option. Note that, after changing the data in the DB, you will need to go to admin -> plugins -> caching and purge the Question definitions cache. Or just purge all caches.)