New function in assignment module implemented: maximum words allowed

New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Number of replies: 48
Joan Codina has already implemented a first version of the function that allows the teacher to establish a recommended limit of words for a given essay or answer. He has set up a test site in http://parles.upf.es/TEST/

The login name is 'teacher' and the password is 'teacher' as well. Please get in, play around and let us know what you like, what you don't like, what you find missing, how we could improve things, etc.

You'll notice a new neat feature in the HTML editor (available outside the assignment module): at the bottom of the editor, to the left of 'Path' (in Catalan, 'camí', on this test site) you'll see a word counter. This way, the student (or anybody using the HTML editor in a forum or in any other module that uses this editor) can monitor the number of words she's written so far.

In the second screen you get when you are seting up an assignment task, you'll see that you can establish the maximum number of words that is allowed or recommended for this particular assignment. Try to set up a test assignment and then review it ('View X submitted assignments). You'll see that there is a new cell in the review table where the teacher can easily see the number of words contained in each assignment.

I'm very excited about this new feature which I found missing in this module. I hope more people find it useful and it can be incorporated in the standard distribution of Moodle. Please give it a try and tell us what you think!

Josep M.
Average of ratings: -
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hi!

I did the quick fix of adding basic word count to assignments just before the 1.5.1 release. I do think that such basic support was needed. But I do not think that such strict enforcing of word count should be in standard release. It reminds me of Stalin's "Quantity is quality"...

I agree that your modifiaction may be needed on some sites, IMHO the right place for this new assignment type is contrib for now. Anyway it would be great to have more unofficial types to encourage innovation.

skodak
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Hi Petr,

>But I do not think that such strict enforcing of word count should be in standard
>release. It reminds me of Stalin's "Quantity is quality"...

Petr, I agree with you that strict enforcing is not desirable. This is why we implemented this feature in the way we did. If you visit the test site you'll be able to see by yourself. The teacher simply establishes a limit of words, which she might decide to enforce or not and to do it more or less strictly (she can decide that going 10-20 words over the limit is acceptable, but going 100 words over the limit is not). Note that the student is always able to post the assignment anyway, even if it goes over the recommended word limit.

So there is really not strict enforcing of anything. The basic idea with this type of extension is simply to provide a way to make information (that a number of people consider relevant) easily available. People are free to make any use they want of this information. Pedagogically speaking, there are reasons for limiting the length of an essay or answer that are very different from Stalin's motivations. You might want to encourage your students to be synthetic, to be able to distill their ideas rather than pour everything that comes through their mind on the text. Giving the students a recommended maximum number of words is actually very helpful for them (they always ask you how short is short, how long is not very long, etc.). Having an easy way for them to monitor the length of the text is then a plus. In some activities some teachers might want their students to write summaries or abstracts and those are genres where you usually find rather strict word limits.

Also, and most crucially, the way the feature is implemented, the teacher can decide to include a 'word limit/recommendation' or not. If she doesn't set up the assignment as requiring it, no information on word length appears at any point in the process of assignment submission and revision.

So, if you guys check out the code and it turns out that it is solid and, technically speaking, the inclusion of this feature doesn't create any problems, why shouldn't we include it (at some point in the future) in a standard release? We are talking about something very simple and potentially useful for many people. There are many teachers I've talked to that inquired about this type of feature (actually more for the open question mode in the Lesson and future version of Quiz module, but I decided to try to implement it first in the Assignment module).

Let me know what you think.

Josep M.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
When I was a student we never had to count words, we were always told to write a page, half-page, etc. I saw it first when I started attending English classes.

My main objection was, that the word count on your site is displayed way too often. It makes me think that the only thing that matters is word count.

My thinking is:

1/ No need to display the word count in editor

Because the student should submit (== safe) his essey regularly, because there could be sesion timeouts or other problems on server/net - you do not want them to loose hours of work. From pedagogical point of view - you encourage constant checking of the number of words instead of thinking+writing.

2/ word count is good for limitting the length
I really like the javascript popup that says "Hey, you are getting too talkative!"

3/ the recommended lengths should be in intro only
There is no need to emphasize the minimum/maximum lengths outside intro box, the students must learn to read the intructions carefully.

4/ tutors should see the word count where appropriate
They should see it, when they are reading the studets work. And also if there is any shortened version displayed

To sum it up, I think that we should add following into 1.5.2:
  • word count column to grading table
  • word count to second line of shortened text in work grading
  • configuration value from maximum recommended length
  • javascript warning for max recommended length in editor while typing
  • new button on toolbar to count words (I do not like the pernament tracking at the bottom)

What I do not like:
  • box "Maximum number of words XX" above input form
  • the count above the text box


But I am not a proffesional educator, take it only as suggestions!!!
And also I am not the maintainer of Assignment module, I am just doing some critical bug fixing, because nobody else wanted to do it wink

In any case I can review whatever changes and put them into CVS if Martin likes the general idea of them. Do not expect any veto from me big grin

In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
>But I am not a proffesional educator, take it only as suggestions!!!

Well, there are almost as many opinions about almost any educational issue as professional educators, so yours is as good as any.

>And also I am not the maintainer of Assignment module, I am just doing some
>critical bug fixing, because nobody else wanted to do it wink
>In any case I can review whatever changes and put them into CVS if Martin likes
>the general idea of them. Do not expect any veto from me big grin

Who is the official maintainer of this module? Anyway, whether you are the maintainer or not, I do appreciate your time looking into this. I'm itching to have somebody from the "Moodle inner circle" to examine this and help us determine whether there are any serious problems since you know the Moodle entrails better than most people. So your help is much appreciated. We want to do things right and it would be very frustrating that all the money, time and effort we've invested on this went to waste because of something stupid we had not predicted. This is why your help is appreciated. Of course, Martin can decide whether he wants this feature to be implemented as standard in future distributinos but I think the chances are much higher if we've had the valuable input of someone like you who has way more experience than us working with Moodle.

I respond to your other comments in a different message as I have exceeded the allowed number of words for this one smile.

Josep M.
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
>When I was a student we never had to count words, we were always told to write
>a page, half-page, etc. I saw it first when I started attending English classes.

This is my experience as well but now I teach English, so I have to follow the Anglo-Saxon tradition smile. Actually, establishing limits in terms of pages is also an option I use but it is difficult to implement in the on-line text assignment. This would work for the upload file mode but then of course we don't need to do anything especial in Moodle (except for avatars where being far or exceeding recomended text lengths could be one of the items considered in evaluation).

>My main objection was, that the word count on your site is displayed way too
>often. It makes me think that the only thing that matters is word count.

We have to find a happy medium between making it not too obstrusive and making it easy for the user to check. I thought the small characters and numbers displayed at the bottom of the HTML editor were very discreet.

I'm thinking that perhaps your experience (perceiving that the word count is displayed way too often) has been affected (besides by unpleasant associations with memories of Stalin slogans that you or your friends and relatives had to put up with in the past smile) by the fact that, when you test this feature in the test site, you have to undergo the whole process as the teacher (creating the assignment and establishing the word limit), the student (writing the text and checking how many words there are in the counter) and the teacher again (looking specifically at the number of words).

The experience in a real life situation might be less overwhelming since the three parts of this process take place separately and they have different participants. If you are simply the student, you don't really need to be checking the word count all the time (it all depends on how obsessive/compulsive the student is, or perceives his/her teacher to be, of course smile). S/he just have to concentrate on writing and every once in a while check the counter to see whether she is close or far away from the recommended number of words.

It is clear that at any part of the process, though, there has to be an easy way to check the number of words whenever the user wants to do so. It's just a matter of finding a way of doing this in a way that is as unobstrusive as possible (if any other person besides Petr has some ideas, they'll be equally welcome).

Josep M.
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
1/ No need to display the word count in editor
Because the student should submit (== safe) his essey regularly, because there could be sesion timeouts or other problems on server/net - you do not want them to loose hours of work. From pedagogical point of view - you encourage constant checking of the number of words instead of thinking+writing.

At the beginning my idea was to place the word counter somewhere else, but Martin D. suggested to me to implement it inside the HTML editor and I thought it was a good idea. A good idea because it allows us to have this feature, in case it is needed, outside the assignment module (a teacher might decide, for instance, to recommend a certain length for forum postings).

As for the specific way it is implemented, to be honest, I had not even realized until now that there was a Path: indication at the bottom of the editor. I only noticed the new word count because I was looking for it. Joan had not told me where it was placed and it took me a little while to find it. I think the way the word counter appears in little characters at the bottom of the editor is rather unobstrussive and won't really prevent people from thinking+writing. I think only people who want to check it will really notice it much.

I don't know. If you have a chance, do ask Martin about this. He gave me the general idea of placing this function in the HTML editor but it would be nice to have his input as to how exactly he would envision this being implemented. He suggested this to me in a rather informal conversation and he wasn't very detailed or specific about how exactly he was thinking this could be done. He just said something like "probably the best way to do this would be in the HTML edotor" or "it would be nice to have it in the HTML editor".

Of course, I agree with you when you say in a different part of your posting that this feature could be implemented via a button (that is clicked when we want to know how many words there are at any given point) instead of having the counter being continuously updated. I think this is the way I would prefer it as well. If there are more opinions out there, I'd like to hear them.

What we always want is to give people choices. I read in a posting in some other forum that in future versions of Moodle one would be able to choose which buttons appear in the HTML editor. Perhaps one of the choices can be whether they want the word counter to appear or not.

I don't understand what you men when you say "there could be sesion timeouts or other problems on server/net - you do not want them to loose hours of work. " This is always going to be a problem  with the on-line text mode of assignment, whether word counting is involved or not.


Josep M.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
There is a feature request in bug tracker: #3041

We would need another "save progress" button, that would submit the text and mark it as "unfinished" (in varX db field), students could then save it once in a while nad work on it for several days. They would see the word count at save time too. Teacher would know that they started the work already and review the progress...
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Yes! Very nice. This would be very useful indeed.

JM
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
2/ word count is good for limitting the length
I really like the javascript popup that says "Hey, you are getting too talkative!"

Yes, that's a nice one. It would be nice if the teacher can customize the message that appears in the javascript popup that appears when s/he submits the assignment. I'll talk to Joan and see whether this can be done easily. The idea would be to add another little entry under the one where the teacher sets up the recommended word length for the essay with a field to enter the message that will appear in the javascript popup.

3/ the recommended lengths should be in intro only
There is no need to emphasize the minimum/maximum lengths outside intro box, the students must learn to read the intructions carefully.

Fair enough. I think this can be easily done. I'll talk to Joan. I agree with you. A reminder of the maximum/minimum lengths is only necessary in the first screen that appears right above the button "Edit my submission". We can eliminate it from the screen where the HTML editor appears.

Josep M.

Josep M.

In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
edit: edit: edit: we are both typing at the same time big grin


I did not think much about my previous posts, it is hard to explain it now big grin

But my idea was to say in intro: "min 1000, max 2000" and when the student goes above lets say 3000, only then the javascript popup jumps out and says, that the student should reconsider the length....

I take back the words about the teachers - reviewed your site once more.



I am still fixing some bugs all over assignment code, it should be finished tomorrow - some 3 more to go wink

I can review your patches after that and suggest some changes...
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
I don't understand what's going on here. Something really strange. Being both typing at the same time should not be a problem but I was trying to post an answer and when I tried to save it wouldn't let me do it. Then you go and talk precisely about the comment in the answer I'm unable to post (the one about the JavaScript popup window. Are you big Brother smile. No, seriously, are you able to see what I'm typing before I save it? Your answer suggests to me you are responding to the following comment (which I still haven't been able to post!!! surprise):

(the real Petr from the earlier messages would have said that this is some kind of Stalinist psychological terror weapon).

Josep M.
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Yes. We are both typing. We should take a rest (it's Saturday afternoon, after all smile).

I like the idea of the javascript popup (big brotherish as it may be). I assume the teacher would be able to set the amount of words that would trigger the "you are being too talkative" popup. My only concern is what I said before. This would require some sort of cron doing counting every once in a while, right? If so, wouldn't it be too much of a burden for the server if many people where writing assignments on-line?

All right. You have a good weekend. I'll go over all of this discussion with Joan and see what can be done. We will first try to implement it on the test site and once it is working we'll pass the patches along so that you can have a look at them.

Again, thanks a lot for your time.

Josep M.
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
4/ tutors should see the word count where appropriate
They should see it, when they are reading the studets work. And also if there is any shortened version displayed

I don't follow you here. The way it is done now, the tutors already see the number of words in the upper right side of the screen, right under the link for the assignment (attachment). Do you mean that it should also appear as some sort of heading within the text itself? Also, I don't understand what you mean by "shortened version".

Josep M.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Shortened version - there is a link that is named using first 10 (or 15) letters from content, you have added the word count - I like it. I am not sure about the column in grading view, that shows the word count - but somehow I got used to the idea while talking with you here wink

Javascript popup -- we could modify your current counting algorith in editor to throw it, we just need to feed it warning count and message...
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
OK, I think I know what you mean now.

Do you mean this?:

assg2

And with the column, you this, right?:

assg

This column might be pretty useful for a quick view so that the teacher can see easily if many students have gone over the recommended length. Since columns might be sorted, it could be useful also to order essays from shorter to longer and then determine which students are lazier and which are more hardworking smile (or which are more capable of synthesizing).

JM
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Yes, I agree now. IMHO it is better to keep it always visible, than to add more clutter to the form in details.php wink
In reply to Petr Skoda

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
To sum it up, I think that we should add following into 1.5.2:
[...]

    * javascript warning for max recommended length in editor while typing

I don't understand what you mean here, either. Do you mean that at the moment the user goes over the amount of words a little window pops up warning that the recommended limit has been exceeded? If this is in fact what you mean, who are you and what have you done with Petr Skoda? smile (the real Petr from the earlier messages would have said that this is some kind of Stalinist psychological terror weapon).

    * new button on toolbar to count words (I do not like the pernament tracking at the bottom)

Yes, as I said in an earlier post, I think this might be a matter of preference but I like that option, too. In fact, this was the option we considered first. I don't know why Joan opted for implementing the other option (continuous tracking) first. There is another issue with the permanent tracking, which is the processing load. If there are many students on-line, perhaps this might be too much of a burden for the server.

OK, I might have exceeded the permitted length, but I think I'm done responding to your comments. As I said, I really appreciate your input. Please, let us know of any other suggestion you have. I'll talk to Joan (he'll probably read these postings sooner or later) and we'll try to implement the changes you suggest. We'll post an announcement as soon as it is done, so that people can check the test site again and see the changes.

Josep M. 
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by W Page -

Hi Josep & Petr!

I so enjoyed reading this thread.  Such a good example of constructionist learning that relates to feature development and usability.  Very insightful. smile

This discussion also revealed [at least for me] how different views of education are reflected in how we want to teach students.  It also demonstrates the need for options in how features are implemented so that they fit culturally and therefore naturally [depending on culture] in our approaches to teaching. 

Will go back to lurking.

WP1

In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Julian Ridden -

I am loving and gratefull to all for the directions we are seeing the Assignment module moving in. This augmentation is no exception.

An idea would be to make this a paramater in the assignment setup eg:

Have maximum wordount  (Checkbox)
Max wordcount (input field)
Display alerts to students (Checkbox)

Based on these two fieilds the before mentioned wordcount boxes/popups/etc would appear. Rather than making this a new assignment type, I believe adding these paramaters to the exiting inline assignment module would be a huge bonus.

In reply to Julian Ridden

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -

I did some changes in our test site. And also want to settle some aspects.

* When grading and viewing the student activity wordcount only is there if the activity has a wordcount limit
* There is only a maximum worddcount but also a minimum could be added or maybe better a wordcount plus/minus a margin. 200+/-20
*The maximum is a soft limit, it only provokes a warning to the student, depending in teacher criteria this will be a punishment or not during grading.
* I also added the submited text when grading (avoiding an extra click to the teacher) but leaving the link still there, so if text is long he can have its feedback and the submitted text in different pages.
* The maximum number of words appears in both pages, the activity one and when writtin the text to submit. I think it is important in both, but maybe more discrete. It is important to know the limit while writting and also when looking at the task to know how far are you from the limit.
As a side effect
* Word count in the html editor appears everywere you use the html editor.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I really like the way you have integrated word counting into the HTML editor (with the count updated live in the status bar)! approve

Can you post your modified files for the editor?
In reply to Martin Dougiamas

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
I'll ask Joan to post this code (if he hasn't seen this posting and done it already). I've just posted another related message (this thread was getting to be a bit too long): http://moodle.org/mod/forum/discuss.php?d=27258#128315 where I talk about the alternative (or complementary) way of doing the counting by adding a button in the editor's tool bar.

Ignorant as I am about these things, I was concerned with the count being updated live in the status bar because it could be a hog for server resources. Now it seems even ridiculous to me to have considered this, but I thought the live counter was implemented via some cron in the server surprise. As Joan has told me, and now it seems very obvious and logical blush, this counter is implemented via JavaScript, so the processing takes place in the client's computer.

Josep M.
In reply to Martin Dougiamas

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
Here is the code...
It includes the changes in the editor:
/lib/editor/htmlarea.php
/lib/editor/images/ed_countwords.gif
/admin/editor.html
and the language file lang/en/editor.php



There are also the changes to allow setting a desired number of words for the assignment. They are located in /mod/assignment and lang foders.

Today I did some changes to compute the number of words every two seconds instead of after every keypress, as this was producing a delay for long texts, .

So have it, and enjoy.
In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
I forgot to indicate that I also did the changes to include word count in a basic text area when the html editor is disabled.
The javascript can be found in the previous zip, in the file /mod/assignment/type/inline/wordcount.php

In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
I did some changes in the htmlarea.php in order to adapt the delay between word counts.
In this new version the delay is 1/2 second plus a 25 times the time needed to compute the word count.
With this formula the word count refresh is fast(half a second) when there are a few words (less than 100). The refresh rate becomes slower when the number of words increases and the delay for counting words is a bit annoying.
For about 10,000 words (from a student who works hardwink) it takes about 2 seconds to count words and and it will wait about 45 seconds to refresh the word count again (but this depends on the client computer)
Remember that you can test it at http://parles.upf.edu/TEST
In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Julian Ridden -
Again, anothe brilliant adaption to assignments. I have installed this and had it working first go.

Thanks for the great work.

Will this be included in future 1.5 releases?
In reply to Julian Ridden

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Thanks for your kind words. Joan has worked his ass off putting this together. I'm sure he'll appreciate them.

> Will this be included in future 1.5 releases?

That would certainly be our hope. I see in this and other forums that Petr, Martin and the other guys are extremely busy fixing bugs and making sure everything works smoothly for the release of 1.5.2. I suppose someone will have a look at this when more important, prioritary issues get taken care of and let us know whether there are still any issues we should look into.

Josep M.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
I solved a bug that appeared when the function called on_submit had no return value and this cause a (!$return) condition become true
I did a new version... here is the new html editor that counts words.

In reply to Joan Codina Filba

Will word count be integrated in 1.5.3?

by Josep M. Fontana -
Martin and/or Petr,

Did you have a chance to have a look at the code to implement the word count function in assignment? We've had the slightly modified assignment module (with the added word count) working on two different Moodle sites for a couple of weeks without any problems and I was wondering whether it would eventually be added to the regular distribution in case you don't find any major problems with it.

Since it doesn't involve any major change in the way the module works and it has been implemented in a way that is rather unobstrusive and easy to use, I see it as added value to the assignment module and to Moodle in general at no cost. Would you people consider incorporating this in the next releases?

Josep M.
In reply to Josep M. Fontana

Re: Will word count be integrated in 1.5.3?

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hi!

I am too busy just now, I was learning CSS last week and now I am doing some brute force customisation of Moodle to make it look like a normal web site wink

I would like to see much more improvements in assignments:
  • word count
  • redesigned grading interface
  • new plugin - submission of multiple files

It all depends on when 1.5.3 is going to be released, it seems it will be shortly after problems with PHP 4.4.0 and AdoDB are solved. In any case 1.6 would be a good target too.

We could also commit the improvemens only into HEAD and keep it compatible with STABLE...

skodak
In reply to Petr Skoda

Re: Will word count be integrated in 1.5.3?

by Josep M. Fontana -
Thanks Petr,

You are indeed a busy man. When do Moodle people take their well deserved vacation? Moodle (like rust smile) never sleeps.

I'm looking forward to seeing all of these improvements you mention. No hurry on our part. As I said, we have word count implemented in our production site so it is ready for next course. I just wanted to check with you guys about the status of this functionality with respect to future releases and more or less when and how you were thinking about going about it.

Josep M.
In reply to Josep M. Fontana

Re: Will word count be integrated in 1.5.3?

by Art Lader -
Just to be clear: The word count feature was not included in 1.5.2, right? (So I cannot simply enable it somewhere in admin >> configuration.)

Thanks,
Art
In reply to Art Lader

Re: Will word count be integrated in 1.5.3?

by Josep M. Fontana -
Hi Art,

No, as Petr says, they still haven't had time to have a look at the code to check that everything is OK so that they can integrate it in the main distribution. Joan provided the code needed to add this function further up in this thread. As I said, we are using it in two sites (a test site and now a production site) and everything is working fine. You are welcome to download it and check it out in the meantime.

Josep M.
In reply to Josep M. Fontana

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
I did a patch that can be installed using cvs to an existing moodle site
As you will be able to notice, the patch is done with Moodle 1.5.2 + (2005060223)
I hope the patch simplifies the merging of code.
As its been posted before, the patch allows to set a maximum number of words for the assignment. But this maximum is a soft limit as the student is still able to submit its work even if he writes beyond the maximum
It also incluces a word count in the html editor and also the number of words appear while grading the work done.
There is also an improvement to avoid some clicks during the grades.


In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Syamsul Anwar -
Hello everyone,

I was just wondering if there are also plans to set a minimum number of words, in addition to (or rather than) a maximum number of words? I seem to have a greater problem getting students to write more, rather than less. mixed
In reply to Syamsul Anwar

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Well, the functionality Joan Codina has added allows for both (maximum and minimum of words) since it only informs the user about how many words the essay contains.

If you simply tell your students that their essay should contain no less than X number of words, they are helped in two ways to keep count: a) by the counter (discretely placed on the editor) and b) when they are about to submit the essay, by the little window informing them about how many words are contained in the essay/answer which they are about to submit. Remember that you can easily switch this counter on or off. So if you don't mind about the length of the assignments, you just don't switch it on when you generate the assignment.

Your task as a teacher is also made easier by the fact that as you grade the essays/answers you are informed about the number of words contained in each one of them. In other words, the functionality doesn't really "establish" a limit of words, it is more an "information tool" if you will. Hence you can use it for both minimum or maximum recommended number of words.

We haven't been informed yet about whether this is going to be incorporated in the essay module for version 1.6. I suppose Petr or Martin will let us know at some point.

What I can say is that it is stable and Joan has corrected one problem we had when the essays were very long. The problem was that, since the editor counter is implemented in JavaScript, the frequent counting of words could cause some slow down on the local computers when the text got to be very long. To be fair, only very, very rarely would one want to use on-line assignments for such long texts, but we had to test the functionality under the most extreme conditions. On my computer, I only started to experience slow down with a 2000 word essay, but I have a pretty powerful machine -- am I becoming one of those arrogant geeks I so much detest mixed ?

Anyway, Joan found what I think is a very ingenious solution: the frequency with which the script counts the words decreases automatically as the length of the text increases. So now it works very smootly.

You can test it yourself at http://parles.upf.es/TEST/ . Use teacher:teacher to log in. Ah, never mind about the little window that will appear when you access the course. Just reduce it and move it to one corner of your screen and it won't bother you. We are doing some testing with a floating block and it is still a bit rough around the edges.

Josep M.

In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Bhupinder Singh -

Hi Joan,

Is the plugin usable in O/S = Windows.

Regards

Garry

In reply to Bhupinder Singh

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
Yes it works with both, Ms windows server and client (with firefox and IE)

You can use at our test site. The code is basically a merge of php and javascript.


In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Joan, can you please recreate the patch and make sure that the text files you are comparing are all in Unix text format?

The current patch basically deletes entire files and replaces them with your code. I'd be very happy to get this into CVS if you can do this for me - thanks!!!
In reply to Martin Dougiamas

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
You are right Martin,
The rar file post here is bit old, but 30 minutes after posted I can not change it, so the only thing I can do is to do a reply with newer information
That's why I will not attach the file again, but I will insert a link to our site, where I will try to keep the patches up to date. In this way when someone gets the patch he is sure is getting the last one (about 38K uncompressed)

All the patch I did can be found in our TEST site (user: teacher pass:teacher), and also you can use this test site to test the patches and other utilities that are installed
  • Copy activities icon when editing a course
  • Count words
  • Easy grading for assignment (very simple but useful, something similar already done in the new assigment but you can use it if you don't want to wait for 1.5.3)
  • Floating windows (that not only floats but also uses Ajax techniques to update its contents)
There is also a translate block that uses Ajax techniques to update its contents. For the moment it does from English to Catalan (our language) and I is not yet available as a path because I need some time to clean up the code and make it as a real moodle block
In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Julian Ridden -
Many thanks for your code Joan. I have slightly modified it and have it now woriking in the current nightly build of 1.6.

Would like to see if we could somehow get this added to the 1.6 release.

Also, Eloy pointed out, and I agree, that the wordcount in the HTML editor should really only appear when using a wordcount enabled online asignment rather than throughout the entire moodle site.

Could we possibly enable the wordcount in the HTMLeditor using some sort of flag or parameter passed to the editor script? something like &showcount=y in the URL? Or in the session data?

Sadly wouldnt know how to myself..but a point I thought I would pass on.
In reply to Julian Ridden

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Julian,

You'll have to try to remind Martin (and/or Petr or whoever is in charge of the assignment module) yourself. I don't want to keep on nagging them smile. We were told that this would be incorporated in 1.5.3 but in the end it wasn't.

I must admit when I downloaded 1.5.3 and installed it I was a little miffed to see that Joan's patch had not been incorporated even though we were told that it was going to be. But then the rational part of me (which comes out every once in a while) told me that I had to be understanding and that they were all in a rush in the last moments before the release because there were a few important bugs to mend. The rational part of me also told me that there are other more important components of Moodle to be taken care of before our little word count function.

So, I decided to wait a little bit and remind them again, but if you do it for me, you'll make me really happy because I hate to be pestering people like that smile.

Ah, I agree with you and Eloy on the restriction on the editor counter. I don't know whether Joan has a way to implement this or if he has time to do it, though. I'm going to meet him in 10 minutes to have a beer together with other Barcelona Moodlers like Marc "Ludo" Alier. I'll talk to him about this and see whether he can come up with a solution.

Josep M.
In reply to Julian Ridden

Re: New function in assignment module implemented: maximum words allowed

by Joan Codina Filba -
There are some things I can't do myself: I have no idea of how to count words in japanese....
On the other hand i think is very easy to overcome the problem of not counting words everywere: The simplest is to have two html editor's, and to load one or the other depending if there is a need to count words,(or the parts involved in counting words of the code of the html editor have a flag, that is activated by the assignment that counts words) in this case all the editors in a page will have (or wil have not) the word counter

Another important think is if the button that in a popup gives the number of words, should be removed. I think this one can be kept, as is an extra utility.

The word count comes together with the display of the number of words when granding, this is only displayed when there is a word limit.
I'll try to make a new path, but these are bad days to work wink
In reply to Joan Codina Filba

Re: New function in assignment module implemented: maximum words allowed

by Timothy Takemoto -
Dear Joan Codina Filba
Thank you for the wonderful module. I believe Eloy has alread solved the problem of Japanese by adding a check for two byte characters and allow us to search for the number of characters instead. I am not sure how that will work with Thai and Korean but it will be fine with Japanese.
Tim
In reply to Timothy Takemoto

Re: New function in assignment module implemented: maximum words allowed

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hey, hey.

It's true that now, the assignment code counts words or chars, based in a global module setting (it's part of the work-in-progress to be multibyte ready for 1.6).

But I didn't know anything about the HTML-Editor count feature. Only by coincidence, Julian pointed me to such feature and then I saw this discussion... so don't expect it coming, at least from me.

Ciao smile

P.S: About the implementation of such editor feature, yes, really I think it should be showed only when required, not always, but it's only a developer opinion, not an pedagogical-wizard-guru like all you. You can safely ignore it!

P.S.2: Tim, have you tried it in the unofficial UTF-8 test site? Does the editor now count letters there? I think it's highly improbable (or we are really lucky!)
In reply to Eloy Lafuente (stronk7)

Re: New function in assignment module implemented: maximum words allowed

by Josep M. Fontana -
Hi Eloy and everybody,

There is something I don't understand. It is true that now somewhere you can see the word count. The thing is, the way this is implemented right now, it is not very useful for the purposes we had in mind when we came up with the proposal. The idea is that if the teacher so wishes, s/he can set up some sort of limit (which, as we discussed earlier, doesn't need to be strictly enforced and can work only as a recommendation) and then the work of both the student and the teacher with regards to this recommendation is made more comfortable by means of various mechanisms (the counter in the editor is only one of them).

I still don't really understand why this functionality was not incorporated in the way that Joan had implemented it, provided, of course, the code was sound and there wasn't any conflict with anything else in the assignment module or Moodle as a whole. It is just that. That I don't understand what ended up happening when it seemed that the little patch was going to be incorporated once Joan fixed the problems that Martin pointed out earlier (which he did). If suggestions like the ones Eloy and Julian give in the sense of limiting the presence of the counter to certain environments are presented, I can understand that. As I said, I do agree with you, and I see no reason to have a counter in the editor when you don't need it (although, it is so unobstrusive that it doesn't bother me to have it either, I don't notice it is there most of the time).

But, again, I don't really understand why the word count functionality has been introduced in the way it has been introduced and not in the way we suggested.

Anyway, I think I won't insist any more (although knowing myself, I don't know if I can promise that smile). We'll just apply the patch in our Moodle installations and anybody who is able to find out that it exists and wants to use it can download it from our site. It is just that I find it a little sad that something that seems totally unproblematic (maybe I'm very wrong but nobody has told me otherwise) and does not affect in any negative way the overall structure of the assignment module or Moodle as a whole cannot be incorporated for the benefit of everyone who might want to use it.

We are not talking about some very weird, complex and unusual kind of functionality here. For people who work with language (second or first language teaching) it is rather usual to establish recommended lengths for the students' essays. We just added a way for Moodle to make it easier to work in these kinds of situations, both for the students and for the teachers, without imposing this way of working on anyone who doesn't need this functionality. It is just one more choice. I frankly don't see where the problem might be.

Josep M.