Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25347

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12