Moodle
  1. Moodle
  2. MDL-27735

Q and A forum lets students add new questions by default

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.15, 2.0.5, 2.1.2
    • Fix Version/s: 2.2
    • Component/s: Forum
    • Labels:
    • Environment:
      LAMP Debian server.
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Log in as Teacher and create a new Q&A Forum with default permissions.
      Log in as a student and go into the newly created Q&A Forum.

      make sure when login as student you don't see "Add a new question" button.
      however when login as teacher, you can see "Add a new question" button.

      Show
      Log in as Teacher and create a new Q&A Forum with default permissions. Log in as a student and go into the newly created Q&A Forum. make sure when login as student you don't see "Add a new question" button. however when login as teacher, you can see "Add a new question" button.
    • Workaround:
      Hide

      Manually override forum permissions by setting Student forum capability "Start new discussions (mod/forum:startdiscussion)" to "Prevent". Then the Q&A Forum works as advertised in Moodle docs.

      This manual permissions override fixes the problem in both Moodle 1.9.12+ and Moodle 2.0.3+.

      Setting Student forum capability "Start new discussions (mod/forum:startdiscussion)" to "Prevent" ought to be part of the default permissions whenever a Q and A forum is first created. The teacher should not have to manually override this permission.

      Show
      Manually override forum permissions by setting Student forum capability "Start new discussions (mod/forum:startdiscussion)" to "Prevent". Then the Q&A Forum works as advertised in Moodle docs. This manual permissions override fixes the problem in both Moodle 1.9.12+ and Moodle 2.0.3+. Setting Student forum capability "Start new discussions (mod/forum:startdiscussion)" to "Prevent" ought to be part of the default permissions whenever a Q and A forum is first created. The teacher should not have to manually override this permission.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      17382

      Description

      Students using a newly created Q and A forum with default settings are shown the "Add a new question" button as if they are teachers and can use that button to create their own new questions which other students can see and reply to. Having this "Add a new question" button visible for students as a default setting usually confuses both students and teachers alike, in my own hands-on teaching experience.

      In other words, the present default Q and A forum is still behaving more like a standard general forum. This behavior occurs in both Moodle 2.0.3+ (Build: 20110525) and Moodle 1.9.12+ (Build: 20110518).

      The default permissions for Q and A forums ought to prevent students from accessing the "Add a new question" button. Should a teacher then wish to give students access to the "Add a new question" button (a conceivable and reasonable variation of a Q&A forum activity), that teacher could simply override the new default to "Allow".

      These changes in default permissions would seem to me to present the Q&A forum's intended behavior to students and teachers much more clearly than do this forum type's current defaults.

      Related to MDL-19992 and maybe MDL-9376.

      Replication instructions:

      1. Log in as Teacher and create a new Q&A Forum with default permissions.
      2. Log in as a student and go into the newly created Q&A Forum.
      3. You will have access to the "Add a new question" button and you will be able to create your own new question as if you were a teacher.
      4. Other students will be able to see and respond to your created new questions.

      Very confusing for both students and teachers; not good.

        Issue Links

          Activity

          Hide
          Charles Fulton added a comment - - edited

          I think the right way to do this would be a new Q&A forum-specific capability for starting discussions. Here's a patch which does that for 1.9: https://github.com/mackensen/moodle/compare/MOODLE_19_STABLE...mdl-27735-MOODLE_19. Here's one (almost identical) for 2.1: https://github.com/mackensen/moodle/compare/mdl-27735-MOODLE_21.

          Show
          Charles Fulton added a comment - - edited I think the right way to do this would be a new Q&A forum-specific capability for starting discussions. Here's a patch which does that for 1.9: https://github.com/mackensen/moodle/compare/MOODLE_19_STABLE...mdl-27735-MOODLE_19 . Here's one (almost identical) for 2.1: https://github.com/mackensen/moodle/compare/mdl-27735-MOODLE_21 .
          Hide
          Derek Chirnside added a comment -

          Stephen, I may be wrong here, but I think there was a fix to stop the problem of students being able to see other posts during mtheir 30 minutes editing and tnen change their answers.
          Maybe April/May this year?
          Maybe there was this bug you describe introduced then.

          Show
          Derek Chirnside added a comment - Stephen, I may be wrong here, but I think there was a fix to stop the problem of students being able to see other posts during mtheir 30 minutes editing and tnen change their answers. Maybe April/May this year? Maybe there was this bug you describe introduced then.
          Hide
          Stephen Overall added a comment - - edited

          Derek:

          What I'm describing here is an issue completely separate, I believe, from the condition that in a Q&A forum type a student is prevented from seeing previous replies to questions until after posting his or her own reply plus the default editing time.

          That posting-plus-editing-time issue (see MDL-9376 "Q and A forum editing time allows students to see other posts and modify their own") was resolved March 11, 2011 (created April 16, 2007!)-- a very good and overdue resolution as that post-plus-editing-time problem disabled the Q&A forum type as a practical activity.

          Here in MDL-27735 I'm just describing the behavior that makes the "Add a new question" button available to students as a default permission. As I recall, this button behavior was also happening before MDL-9376 was resolved. I could then and still can resolve the button issue through the manual workaround I describe above. I'm simply arguing for a single change in the role permissions whenever a Q-and-A forum type is created.

          Cheers.

          Show
          Stephen Overall added a comment - - edited Derek: What I'm describing here is an issue completely separate, I believe, from the condition that in a Q&A forum type a student is prevented from seeing previous replies to questions until after posting his or her own reply plus the default editing time. That posting-plus-editing-time issue (see MDL-9376 "Q and A forum editing time allows students to see other posts and modify their own") was resolved March 11, 2011 (created April 16, 2007!)-- a very good and overdue resolution as that post-plus-editing-time problem disabled the Q&A forum type as a practical activity. Here in MDL-27735 I'm just describing the behavior that makes the "Add a new question" button available to students as a default permission. As I recall, this button behavior was also happening before MDL-9376 was resolved. I could then and still can resolve the button issue through the manual workaround I describe above. I'm simply arguing for a single change in the role permissions whenever a Q-and-A forum type is created. Cheers.
          Hide
          Stephen Overall added a comment - - edited

          BTW here's how to enable teachers to override student permissions on, for example, a Q-and-A forum in Moodle 1.9.3 onwards...

          http://docs.moodle.org/19/en/Override_permissions#Enabling_teachers_to_override_permissions

          ... but as default Q-and-A forum permissions currently exist the teacher or administrator must remember on a forum-by-forum basis to override student permission to start new discussions to make Q-and-A forums work as intended.

          Show
          Stephen Overall added a comment - - edited BTW here's how to enable teachers to override student permissions on, for example, a Q-and-A forum in Moodle 1.9.3 onwards... http://docs.moodle.org/19/en/Override_permissions#Enabling_teachers_to_override_permissions ... but as default Q-and-A forum permissions currently exist the teacher or administrator must remember on a forum-by-forum basis to override student permission to start new discussions to make Q-and-A forums work as intended.
          Hide
          Michael de Raadt added a comment -

          This seems to be a popular issue. We'll see if we can get it into the next sprint.

          Show
          Michael de Raadt added a comment - This seems to be a popular issue. We'll see if we can get it into the next sprint.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi, my 2 cents:

          1) I agree that having one 'mod/forum:startqanda' (or so) new capability is the way to handle this. Surely code should check, for 'QandA' forums this capability instead of (uhm, or perhaps together with!) the 'mod/forum:startdiscussion'. 100%.

          2) And I also think that the "default" expected value for it should be "prevent" for student and "allow" for teachers (knowing the "standard" paradigm is about teachers asking and students replying).

          3) BUT the point that worries me a bit is the change in behavior if we set that capability initially to "prevent". I can imagine sites using the 'QandA' forums in a non-statndard way (for inter-student rounds...) stopping to work "suddenly".

          4) That leads me to think that this change cannot be made in the middle of one stable release, but only in a new release (2.2?), clearly documenting in the release notes the new capability, the fact that 'mod/forum:startdiscussion' won't be controlling those forums any more - unless we make them to work together, see point 1) above -, and the change in default behavior (also, explaining the possibility to set that capability to "allow" @ system level to continue working in the previous way).

          And the conclusions after the points above:

          A) +1 for new capability.
          B) +1 to implement it in new release only .
          C) +1 to default to 'prevent' for students.
          D) TO DECIDE if the cap will work alone or together with the old one (both required to proceed).
          E) +1 to document it extensively in release notes.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi, my 2 cents: 1) I agree that having one 'mod/forum:startqanda' (or so) new capability is the way to handle this. Surely code should check, for 'QandA' forums this capability instead of (uhm, or perhaps together with!) the 'mod/forum:startdiscussion'. 100%. 2) And I also think that the "default" expected value for it should be "prevent" for student and "allow" for teachers (knowing the "standard" paradigm is about teachers asking and students replying). 3) BUT the point that worries me a bit is the change in behavior if we set that capability initially to "prevent". I can imagine sites using the 'QandA' forums in a non-statndard way (for inter-student rounds...) stopping to work "suddenly". 4) That leads me to think that this change cannot be made in the middle of one stable release, but only in a new release (2.2?), clearly documenting in the release notes the new capability, the fact that 'mod/forum:startdiscussion' won't be controlling those forums any more - unless we make them to work together, see point 1) above -, and the change in default behavior (also, explaining the possibility to set that capability to "allow" @ system level to continue working in the previous way). And the conclusions after the points above: A) +1 for new capability. B) +1 to implement it in new release only . C) +1 to default to 'prevent' for students. D) TO DECIDE if the cap will work alone or together with the old one (both required to proceed). E) +1 to document it extensively in release notes. Ciao
          Hide
          Rossiani Wijaya added a comment -

          Hi Eloy,

          Thank you for commenting.

          My +1 for creating new capability and have it for the new release.

          I Will ask other developers' opinion regarding this issue.

          Show
          Rossiani Wijaya added a comment - Hi Eloy, Thank you for commenting. My +1 for creating new capability and have it for the new release. I Will ask other developers' opinion regarding this issue.
          Hide
          Ankit Agarwal added a comment -

          Hi Rosie,
          +1 for new cap!
          But we also need to decide how this would work with the current cap, which one is supposed to have a higher priority.
          Say a user has permission mod/forum:startqanda but not mod/forum:startdiscussion should he be allowed to post in Q and A ?
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Rosie, +1 for new cap! But we also need to decide how this would work with the current cap, which one is supposed to have a higher priority. Say a user has permission mod/forum:startqanda but not mod/forum:startdiscussion should he be allowed to post in Q and A ? Thanks
          Hide
          Charles Fulton added a comment -

          I think it makes sense for the three capabilities (news, qanda and the general discussion) to be separate from each other. In effect, we have mod/forum:startdiscussion when no finer-grained permission is available.

          The links I posted in June are broken (and would be outdated anyway) so here's new patches for 1.9 (https://github.com/mackensen/moodle/compare/MOODLE_19_STABLE...MDL-27735-19) and 2.2dev (https://github.com/mackensen/moodle/compare/master...MDL-27735-22). I'm not sure if that's the right way to handle a version bump for a module.

          Show
          Charles Fulton added a comment - I think it makes sense for the three capabilities (news, qanda and the general discussion) to be separate from each other. In effect, we have mod/forum:startdiscussion when no finer-grained permission is available. The links I posted in June are broken (and would be outdated anyway) so here's new patches for 1.9 ( https://github.com/mackensen/moodle/compare/MOODLE_19_STABLE...MDL-27735-19 ) and 2.2dev ( https://github.com/mackensen/moodle/compare/master...MDL-27735-22 ). I'm not sure if that's the right way to handle a version bump for a module.
          Hide
          Rossiani Wijaya added a comment -

          Hi Charles,

          Thank you for supplying the patch. I also has a similar patch to create new capability.

          submitting this for peer review.

          Show
          Rossiani Wijaya added a comment - Hi Charles, Thank you for supplying the patch. I also has a similar patch to create new capability. submitting this for peer review.
          Hide
          Ankit Agarwal added a comment - - edited

          Hi Rosie,
          Looks good to me.
          The only thing that I am not sure about is if this should be introduced in stables or not.
          And if we are introducing this in stable, shouldn't Admins should be notified during upgrade about a new cap..and prompt them to configure it?
          Also the changes should be documented in the docs I guess.
          Thanks

          Show
          Ankit Agarwal added a comment - - edited Hi Rosie, Looks good to me. The only thing that I am not sure about is if this should be introduced in stables or not. And if we are introducing this in stable, shouldn't Admins should be notified during upgrade about a new cap..and prompt them to configure it? Also the changes should be documented in the docs I guess. Thanks
          Hide
          Rossiani Wijaya added a comment -

          Thanks Ankit for reviewing.

          I'm removing patch for stable version and make it available only for master.

          Integrator please let me know if this needs to be backported to stable also.

          submitting for integration review.

          Show
          Rossiani Wijaya added a comment - Thanks Ankit for reviewing. I'm removing patch for stable version and make it available only for master. Integrator please let me know if this needs to be backported to stable also. submitting for integration review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao PS: Note this is the last message of this type that you will receive along the whole November month, because we are running continuous integration this weeks while QA tests for release of Moodle 2.2 (Dec 1st) are being performed.
          Hide
          Rossiani Wijaya added a comment -

          Patch updated.

          Show
          Rossiani Wijaya added a comment - Patch updated.
          Hide
          Aparup Banerjee added a comment -

          Rosie,
          perhaps we don't need the extra string there.

          $string['addanewquestion'] = 'Add a new question';
          +$string['addquestion'] = 'Add new question';

          also http://docs.moodle.org/21/en/Capabilities/mod/forum:addquestion could use a description

          Show
          Aparup Banerjee added a comment - Rosie, perhaps we don't need the extra string there. $string ['addanewquestion'] = 'Add a new question'; +$string ['addquestion'] = 'Add new question'; also http://docs.moodle.org/21/en/Capabilities/mod/forum:addquestion could use a description
          Hide
          Rossiani Wijaya added a comment -

          Thanks Apu,

          I updated the patch to reused the existing string. I was thinking to have some sort of consistency with the rest of capability string, but it seems like duplication of string.

          I will add some description on the docs. Thank you for the reminder

          Show
          Rossiani Wijaya added a comment - Thanks Apu, I updated the patch to reused the existing string. I was thinking to have some sort of consistency with the rest of capability string, but it seems like duplication of string. I will add some description on the docs. Thank you for the reminder
          Hide
          Aparup Banerjee added a comment -

          Thanks for the patch. Its been integrated into master only and is ready for testing.

          Show
          Aparup Banerjee added a comment - Thanks for the patch. Its been integrated into master only and is ready for testing.
          Hide
          Adrian Greeve added a comment -

          Tested and works fine.

          Show
          Adrian Greeve added a comment - Tested and works fine.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao
          Hide
          Helen Foster added a comment -

          Better late than never - we now have documentation for this new capability - http://docs.moodle.org/22/en/Capabilities/mod/forum:addquestion

          Show
          Helen Foster added a comment - Better late than never - we now have documentation for this new capability - http://docs.moodle.org/22/en/Capabilities/mod/forum:addquestion
          Hide
          Mary Cooch added a comment -
          Show
          Mary Cooch added a comment - Added clarification here http://docs.moodle.org/en/Using_Forum and here http://docs.moodle.org/en/Forum_FAQ

            People

            • Votes:
              27 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: