Moodle
  1. Moodle
  2. MDL-9376

Q and A forum editing time allows students to see other posts and modify their own

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7, 1.7.1, 1.7.2, 1.8.11, 1.8.12, 1.9.7, 1.9.8, 2.0
    • Fix Version/s: 1.9.12, 2.0.3
    • Component/s: Forum
    • Labels:
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      1033

      Description

      Student post answer and can edit its and see other replies 30 minutes...

      1. qanda_9376_subscriptions.diff
        0.8 kB
        Charles Fulton
      2. qandaforum2.patch
        2 kB
        Vlas Voloshin

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          What is the exact problem, could you describe it a bit more? thanks

          Show
          Petr Škoda added a comment - What is the exact problem, could you describe it a bit more? thanks
          Hide
          Artem Andreev added a comment -

          The Q & A forum requires students to post their perspectives before viewing other students' postings. After the initial posting, students can view and respond to others' postings. But when student posted answer, he can 30 minutes see other replies and modify his. For example, student post any symbols, see answers other students and compose his...

          Show
          Artem Andreev added a comment - The Q & A forum requires students to post their perspectives before viewing other students' postings. After the initial posting, students can view and respond to others' postings. But when student posted answer, he can 30 minutes see other replies and modify his. For example, student post any symbols, see answers other students and compose his...
          Hide
          Samuli Karevaara added a comment -

          Artem probably means that the student can just post "asdf", then peek at the other peoples answers and edit his/her answer accordingly. Maybe an option "Do not allow editing of the Q&A forum posts"? Or can this be worked around with the roles, restricting editing of those Q&A forums where it is required...

          Show
          Samuli Karevaara added a comment - Artem probably means that the student can just post "asdf", then peek at the other peoples answers and edit his/her answer accordingly. Maybe an option "Do not allow editing of the Q&A forum posts"? Or can this be worked around with the roles, restricting editing of those Q&A forums where it is required...
          Hide
          Artem Andreev added a comment -

          Hmm, may be as temporary solution...
          It will be good to restrict editing only first post. For what restrict editing others students posts?

          Show
          Artem Andreev added a comment - Hmm, may be as temporary solution... It will be good to restrict editing only first post. For what restrict editing others students posts?
          Hide
          Artem Andreev added a comment -

          About roles: forum have only mod/forum:replypost and mod/forum:editanypost capalities and haven't mod/forum:editpost...

          Show
          Artem Andreev added a comment - About roles: forum have only mod/forum:replypost and mod/forum:editanypost capalities and haven't mod/forum:editpost...
          Hide
          Ray Lawrence added a comment -

          Just a +1 for this. Teachers work this out in 2 minutes.... students faster.

          Show
          Ray Lawrence added a comment - Just a +1 for this. Teachers work this out in 2 minutes.... students faster.
          Hide
          Samuli Karevaara added a comment -

          Ghassan Geara had an elegant solution suggestion to fix this: "to hide others' posts until the editing time is over". (http://moodle.org/mod/forum/discuss.php?d=81830)

          Show
          Samuli Karevaara added a comment - Ghassan Geara had an elegant solution suggestion to fix this: "to hide others' posts until the editing time is over". ( http://moodle.org/mod/forum/discuss.php?d=81830 )
          Hide
          Susan Mangan added a comment -

          How can you set to 'hide others' posts until editing time is over'? I can disallow students from deleting their own posts and have shortened the edit time to 1 minute to try to solve this problem; however, the latter hasn't gone over well for our regular forum users! Any updates on this issue?

          Show
          Susan Mangan added a comment - How can you set to 'hide others' posts until editing time is over'? I can disallow students from deleting their own posts and have shortened the edit time to 1 minute to try to solve this problem; however, the latter hasn't gone over well for our regular forum users! Any updates on this issue?
          Hide
          David Wong added a comment -

          It's hard to believe that this is still a problem. After perusing the docs and suggesting that my teachers follow the Moodle docs, darn if it makes a difference. If they can edit their posts within 30 minutes, that enough time to pilfer other students' ideas.

          Anybody found a workaround for this one other than rescripting the code itself?

          Show
          David Wong added a comment - It's hard to believe that this is still a problem. After perusing the docs and suggesting that my teachers follow the Moodle docs, darn if it makes a difference. If they can edit their posts within 30 minutes, that enough time to pilfer other students' ideas. Anybody found a workaround for this one other than rescripting the code itself?
          Hide
          Vlas Voloshin added a comment -

          I've fixed this bug - apply the patch in attachment. With this edition, user will still be unable to see other students' replies, until 30 min (or other time, which is set in config) period has passed after his/her post. After this period, editing or deleting of user's post is not allowed, so all other posts are shown.
          Though patch was created on the base of latest stable 1.9.x build, I'm sure it'll do fine on older versions.
          Another little edition may be to change the string, which is printed instead of hidden posts, so it mentions that post may be hidden because editing period is still on.

          Show
          Vlas Voloshin added a comment - I've fixed this bug - apply the patch in attachment. With this edition, user will still be unable to see other students' replies, until 30 min (or other time, which is set in config) period has passed after his/her post. After this period, editing or deleting of user's post is not allowed, so all other posts are shown. Though patch was created on the base of latest stable 1.9.x build, I'm sure it'll do fine on older versions. Another little edition may be to change the string, which is printed instead of hidden posts, so it mentions that post may be hidden because editing period is still on.
          Hide
          Susan Mangan added a comment -

          Hi.. I'm wondering if I could get some help on how to apply this patch as I've never done it before. I am using linux.

          Do I simply unzip the file to my moodle dir and then type:

          moodle> patch -p1 > qandaforum.patch

          I tried to read about applying patches but was a little confused on how to do this using linux. Does the file need to be renamed to qandaforum.diff or is this just for windows users?

          Thanks in advance ..

          Show
          Susan Mangan added a comment - Hi.. I'm wondering if I could get some help on how to apply this patch as I've never done it before. I am using linux. Do I simply unzip the file to my moodle dir and then type: moodle> patch -p1 > qandaforum.patch I tried to read about applying patches but was a little confused on how to do this using linux. Does the file need to be renamed to qandaforum.diff or is this just for windows users? Thanks in advance ..
          Hide
          Vlas Voloshin added a comment -

          Not actually, no need to strip one directory using -p1
          So I think the best way is to unzip the patch anywhere you like, cd to that directory and use:
          patch -d /path/to/the/moodle -p0 < qandaforum.patch
          , where /path/to/the/moodle is, obviously, your path to moodle directory

          Show
          Vlas Voloshin added a comment - Not actually, no need to strip one directory using -p1 So I think the best way is to unzip the patch anywhere you like, cd to that directory and use: patch -d /path/to/the/moodle -p0 < qandaforum.patch , where /path/to/the/moodle is, obviously, your path to moodle directory
          Hide
          Vlas Voloshin added a comment -

          I've updated the patch to fix a little error and remove one unnecessary database query for each post. The new one is called qandaforum2.patch.
          If you applied my previous patch, you should first replace your /mod/forum/lib.php file to that from the standard build, or reverse apply that patch. Use -p0 when applying my patches.

          Show
          Vlas Voloshin added a comment - I've updated the patch to fix a little error and remove one unnecessary database query for each post. The new one is called qandaforum2.patch. If you applied my previous patch, you should first replace your /mod/forum/lib.php file to that from the standard build, or reverse apply that patch. Use -p0 when applying my patches.
          Hide
          Susan Mangan added a comment -

          Can anyone help me understand this patch, what it does and how to apply it? I am running v. 1.8.6 (soon to be 1.8.8).

          Other problems I have found with the Q&A forum (in addition to being able to edit) are:

          • student can delete posts
          • students subscribe to the forum which sends them emails of everyone's posts .. defeating the purpose
          • students often mistakenly add a new Question rather than reply to the Question

          To over-come this limitation with the Q&A forum I am strongly recommending instructors set their post-threshold to 1 post in 1 week and this will disable the editing of posts, but only for one week, strongly recommend they set subscriptions to 'not allowed' and I have also created a custom role to apply to this forum that disables the deletion of posts and removes the Add a new Question button. works like a charm but hard to enforce!!!

          Show
          Susan Mangan added a comment - Can anyone help me understand this patch, what it does and how to apply it? I am running v. 1.8.6 (soon to be 1.8.8). Other problems I have found with the Q&A forum (in addition to being able to edit) are: student can delete posts students subscribe to the forum which sends them emails of everyone's posts .. defeating the purpose students often mistakenly add a new Question rather than reply to the Question To over-come this limitation with the Q&A forum I am strongly recommending instructors set their post-threshold to 1 post in 1 week and this will disable the editing of posts, but only for one week, strongly recommend they set subscriptions to 'not allowed' and I have also created a custom role to apply to this forum that disables the deletion of posts and removes the Add a new Question button. works like a charm but hard to enforce!!!
          Hide
          Susan Mangan added a comment -

          OOPS. don't ask me why I didn't notice the 2 entries below my last entry ...I was looking at the Change History thinking.. where did the comments go?? sorry ..... :-|

          Show
          Susan Mangan added a comment - OOPS. don't ask me why I didn't notice the 2 entries below my last entry ...I was looking at the Change History thinking.. where did the comments go?? sorry ..... :-|
          Hide
          Lu Pa added a comment -

          I apllied the patch2 and then my forntpage has a tag like this instead a name: [[modulenameplural]]
          And then when I click all tags:

          [[generalforums]]
          [[forumtt]] Descripción [[discussions]] [[subscribed]]
          naad 1 No

          [[ttsetadmin]]

          [[planadmin]]

          [[reboard]]

          Show
          Lu Pa added a comment - I apllied the patch2 and then my forntpage has a tag like this instead a name: [ [modulenameplural] ] And then when I click all tags: [ [generalforums] ] [ [forumtt] ] Descripción [ [discussions] ] [ [subscribed] ] naad 1 No [ [ttsetadmin] ] [ [planadmin] ] [ [reboard] ]
          Hide
          Vlas Voloshin added a comment -

          Are you sure you're using the default forum module? Some of the string tags you've mentioned are not in default string list, though some of them are. qandaforum2.patch neither does any changes to language strings files nor to the way they're used, and I've checked my test installation forum, it works normal.
          The patch itself though might install with some problems or not install at all, as it was made on old base code. I can refresh the patch, but you would need to reverse apply that qandaforum2.patch first. Please make sure your problems are not caused by some other changes in code and that you're using the default forum module. I would need some extra information to help you further

          Show
          Vlas Voloshin added a comment - Are you sure you're using the default forum module? Some of the string tags you've mentioned are not in default string list, though some of them are. qandaforum2.patch neither does any changes to language strings files nor to the way they're used, and I've checked my test installation forum, it works normal. The patch itself though might install with some problems or not install at all, as it was made on old base code. I can refresh the patch, but you would need to reverse apply that qandaforum2.patch first. Please make sure your problems are not caused by some other changes in code and that you're using the default forum module. I would need some extra information to help you further
          Hide
          Vlas Voloshin added a comment -

          Ah, I finally understood what page you're looking at
          Those unknown for me strings are from some block as I may guess. But I still don't understand what would cause such problems... You should try checking your language settings and language pack if those tagged strings exist in forum.php string list - such tagged strings are shown if moodle can't find those strings in neither current nor fallback (en_UTF8) language pack. If they are in place, try reverse-applying the patch to see if it helps. If not, I'd recommend restoring /mod/forum/lib.php file from the moodle distributive you have installed, but that would delete all other changes to that file if you have any.

          Show
          Vlas Voloshin added a comment - Ah, I finally understood what page you're looking at Those unknown for me strings are from some block as I may guess. But I still don't understand what would cause such problems... You should try checking your language settings and language pack if those tagged strings exist in forum.php string list - such tagged strings are shown if moodle can't find those strings in neither current nor fallback (en_UTF8) language pack. If they are in place, try reverse-applying the patch to see if it helps. If not, I'd recommend restoring /mod/forum/lib.php file from the moodle distributive you have installed, but that would delete all other changes to that file if you have any.
          Hide
          Lu Pa added a comment -

          I solved the strange caracters by reinstalling our productivity-server's moodle on the testing-server and seems to work well !

          Thanks !

          Show
          Lu Pa added a comment - I solved the strange caracters by reinstalling our productivity-server's moodle on the testing-server and seems to work well ! Thanks !
          Hide
          Steve Bond added a comment -

          Vlas' patch is very neat, but I'm not sure that it's very user-friendly when the edit period is 30 minutes. Students, having posted their reply, will be annoyed to find they have to drum their fingers for 30 mins before seeing the other answers, and may forget to come back if they leave it for later. Of course we can change the editing period to a lower time, but that would affect the whole site, which may not be desirable.

          I think perhaps this forum type should have a separately-configurable editing time. Or maybe a better answer is simply to disallow editing altogether on this type of forum?

          Steve

          Show
          Steve Bond added a comment - Vlas' patch is very neat, but I'm not sure that it's very user-friendly when the edit period is 30 minutes. Students, having posted their reply, will be annoyed to find they have to drum their fingers for 30 mins before seeing the other answers, and may forget to come back if they leave it for later. Of course we can change the editing period to a lower time, but that would affect the whole site, which may not be desirable. I think perhaps this forum type should have a separately-configurable editing time. Or maybe a better answer is simply to disallow editing altogether on this type of forum? Steve
          Hide
          Michael Spall added a comment -

          I have started a discussion about solutions for this issue here:
          http://moodle.org/mod/forum/discuss.php?d=137854#p601643

          I see three general solutions to this. Hopefully #3 could be a solution that combines the first two ideas.

          Potential fixes
          1. Don't allow students to edit or delete Q&A posts.
          Solves the problem but students might be surprised by this since it is different than other forums. Students may legitimately be using the editing time to find last second errors.

          2. Don't allow students to see other's posts until they are no longer able to edit or delete their post.
          The plus side is that the logic for whether the student can edit their own post is already there. The downside is that it would slow down the Q&A forum process, especially in the cases where students were to reply to other student's answers.

          3. Use Solution 2, but add a student option that ends the editing/deleting period for the post. This could be when the post is created similar to where the 'Mail now' option for teachers is and/or after posting next to the edit and delete options for a post.

          Show
          Michael Spall added a comment - I have started a discussion about solutions for this issue here: http://moodle.org/mod/forum/discuss.php?d=137854#p601643 I see three general solutions to this. Hopefully #3 could be a solution that combines the first two ideas. Potential fixes 1. Don't allow students to edit or delete Q&A posts. Solves the problem but students might be surprised by this since it is different than other forums. Students may legitimately be using the editing time to find last second errors. 2. Don't allow students to see other's posts until they are no longer able to edit or delete their post. The plus side is that the logic for whether the student can edit their own post is already there. The downside is that it would slow down the Q&A forum process, especially in the cases where students were to reply to other student's answers. 3. Use Solution 2, but add a student option that ends the editing/deleting period for the post. This could be when the post is created similar to where the 'Mail now' option for teachers is and/or after posting next to the edit and delete options for a post.
          Hide
          Ray Lawrence added a comment -

          Steve has a good point (21/Nov/09 01:31 AM).

          A separate editing time for this forum type would be overly complex imo and whatever time was used it wouldn't be a good for everyone so the issue remains largely unresolved by a fixed duration.

          Perhaps better would be a "See other posts now" option for students that enables them to view other posts at a time that suits them individually (within the default editing period for the site.

          Feedback to me is that this forum type would be most useful if this issue could be resolved. Disabling deletion of the initial post would suit most users needs in the short term I believe.

          Show
          Ray Lawrence added a comment - Steve has a good point (21/Nov/09 01:31 AM). A separate editing time for this forum type would be overly complex imo and whatever time was used it wouldn't be a good for everyone so the issue remains largely unresolved by a fixed duration. Perhaps better would be a "See other posts now" option for students that enables them to view other posts at a time that suits them individually (within the default editing period for the site. Feedback to me is that this forum type would be most useful if this issue could be resolved. Disabling deletion of the initial post would suit most users needs in the short term I believe.
          Hide
          Susan Mangan added a comment -

          Is there any way to force 'subscriptions not allowed' on this as well? The crafty student will subscribe and receive email copies of student posts before he/she posts his/her answer.

          Show
          Susan Mangan added a comment - Is there any way to force 'subscriptions not allowed' on this as well? The crafty student will subscribe and receive email copies of student posts before he/she posts his/her answer.
          Hide
          Ray Lawrence added a comment -

          There's more to getting this right than meets the eye! Having read Susan's comment I realised that that's another issue to consider.

          I would say that forcing no subscriptions in the way described is too prescriptive for the wide variety of potential use cases - the person setting up the forum needs control over this imo.

          Suppressing forum emails to those who have not yet seen posts of others at the discussion on the site would appear to be a useful addition.

          However this forum type is eventually set up, if students are intent on discussing earlier posts there are many other ways they can do so.

          Show
          Ray Lawrence added a comment - There's more to getting this right than meets the eye! Having read Susan's comment I realised that that's another issue to consider. I would say that forcing no subscriptions in the way described is too prescriptive for the wide variety of potential use cases - the person setting up the forum needs control over this imo. Suppressing forum emails to those who have not yet seen posts of others at the discussion on the site would appear to be a useful addition. However this forum type is eventually set up, if students are intent on discussing earlier posts there are many other ways they can do so.
          Hide
          Charles Kelly added a comment -

          Shouldn't the default behavior for "Q and A Forum" be that a student is not allowed to see other students' "answers" until his editing time is over?

          It's July 2010, and this problem was originally brought up in 2007.

          Vlas Voloshin seems to have developed a patch to correct this problem.
          It seems that someone could include this fix, perhaps with a little editing, into the standard Moodle distribution.

          I notice the priority level is already set to "critical."

          Show
          Charles Kelly added a comment - Shouldn't the default behavior for "Q and A Forum" be that a student is not allowed to see other students' "answers" until his editing time is over? It's July 2010, and this problem was originally brought up in 2007. Vlas Voloshin seems to have developed a patch to correct this problem. It seems that someone could include this fix, perhaps with a little editing, into the standard Moodle distribution. I notice the priority level is already set to "critical."
          Hide
          Michael Blake added a comment -

          Martin, what are you thoughts on this issue? It's been around for a couple of years now, there has been various points of view given, yet no solution or even consensus on what to do to prevent users looking at other posts. An MP is reporting that it's becoming an issue for their clients.

          Show
          Michael Blake added a comment - Martin, what are you thoughts on this issue? It's been around for a couple of years now, there has been various points of view given, yet no solution or even consensus on what to do to prevent users looking at other posts. An MP is reporting that it's becoming an issue for their clients.
          Hide
          Charles Fulton added a comment -

          I've attached a supplemental patch (designed to be used with the main patch) which stops a subscribed user from receiving an email if they haven't yet posted to the discussion.

          Show
          Charles Fulton added a comment - I've attached a supplemental patch (designed to be used with the main patch) which stops a subscribed user from receiving an email if they haven't yet posted to the discussion.
          Hide
          Derek Chirnside added a comment -

          It's now February 2011, I was just having a look to see where this issue is up to. This bug is nearly 4 years old, and pretty much is a show stopper to use this type of forum.

          Charles and Michael have posted several months ago, but still nothing. Why is there a hold up in the process for this fix: Is it lack of a consensus? Too hard to fix? A matter of priorities? or??

          Show
          Derek Chirnside added a comment - It's now February 2011, I was just having a look to see where this issue is up to. This bug is nearly 4 years old, and pretty much is a show stopper to use this type of forum. Charles and Michael have posted several months ago, but still nothing. Why is there a hold up in the process for this fix: Is it lack of a consensus? Too hard to fix? A matter of priorities? or??
          Hide
          Derek Chirnside added a comment -

          Both these issues relate to the Q&A forum

          Show
          Derek Chirnside added a comment - Both these issues relate to the Q&A forum
          Hide
          Helen Foster added a comment -

          Thanks everyone for your comments and apologies for the long delay with no response.

          Setting a fix version of STABLE backlog and hoping it can be considered by the HQ team soon.

          Show
          Helen Foster added a comment - Thanks everyone for your comments and apologies for the long delay with no response. Setting a fix version of STABLE backlog and hoping it can be considered by the HQ team soon.
          Hide
          Kim Salinas added a comment -

          Even editing the permissions to not allow editing, and not allow deleting of posts in the student role isn't working in 2.0. This would be a simple way to stop students from 'cheating' in the Q & A forum.

          Show
          Kim Salinas added a comment - Even editing the permissions to not allow editing, and not allow deleting of posts in the student role isn't working in 2.0. This would be a simple way to stop students from 'cheating' in the Q & A forum.
          Hide
          Dongsheng Cai added a comment -

          PULL request submitted, thanks all!

          Show
          Dongsheng Cai added a comment - PULL request submitted, thanks all!
          Hide
          Michael Spall added a comment -

          I can't comment on PULL-375 so I will do so here. In the language string:
          $string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion and maximum editing time haven\'t passed yet.';
          it should be 'or' and not 'and':
          $string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or maximum editing time haven\'t passed yet.';

          Show
          Michael Spall added a comment - I can't comment on PULL-375 so I will do so here. In the language string: $string ['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion and maximum editing time haven\'t passed yet.'; it should be 'or' and not 'and': $string ['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or maximum editing time haven\'t passed yet.';
          Hide
          Michael Spall added a comment -

          Reading it again, the string should read:
          $string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or the maximum editing time hasn\'t passed yet.';

          Show
          Michael Spall added a comment - Reading it again, the string should read: $string ['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or the maximum editing time hasn\'t passed yet.';
          Hide
          Dongsheng Cai added a comment -

          Hi, Michael

          Thanks for pointing out the language issue, fixed.

          Regards,
          Dongsheng

          Show
          Dongsheng Cai added a comment - Hi, Michael Thanks for pointing out the language issue, fixed. Regards, Dongsheng
          Hide
          Dongsheng Cai added a comment -

          re-submitted pull request

          Show
          Dongsheng Cai added a comment - re-submitted pull request
          Hide
          Helen Foster added a comment -

          Thanks everyone for your comments and thanks to Dongsheng for fixing this issue. The fix is available in this week's Moodle 2.0.2+.

          Show
          Helen Foster added a comment - Thanks everyone for your comments and thanks to Dongsheng for fixing this issue. The fix is available in this week's Moodle 2.0.2+.

            People

            • Votes:
              58 Vote for this issue
              Watchers:
              34 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: