Would like to develop a feature ...

Would like to develop a feature ...

by David Shields -
Number of replies: 2
Requirement: to add a button to the top part of screen, visible everywhere.
This button, when clicked, would report moodle site abuse ("Oh noes, soemone used a naughty word in forum xyzzy!") to site admin.

I'm ok with auto-emailing from php, that's easy-peasy. Would just mailing the current url be enough ?

How hard is it to add stuff to permamently visible place ? Would breadcrumb trail be a good place ? If so, how hard would it be ?

David
Average of ratings: -
In reply to David Shields

Re: Would like to develop a feature ...

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
This is easy codewise - you just put it in the theme.

(If you don't have one already, make your own theme that is based on standard one if you like; or just be naughty and edit the standard one and run the risk that you forget about it when you update the software...)

Once you have a theme you can just stick the button in header.html. I don't think it should specifically go in the breadcrumb trail but it could be somewhere around there.

I'd make the button go to a custom script page (new one you'd write) that would be a form with the URL [which it can get from referrer] and a space where you can describe the problem. For instance for a forum discussion, the same URL covers the whole discussion, so users can then use text to identify the specific that is offensive ('the post by that reprehensible sam character with the stupid cartoon icon that's wearing glasses'). Sort of like this form:

Page [ http://... (filled in automatically, can't change) ]

Who wrote the text that you are objecting to? (Enter their name here, or leave it blank if you can't tell.)
[ ]

What is wrong with the text?
[


]

[Yes, I am a mindless loser who can't handle a bit of robust discussion, submit this abuse report]
[Cancel, I have returned to my senses and realised that just ignoring it will clearly demonstrate that I'm the better person; or failing that I can use a really good swearword in my reply.]

Obviously it just puts the information (along with the loser's name/username etc) into the email it's going to send... should be straightforward.

--sam