Text Filter needs work

Text Filter needs work

Russell Myers གིས-
Number of replies: 6
I was checking how the text filters with Word censorship, censor words. I was worried about the abuse of a student forum I set up. I tried a number of my favorite naughty words and unfortunately it only censored one (the "f" word). I would like to add some words to the censorship filter, but I am not sure where.

Basically I would like to know where the list of censored words resides.

Thanks,
Rusty Myers
དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Russell Myers

Re: Text Filter needs work

Marc Dastous གིས-

Hi Rusty, I have been testing this same filter.  You can edit it VERY easily.  It is the filter/censor/filter.php file.

My concern with the filter is that it ONLY catches inline text.  For example, if a student uses the F word in the title of a posting, that shows up.  If it is within the actual post it gets edited out.

I have attached the file that I am currently using to help you along. Download this file and edit it with your favorite PHP editing program.  Then upload it (ASCII) to the folder described above.

Hope this helps.

Marc

In reply to Marc Dastous

Re: Text Filter needs work

Martin Dougiamas གིས-
Core developers གི་པར Documentation writers གི་པར Moodle HQ གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར Testers གི་པར
You can add this to your moodle/config.php

   $CFG->filterall = true;

and most of the subjects, headings etc get filtered too.


In reply to Martin Dougiamas

Re: Text Filter needs work

A.G. Pate གིས-
This is very helpful - thanks everyone. One other question. Is there a way for Moodle to contact or inform the teachers or the course or the administrators if the censor is 'activated'? Not that I really want to be big brother but it would be helpful in my context to be able to be aware of any 'abuse'.
In reply to Russell Myers

Re: Text Filter needs work

Teresa Gibbison གིས-
We have started using the Word Censorship filter after a group of young students abused one of our forums.

We have a class with adult students, one called John Hitchcock (displays Hitchc***). Unfortunately when someone refers to John's name in full the last part gets censored. Is there any way we can filter 'whole words' only or do we have to take that particular word out of our list and hope it is not used inappropriately?

Teresa
In reply to Teresa Gibbison

Re: Text Filter needs work

Helen Foster གིས-
Core developers གི་པར Documentation writers གི་པར Moodle HQ གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར Testers གི་པར Translators གི་པར
Hi Teresa,

Have you tried adding a space before the word in the censored word list i.e. " cock"? This should filter the whole word (apart from when it's the first word in a sentence) but not the word Hitchcock.
In reply to Teresa Gibbison

Re: Text Filter needs work

Martin Dougiamas གིས-
Core developers གི་པར Documentation writers གི་པར Moodle HQ གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར Testers གི་པར
Just FYI, this filter has been revised in Moodle 1.5 ... it now just blacks out words using styles. eg Hitchcock. Notice that you can still see the words if you really want to by selecting the text with your mouse.

The list of words has also been lengthened, and is stored in the language pack so you can edit it in a custom language pack. Spaces are trimmed off so Wild Girl's suggestion will not work anymore, but you could always keep and extend the old filter from 1.4 if you really want.

The whole thing is a bit of a losing game with determined swearers since they could write c0ck, c()ck, (ock, c o c k, etc. And then of course you have different contexts for words ...