Can new DB entries show up in "Recent Activity" block?

Can new DB entries show up in "Recent Activity" block?

by Clay Burell -
Number of replies: 12

While this similar thread wants a way for teachers to be notified of new Db entries, my need is the opposite: I want students to see new entries on the "Recent Activity" block. Right now new entries do not show for Db activity module.

I know I could tell them to search the Db descending etc, but that's less efficient than the block showing them upon login what's been added since last visit.

Any ideas on this one?

Thanks in advance~

Average of ratings: -
In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Clay,

How we did this one in the past was to set up RSS on the database and then add an RSS Feed block on the course page to pull the feed from the database... Used to work in 1.9; haven't tried in 2.x though...

HTH
Jon

Average of ratings: Useful (2)
In reply to Jon Witts

Re: Can new DB entries show up in "Recent Activity" block?

by William Lu -
Picture of Particularly helpful Moodlers

Yes, the RSS feed block works properly in any version of Moodle. I tested it and some of my Moodle courses are using it right now. They have to go in to the site to see the latest list. The benefit is the Feed can be shared site wide.

But, no email out to users, and not many people reading RSS in their devices.  It will be good if they do, then you don't have to upgrade to Moodle2.8

Average of ratings: Useful (1)
In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Itamar Tzadok -

Not supported by the Database module (requires development). You can open a tracker issue if not already.

I'm not sure that HQ can currently allocate the required resources to enhance the Database module with more than one or two small to medium features per major version. If that continues to be the case William's ever growing wish list is likely to remain mostly unfulfilled for many Moodle versions to come. I'd be happy to stand corrected, but in the meantime I continue to make my humble contribution to the Moodle project in the form of the Dataform.

The Dataform allows you to populate any of the views with any of the filters, to the course page, either in a block or in label-like resource. You can add multiple such Dataform views on the course page. You can even allow the students to interact with the entries without leaving the course page. For instance they can rate or comment on entries (ajaxed). They can add/update entries if you set the dataform view to be embedded (it will be rendered in an iframe) on the course page.

hth smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Can new DB entries show up in "Recent Activity" block?

by William Lu -
Picture of Particularly helpful Moodlers
 If that continues to be the case William's ever growing wish list is likely to remain mostly unfulfilled for many Moodle versions to come. I'd be happy to stand corrected, 

probably blush.

In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Clay Burell -

Thanks all. Interesting schizzle going on here.


I set the Db RSS Template so:

And I set the Remote RSS block up default:

And I got this, which does not read my Db RSS template at all:



So I change setting to "Display description" and it helps, but still keeps that monster block of "Full Description" which I purposely excluded from my template:

res2


I even reset the template to a simpler version, ran cron, and still get the same results. So I inspected the element and found this seeming culprit, which is Greek to me:

element

What's really weird is that it worked a short while yesterday. My head's hurting from this one. Buehler? Buehler?

A week's good vibes to anybody sharper than me on this one. tongueout

In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Clay Burell -

The plot thickens. I backed up the Db and restored it to a different class, created an RSS block, and voila--it reads my db's RSS template:

res2


Meanwhile, the exact same db on the original course still looks like this:


Out of curiosity, I inspected the element on the good one. Adding it here for comparative purposes when checked against the bad entry in the earlier post on this thread:


So now I know I can delete the old db and restore this one, and hope it works. But still, something is fishy. Would any developers want to know about this?

In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Itamar Tzadok -

It is not fishy, it is cached! smile

Try deleting or adding an entry and this should refresh the cache. The cache is refreshed in 60+ seconds intervals only if the feed content changes. smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Can new DB entries show up in "Recent Activity" block?

by Clay Burell -

Oy. Freaking. Vay. I laugh as I type at the consequences of not understanding basic geeky things like cache!

Thanks, Itamar!

In reply to Clay Burell

Re: Can new DB entries show up in "Recent Activity" block?

by Catherine Mclean -

Hi Clay

Sorry to be really thick but how did you add your Database RSS so that it appeared in the block settings / feed list? 



Do I just use the URL of the database? Or the RSS template? 

Many thanks

Catherine

In reply to Catherine Mclean

Re: Can new DB entries show up in "Recent Activity" block?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Catherine,

For details of how to obtain an RSS feed, please see the section 'Enabling an RSS feed of recently added entries' in the Using Database documentation. Please shout if anything is unclear.

In reply to Helen Foster

Re: Can new DB entries show up in "Recent Activity" block?

by Catherine Mclean -

Thanks Helen, that has worked. For some reason, the documentation  page with the Database settings on that I was looking at, didn't include the chapter on RSS feeds. It was for Moodle 2.9 though which is why I was perplexed.

Anyway, all sorted now. 

Thanks again.

Catherine

In reply to Catherine Mclean

Re: Can new DB entries show up in "Recent Activity" block?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Glad to hear you've got things sorted Caroline. smile

I actually just added the section about enabling an RSS feed to the documentation in response to your post. I added it to the 2.9 and 2.8 docs, and have now added it back to the 2.6 docs, since it's not a new feature.