CUL Activity Stream Block

Blocks ::: block_culactivity_stream
Maintained by Amanda Doughty
A block that displays a feed containing the latest moodle messages. Part of the CUL Activity Stream suite.
Latest release:
23 sites
84 downloads
9 fans
Current versions available: 6

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: https://tracker.moodle.org/browse/MDL-47162

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

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Show comments
  • Rob Bright
    Thu, 6 Nov 2014, 6:37 AM
    Thanks for that, Amanda. Works a treat now. What was causing the issue?
  • Amanda Doughty
    Fri, 7 Nov 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.
  • Amanda Doughty
    Fri, 7 Nov 2014, 5:06 PM
    Thanks Bas. I'll take that on board.
  • Graham Bowman
    Tue, 11 Nov 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 https://tracker.moodle.org/browse/MDL-47162 it's working fine!
  • Amanda Doughty
    Tue, 11 Nov 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.
  • Jez H
    Tue, 6 Jan 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
  • Amanda Doughty
    Wed, 7 Jan 2015, 5:16 PM
    Thanks Jez and thank you for all your support and help with testing.
  • David Mudrák
    Mon, 2 Nov 2015, 5:38 PM

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

  • Ricardo Caiado
    Thu, 27 Oct 2016, 10:39 PM
    Does it work with version 3.1?
  • Darrel Tenter
    Tue, 8 Dec 2020, 1:06 AM
    Is this plugin still being updated?
    We've installed the suite on a 3.8 site and discovered that if the block is present in a course then the Add activity or Resource link is disabled. Remove the block and the function returns.
    We're also wondering if it's possible to use this block on the Dashboard, so that a student can see their activity stream across all of their courses in one place.
  • Amanda Doughty
    Tue, 8 Dec 2020, 2:19 AM
    Hi, yes it is still being maintained and we use it on the dashboard to show the feed for all courses. I am currently writing automated tests for the suite. I will update the code and version support as soon as that is complete.
  • Amanda Doughty
    Tue, 8 Dec 2020, 2:28 AM
    @Darrel could you log an issue in the bug tracker including the javascript error (I can give you instructions for finding the error if you need them). We have been using it on 3.8 since August with no issue so I suspect there is a clash with another third party plugin on your page.
  • Darrel Tenter
    Tue, 8 Dec 2020, 5:04 AM
    Thanks for the reply Amanda! We'll look at logging the issue in the bug tracker.

    How do you add the activity stream block to the Dashboard? We're lookin at the Default Dashboard and only have the CUL Upcoming Events block available.
  • Amanda Doughty
    Fri, 11 Dec 2020, 3:21 PM
    @Darrel I have added a new version which can be added to the dashboard. Regarding the JS error, we had this problem with other third party plugins. It was intermittent and we fixed it by fixing the AMD modules. It seemed to be caused bu a race condition as mentioned here:

    https://tracker.moodle.org/browse/MDL-65837
    https://moodle.org/mod/forum/discuss.php?d=377578#p1559908
  • Darrel Tenter
    Wed, 20 Jan 2021, 11:59 PM
    @Amanda Thanks for updating the plugin. It's working on the Dashboard now. However our customer is telling me that the block doesn't show new posts and replies from their Open Forum. But it does show when the forum was added to the course. https://moodle.org/plugins/mod_hsuforum

    Do you why that might be?
1 2
Please login to post comments