Anyone know why a students post would duplicate 3 times in the same forum?

Anyone know why a students post would duplicate 3 times in the same forum?

Bonnie Mioduchoski -
回帖数:19

Hi all,

We're using Moodle 2.4.3. Lately when some students post in the forums it will create 3 of their posts. Usually 2 are posted with the same time and one a second later. Everything is the same in the post. People are using desktops or laptops, not iPads/phones when this happens. Any idea why and what I could do to prevent this?

回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

Interesting, I have been having the same problem this semester.  I am running Moodle 2.5.1+.

It doesn't happen for every post, in fact, very few.

My guess is that my server might be a little slow, and students click two times on the Post button, which Moodle then sees twice.  It actually happened once to me, so I knew that I has clicked twice.

It might also have something to do with students using the Macintosh (which I use).  On the Mac, you can go back by right-swipping the magic mouse or trackpad.  I once did this accidentally, the swipped left, then submitted, and I ended up with two posts.

Hey, just for fun, I am going to click-click the "Post to forum" button (below) to see if my post to you gets recorded twice.

Since I now have a Mac, I also wonder if it has something to do with Safari?

We will have to experiment a little more.  (Okay, here's my click-click, let's see what happens.)

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

See!  A click-click created two posts!  Wow, you give it a try.  

I don't think this forum's moderator will mind us diagnosing the problem right here.

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Mary Cooch -
Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像

No -it's fine  -I came along to say similar things actually. And I have certainly posted unintentionally twice or more myself at times. (but not this time眨眼)

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Floyd Saner -

Rick,

Trying click...click with Windows 7 and Chrome 29.0...

 

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Floyd Saner -

Rick,

Trying click...click with Windows 7 and Chrome 29.0...

 

回复Floyd Saner

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Floyd Saner -

Yep, two posts appeared with two very fast click-clicks.  Rick, I like your idea about a slow server.  Also some people just double-click everything (like my Dad who was still using a computer in his 90s).  微笑

 

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Bonnie Mioduchoski -

Okay - good to know! I will communicate this to our students so they can be aware of this. I like that it was diagnosed in real time. 微笑

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Bonnie Mioduchoski -

Okay - good to know! I will communicate this to our students so they can be aware of this. I like that it was diagnosed in real time. 微笑

回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

I wonder if this could be a more common problem for people who use Macs.  On a Mac, one typically might click on their browser to make it active (if they are currently in a different app), and then click on a link (or button) to initiate its action.  So some Mac users might be more commonly clicking twice (even though their browser is the active application).

Just a few more thoughts on this topic.  What do you think?

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rebecca O'Connell -

Has anyone reported this as a bug? Because the problem has been present for awhile, and it is really angering our users. (And I hate having to tell them that that's just the way it is, and no, I don't know when it will be fixed.)

回复Rebecca O'Connell

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rebecca O'Connell -

Also, I get this response consistently on Mac Chrome, so it's not just Safari.

回复Rebecca O'Connell

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

Is it a "bug" when someone double clicks?  Maybe not, but maybe so.  Maybe there should be some code that catches this kind of problem.  Maybe something like "only act on the first click" because I cannot see why anyone would want to make two identical posts.

I haven't reported it in Tracker.  Maybe I could over the next day or so.  Let me know if you beat me to it.

回复Rebecca O'Connell

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

Rebecca, I just added this to Moodle Tracker.  Please go there and vote for it.

MDL-41730 - Double posts occur when the user double clicks on "Post to Forum" button has been successfully created.

While you are at it, could you vote for MDL-31355.  This one suggests that a forum due date be automatically added to the Calendar, which right now it is not.  Thanks.

回复Rick Jerz

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Bonnie Mioduchoski -

Hi Rick,

I just voted on this - I think it's best if we can prevent duplicate posts directly like you mention. Thanks for creating an issue in Moodle tracker!

回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Andre Cunha -
i have the same problem on two platforms, one with version Moodle 1.9.18 + (Build: 20120519), the other version Moodle 2.4.5 (Build: 20130708). Users say they do not give double click but only managed to reproduce the bug this way.
回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

Interesting, I have been having the same problem this semester.  I am running Moodle 2.5.1+.

It doesn't happen for every post, in fact, very few.

My guess is that my server might be a little slow, and students click two times on the Post button, which Moodle then sees twice.  It actually happened once to me, so I knew that I has clicked twice.

It might also have something to do with students using the Macintosh (which I use).  On the Mac, you can go back by right-swipping the magic mouse or trackpad.  I once did this accidentally, the swipped left, then submitted, and I ended up with two posts.

Hey, just for fun, I am going to click-click the "Post to forum" button (below) to see if my post to you gets recorded twice.

Since I now have a Mac, I also wonder if it has something to do with Safari?

We will have to experiment a little more.  (Okay, here's my click-click, let's see what happens.)

回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

P Braby -

I don't have the knowledge to submit a real fix but I made a script which disables the button on the client side so it can't be double-clicked if the validation code passes

I put it in the head section of my Appearance -> Additional HTML

<script type="text/javascript">
window.onload=function(){
if(document.getElementById("mformforum"))
{
document.getElementById('mformforum').setAttribute("onsubmit",
"try { var myValidator = validate_mod_forum_post_form; } catch(e) { return true; } var result= myValidator(this); if (result){document.getElementById('id_submitbutton').disabled=true}return result;"
);
}
};
</script>

I've only put this here because it might help someone, it's a messy fix which could easily break if you update moodle

回复Bonnie Mioduchoski

Re: Anyone know why a students post would duplicate 3 times in the same forum?

Ian Kris Banawa -

don't you want to appear this on your site?well i guess everyone don't want also to happen this things to them. but i would love too, if the message is very interesting and entertaining, I guess I would love to read a repeated messages..heehe