I don't see any logical way to count all words in a whole eportfolio but an eportfolio page could be done, as could a collection of pages.
But as a page is made up of a number of different blocktypes this would not be a simple feature to add.
I believe what would be needed logic wise would be:
1) Each blocktype have a function allow_wordcount() which would return true/false for whether to count this block in the page's word count as some blocks would not make sense to do word count like an image block, gallery block or external feed block (as the words are not the user's words but text from a third party).
2) For those blocktypes that have allow_wordcount() return true they would call anther function get_wordcount() to do the logic to count the words and return the number. The problem here is what count as words and what do not, does html markup count/not count? If a block is used on multiple pages like some text boxes can be do we count it once or for each time it appears?
3) So then the page (or collection of pages) would need to loop through all the blocks that are used to return the running total and display it somewhere useful.
4) And possibly use this information on the admin statistics pages.
So it does sound a good idea - but will need some more thinking about to get a working concept.
I don't see any logical way to count all words in a whole eportfolio but an eportfolio page could be done, as could a collection of pages.
But as a page is made up of a number of different blocktypes this would not be a simple feature to add.
I believe what would be needed logic wise would be:
1) Each blocktype have a function allow_wordcount() which would return true/false for whether to count this block in the page's word count as some blocks would not make sense to do word count like an image block, gallery block or external feed block (as the words are not the user's words but text from a third party).
2) For those blocktypes that have allow_wordcount() return true they would call anther function get_wordcount() to do the logic to count the words and return the number. The problem here is what count as words and what do not, does html markup count/not count? If a block is used on multiple pages like some text boxes can be do we count it once or for each time it appears?
3) So then the page (or collection of pages) would need to loop through all the blocks that are used to return the running total and display it somewhere useful.
4) And possibly use this information on the admin statistics pages.
So it does sound a good idea - but will need some more thinking about to get a working concept.
I will mark as a wishlist item.