Click "Add an entry about this course" and fill the form ensuring "Blog about course COURSENAME" is checked

Copy in the clipboard the URL where you are redirected, you SHOULD see a link on the upper part to add a new blog entry about this course

Logged as an admin go to the course administration -> users -> Permissions, select "Teacher" role and prevent the capability "moodle/blog:associatecourse", do the same with the "Authenticated user" role

Paste the clipboard URL in the browser, the link SHOULD NOT appear

Create a module instance of any kind and view it

Add the "blog menu" block to the module instance page

Click "Add an entry about this ACTIVITY" and fill the form ensuring "Blog about ACTIVITY ACTIVITYNAME" is checked

Copy in the clipboard the URL where you are redirected, here you SHOULD see a link on the upper part to add a new blog entry about this activity

Logged as an admin go to the course administration -> users -> Permissions, select "Teacher" role and prevent the capability "moodle/blog:associatemodule", do the same with the "Authenticated user" role

Logged as an admin enable blog associations (useblogassociations) going to the admin tree -> apparence -> blog
Logged as a teacher go to a course
Add the "blog menu" block
Click "Add an entry about this course" and fill the form ensuring "Blog about course COURSENAME" is checked
Copy in the clipboard the URL where you are redirected, you SHOULD see a link on the upper part to add a new blog entry about this course
Logged as an admin go to the course administration -> users -> Permissions, select "Teacher" role and prevent the capability "moodle/blog:associatecourse", do the same with the "Authenticated user" role
Paste the clipboard URL in the browser, the link SHOULD NOT appear
Create a module instance of any kind and view it
Add the "blog menu" block to the module instance page
Click "Add an entry about this ACTIVITY" and fill the form ensuring "Blog about ACTIVITY ACTIVITYNAME" is checked
Copy in the clipboard the URL where you are redirected, here you SHOULD see a link on the upper part to add a new blog entry about this activity
Logged as an admin go to the course administration -> users -> Permissions, select "Teacher" role and prevent the capability "moodle/blog:associatemodule", do the same with the "Authenticated user" role
Paste the clipboard URL in the browser, the link SHOULD NOT appear

Description

Viewing the list of associations between a blog entry and module instances or courses there is a link to add a new related blog entry. This link should not appear if the context doesn't allow blog associations.

To replicate the problem:

Enable blog associations to courses or modules

Go to a course or module instance and add the blog menu block

Add a new entry associated to the course or the module instance

View the entry and copy the URL to the clipboard

Remove the capability to associate courses or modules to blog entries at the course or module instance context (depending on the association you made)

If you paste the copied URL you can see the link to add a new related blog entry, that link should not appear

Activity

Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

Dan Poltawski
added a comment - 21/Oct/12 11:57 PM Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

Dan Poltawski
added a comment - 29/Oct/12 2:43 PM Hi David,
'$cantaddentries' is a negative word (I mean, it means I can NOT add entries) and we try to avoid such 'negative' flags, since they are harder to read.
But actually from the code, it looks like this should be named $canaddentries, because that is what you are testing for? In which case the variable is incorrectly named and should be a positive name.
Either way, its best if you make this a 'positive' flag.

When a teacher, adding an entry about a module, there is an error while validating the form. After pushing David's patch trying to fix this, then I don't see the link to add another entry about that module on the redirected page even though I have the capability.

Frédéric Massart
added a comment - 31/Oct/12 12:09 PM Failing this test.
When a teacher, adding an entry about a module, there is an error while validating the form. After pushing David's patch trying to fix this, then I don't see the link to add another entry about that module on the redirected page even though I have the capability.