Moodle
  1. Moodle
  2. MDL-25347

No way to restrict associations of blog entries to course/modules

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.7, 2.2.4, 2.3.1
    • Fix Version/s: 2.3.2
    • Component/s: Blog
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to settings -> site administration -> appearance -> blog and check "useblogassociations"
      2. Ensure 'moodle/blog:associatemodule' and 'moodle/blog:associatecourse' are allowed at site context to the role 'authenticated user'
      3. Create / go to a course with a student, 'turn editing on' and add the 'blog menu' block
      4. Ensure 'moodle/blog:associatemodule' and 'moodle/blog:associatecourse' are allowed at the course context to the 'authenticated user' and 'student' roles
      5. Create an assignment in the course and, with edition mode turned on, view it and add an instance of the 'blog menu' block
      6. Login as a student, go to the course and click the link 'Add an entry about this course' of the 'blog menu' block
      7. Fill the form to add a blog entry associated to the course
      8. Return to the course and copy the 'Add an entry about this course' link in the clipboard
      9. Logged as an admin / teacher of the course go to the settings block of the course -> course administration -> users -> permissions, and 'Prevent' the permission 'moodle/blog:associatecourse' to 'authenticated user' and 'student' roles
      10. Logged as a student, go to the course, you SHOULD NOT be able to see the 'Add an entry about this course' link
      11. Paste the link you have copied to the clipboard, you SHOULD be able to fill the form, but you SHOULD NOT be able to see the 'Associations' section, when you save the entry you SHOULD NOT see the association to the course
      12. Return to the course and go to the assignment, click the link 'Add an entry about this Assignment' of the 'blog menu' block
      13. Fill the form to add a blog entry associated to the assignment
      14. Return to the assignment and copy the 'Add an entry about this assignment' link in the clipboard
      15. Logged as an admin / teacher of the course go to the assignment and go to settings block -> assignment administration -> permissions, and 'Prevent' the permission 'moodle/blog:associatemodule' to 'authenticated user' and 'student' roles
      16. Logged as a student, go to the course, you SHOULD NOT be able to see the 'Add an entry about this course' link
      17. Paste the link you have copied to the clipboard, you SHOULD be able to fill the form, but you SHOULD NOT be able to see the 'Associations' section, when you save the entry you SHOULD NOT see the association to the assignment
      Show
      Go to settings -> site administration -> appearance -> blog and check "useblogassociations" Ensure 'moodle/blog:associatemodule' and 'moodle/blog:associatecourse' are allowed at site context to the role 'authenticated user' Create / go to a course with a student, 'turn editing on' and add the 'blog menu' block Ensure 'moodle/blog:associatemodule' and 'moodle/blog:associatecourse' are allowed at the course context to the 'authenticated user' and 'student' roles Create an assignment in the course and, with edition mode turned on, view it and add an instance of the 'blog menu' block Login as a student, go to the course and click the link 'Add an entry about this course' of the 'blog menu' block Fill the form to add a blog entry associated to the course Return to the course and copy the 'Add an entry about this course' link in the clipboard Logged as an admin / teacher of the course go to the settings block of the course -> course administration -> users -> permissions, and 'Prevent' the permission 'moodle/blog:associatecourse' to 'authenticated user' and 'student' roles Logged as a student, go to the course, you SHOULD NOT be able to see the 'Add an entry about this course' link Paste the link you have copied to the clipboard, you SHOULD be able to fill the form, but you SHOULD NOT be able to see the 'Associations' section, when you save the entry you SHOULD NOT see the association to the course Return to the course and go to the assignment, click the link 'Add an entry about this Assignment' of the 'blog menu' block Fill the form to add a blog entry associated to the assignment Return to the assignment and copy the 'Add an entry about this assignment' link in the clipboard Logged as an admin / teacher of the course go to the assignment and go to settings block -> assignment administration -> permissions, and 'Prevent' the permission 'moodle/blog:associatemodule' to 'authenticated user' and 'student' roles Logged as a student, go to the course, you SHOULD NOT be able to see the 'Add an entry about this course' link Paste the link you have copied to the clipboard, you SHOULD be able to fill the form, but you SHOULD NOT be able to see the 'Associations' section, when you save the entry you SHOULD NOT see the association to the assignment
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-25347_master
    • Rank:
      290

      Description

      Once one site has enabled blog associations to courses/modules ($CFG->useblogassociations), the only capability being checked is 'moodle/blog:associatemodule' that works exclusively at system context.

      So, there isn't any way to prevent associations in courses/modules at all. IMO, by changing that capability to work at module/course contexts, we'll be given teachers/admins a powerful tool to allow/prevent associations at any level.

      Ciao

        Issue Links

          Activity

          Hide
          Derek Chirnside added a comment -

          I've just been looking to see if there was a tracker entry for this.
          There is a capability, http://docs.moodle.org/en/Capabilities/moodle/blog:associatecourse
          I think there needs to be these levels of visibility:

          World, Site, Course, Personal (Draft) and Teacher Only.

          How does one create a META entry here to group all the blog-related tracker items? (Like MDL-13588, MDL-25333, MDL-9877 etc)

          -Derek

          Show
          Derek Chirnside added a comment - I've just been looking to see if there was a tracker entry for this. There is a capability, http://docs.moodle.org/en/Capabilities/moodle/blog:associatecourse I think there needs to be these levels of visibility: World, Site, Course, Personal (Draft) and Teacher Only. How does one create a META entry here to group all the blog-related tracker items? (Like MDL-13588 , MDL-25333 , MDL-9877 etc) -Derek
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to stable backlog, aimed to see if those capabilities ('moodle/blog:associatemodule' and 'moodle/blog:associatecourse) should be working at other, fine grained, context levels.

          Feel free to move this to DEV_BACKLOG if won't be implemented for 2.0.x series.

          Hi Derek, a bunch of issues could be moved under one META issue as subtasks, sure, but that's one practice that we aren't using too much lately, mainly because we are working based on 1-2 weeks scrum sprints since some months ago, and areas of interest / development focus are evaluated without using METAs. Also, you always can look to the component page (for example http://tracker.moodle.org/browse/MDL/component/10095) where you can get complete info about its status and associated tasks.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to stable backlog, aimed to see if those capabilities ('moodle/blog:associatemodule' and 'moodle/blog:associatecourse) should be working at other, fine grained, context levels. Feel free to move this to DEV_BACKLOG if won't be implemented for 2.0.x series. Hi Derek, a bunch of issues could be moved under one META issue as subtasks, sure, but that's one practice that we aren't using too much lately, mainly because we are working based on 1-2 weeks scrum sprints since some months ago, and areas of interest / development focus are evaluated without using METAs. Also, you always can look to the component page (for example http://tracker.moodle.org/browse/MDL/component/10095 ) where you can get complete info about its status and associated tasks. Ciao
          Hide
          Derek Chirnside added a comment -

          OK, thanks Eloy.

          1. http://tracker.moodle.org/browse/MDL/component/10095 contains only some of the items in the tracker associated with blogs. Is 10095 a list of what is ACTUALLY being worked on? Or a list of issues that have been noticed and is not a complete list yet?

          2. Where do you go to find out what scrum sprints are on? And ones that are planned?
          I'm trying to balance my needs (course level blog like entities) and corperate Moodle needs where blogs are concerned (I cannot find any real information about this)
          In other words, where is this item (MDL-25347) in the scheme of things, or is it so far down the list (or not even on the list) and I should start looking for a cludge/workaround now?

          3. If you are not using META to group items what are you using?

          -Derek

          Show
          Derek Chirnside added a comment - OK, thanks Eloy. 1. http://tracker.moodle.org/browse/MDL/component/10095 contains only some of the items in the tracker associated with blogs. Is 10095 a list of what is ACTUALLY being worked on? Or a list of issues that have been noticed and is not a complete list yet? 2. Where do you go to find out what scrum sprints are on? And ones that are planned? I'm trying to balance my needs (course level blog like entities) and corperate Moodle needs where blogs are concerned (I cannot find any real information about this) In other words, where is this item ( MDL-25347 ) in the scheme of things, or is it so far down the list (or not even on the list) and I should start looking for a cludge/workaround now? 3. If you are not using META to group items what are you using? -Derek
          Hide
          David Monllaó added a comment -

          Hi,

          I've changed the permission checkings to check capabilities at course and module level instead of system level. If there associations for a concrete context and the teacher prevents the associations afterwards, these associations remains visible. Submitting for peer review

          Show
          David Monllaó added a comment - Hi, I've changed the permission checkings to check capabilities at course and module level instead of system level. If there associations for a concrete context and the teacher prevents the associations afterwards, these associations remains visible. Submitting for peer review
          Hide
          Jason Fowler added a comment -

          code seems good David

          Show
          Jason Fowler added a comment - code seems good David
          Hide
          Dan Poltawski 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

          Show
          Dan Poltawski 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
          Hide
          David Monllaó added a comment -

          Pull branches rebased

          Show
          David Monllaó added a comment - Pull branches rebased
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday.

          This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody.

          This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P

          Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday. This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody. This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao
          Hide
          David Monllaó added a comment -

          Hi Eloisete! Pull branches rebased

          Show
          David Monllaó added a comment - Hi Eloisete! Pull branches rebased
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Aha, so it's not possible to associate existing entries to courses or modules. What a limited thing.

          Aha2, so the blogs block is required in order to be able to blog about modules (but courses allow it from the navigation block). Inconsistent.

          Aha3, it would be amazing to have one "Blog about this" link everywhere (perhaps controlled with one "promote course/module blogging" $CFG setting or so. To be shown automatically in all the possible contexts...

          Anyway, your changes look spotty, so integrating... feel free to make whatever you want with the 3 "ahas" above (new issues, ignore, whatever...).

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Aha, so it's not possible to associate existing entries to courses or modules. What a limited thing. Aha2, so the blogs block is required in order to be able to blog about modules (but courses allow it from the navigation block). Inconsistent. Aha3, it would be amazing to have one "Blog about this" link everywhere (perhaps controlled with one "promote course/module blogging" $CFG setting or so. To be shown automatically in all the possible contexts... Anyway, your changes look spotty, so integrating... feel free to make whatever you want with the 3 "ahas" above (new issues, ignore, whatever...). Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been changed to "improvement" type (from bug).

          So has been integrated in 23_STABLE (because it's recent-recent) and master. No way for this to land into older branches.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - This has been changed to "improvement" type (from bug). So has been integrated in 23_STABLE (because it's recent-recent) and master. No way for this to land into older branches. Ciao
          Hide
          Michael de Raadt added a comment -

          Test result: Success!

          Tested in 2.3 and master with MySQL.

          I noted that there is still a link to "Blog about this...(course,assignment,etc.)" on the blog page with a courseid or modid. He is raising an issue about this minor bug.

          Show
          Michael de Raadt added a comment - Test result: Success! Tested in 2.3 and master with MySQL. I noted that there is still a link to "Blog about this...(course,assignment,etc.)" on the blog page with a courseid or modid. He is raising an issue about this minor bug.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility!

          Many thanks for your collaboration, yay!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility! Many thanks for your collaboration, yay! Closing, ciao
          Show
          Helen Foster added a comment - Removing docs_required label as documentation now available: http://docs.moodle.org/en/Blog_settings http://docs.moodle.org/en/Capabilities/moodle/blog:associatecourse http://docs.moodle.org/en/Capabilities/moodle/blog:associatemodule

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: