Moodle

When viewing others' blog you could see "add a new entry" link but when you click on it, it actually add to your own blog

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Blog
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

It's a little confusing, probably want to remove the "Add a new entry" when viewing other people's blogs.

Issue Links

Activity

Hide
James Ballard added a comment -

I noticed this too. I added a quick check for the userid to blog/lib.php to remove this

add line 77: $userid = optional_param('userid', 0, PARAM_INT);

edit line 94: if ($USER->id == $userid && has_capability('moodle/blog:create', $sitecontext)) {

When viewing someone else's blog userid is always passed across. I have tested this for your own blog using both profile and blog block. There isn't a test in case userid = 0.

Yours
James

Show
James Ballard added a comment - I noticed this too. I added a quick check for the userid to blog/lib.php to remove this add line 77: $userid = optional_param('userid', 0, PARAM_INT); edit line 94: if ($USER->id == $userid && has_capability('moodle/blog:create', $sitecontext)) { When viewing someone else's blog userid is always passed across. I have tested this for your own blog using both profile and blog block. There isn't a test in case userid = 0. Yours James
Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Mathieu... I think has sense to be applied from 18_STABLE to HEAD. Confirm with MD. Ciao

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Mathieu... I think has sense to be applied from 18_STABLE to HEAD. Confirm with MD. Ciao
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: