Blocks: CUL Activity Stream Block

Maintained by Picture of Amanda DoughtyAmanda Doughty
A block that displays a feed containing the latest moodle messages. Part of the CUL Activity Stream suite.
42 sites
8 fans
Current versions available: 3

Activity stream block

The block has a dependency on moodle-message_culactivity_stream which creates and populates the table it uses.

The block selects and displays a list of the users messages from the table {message_culactivity_stream}. Each message includes a link to view the notification subject and one to remove the message from the users feed. With JS enabled, the block checks for new notifications every 5 mins. It also appends older messages as the users scrolls down the list. If the block is displayed on the site page then all course messages are included. If the block is displayed on a course page then only course messages for the containing course are displayed.

The block identifies course messages by displaying a course image (the first image file uploaded to the course summary files area) or a gravatar (if the course has no course image). The messages are required to include the course id for this to work. The event data sent to the message lib does not always include the course id or any useful/consistent way of identifying the course that the message originated from. If the message cannot be linked to a course id, the avatar will be the user from picture or a gravatar if none exists.

There is a core code patch for adding the course id to messages:

The block has a setting to choose a gravatar type but this will only work if the core code setting 'enablegravatar' is enabled. So in summary, the avatar for a message defaults in the following order:

Requirement - course id and image uploaded to course summary files.
1. Course image centred horizontally and vertically
Requirement - course id and 'enablegravatar' is enabled
2. Course gravatar
Requirement - course id
3. Moodle image /pix/u/f2
Requirement - user from image uploaded
4. User image
Requirement - 'enablegravatar' is enabled
5. User gravatar
6. Moodle image /pix/u/f2


This plugin is part of set CUL Activity Stream suite.


Screenshot #0


Picture of Amanda Doughty
Amanda Doughty (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of David Mudrák
    Thu, Oct 30, 2014, 8:55 PM
    See my approval comments in message_culactivity_stream
  • Picture of David Mudrák
    Thu, Oct 30, 2014, 8:57 PM
    Please provide some illustrative screenshot here, such as how the block may look in production site at the My home page. Thanks.
  • Picture of Rob Bright
    Mon, Nov 3, 2014, 2:38 PM
    I tried using this with Moodle 2.6.5 and the Essential theme. It installs fine, along with the other parts needed; however, when I add the block to the course, I am then unable to edit anything within that course. I have to remove the plugins themselves and then delete the local contents. Once this has been done, I can then edit the course again but not use this block.
  • Picture of Amanda Doughty
    Wed, Nov 5, 2014, 11:32 PM
    I have updated the git repo with a fixed version.
  • Picture of Bas Brands
    Thu, Nov 6, 2014, 12:29 AM
    Install went fine, it looks great and I could immediately see it work. Thanks for sharing your work, I am sure many will enjoy it.
    It's great to see this using YUI modules for it's JS smile
    The only tip I would have is to provide some extra installation instructions.

    Great work!
  • Picture of Rob Bright
    Thu, Nov 6, 2014, 6:37 AM
    Thanks for that, Amanda. Works a treat now. What was causing the issue?
  • Picture of Amanda Doughty
    Fri, Nov 7, 2014, 5:04 PM
    I had an inline Y.log statement. I hadn't realised that the whole line is removed from the production files when shifter creates them. So in debug mode it worked fine.
  • Picture of Amanda Doughty
    Fri, Nov 7, 2014, 5:06 PM
    Thanks Bas. I'll take that on board.
  • Picture of Graham Bowman
    Tue, Nov 11, 2014, 5:54 AM
    Hi Amanda, I've been meaning to test this block out for a while because I thinks it's a much needed addition. I'm testing it with Moodle 2.8 and it's working fine. At first I thought I had a problem when it's placed on a course page, not showing updates to from within that course, however after running the patch from it's working fine!
  • Picture of Amanda Doughty
    Tue, Nov 11, 2014, 11:22 PM
    Thank you Graham. Hopefully the patch will make it into 2.9. David Mudrak and Marina Clancy are both in support of it.
  • Picture of Jez H
    Tue, Jan 6, 2015, 6:34 AM
    Hi Amanda, many thanks for one of the coolest plugins on Moodle.Org!

    We have used it on prod in 2.7 for six months, we tested in 2.8 and I see Graham is running it in prod on 2.8 so it would be an idea to list it for those versions as well as 2.6 smile
  • Picture of Amanda Doughty
    Wed, Jan 7, 2015, 5:16 PM
    Thanks Jez and thank you for all your support and help with testing.
  • Picture of David Mudrák
    Mon, Nov 2, 2015, 5:38 PM

    I am happy to let you know this plugin received the Reviewers' choice award. Well done!

  • Ricardo Caiado
    Thu, Oct 27, 2016, 10:39 PM
    Does it work with version 3.1?
Please login to post comments