Who modified the resource?

Who modified the resource?

by Naomi Gonzales -
Number of replies: 1

I've been searching for days now on how to show who updated a resource, and not just when the resource was last modified. Knowing who updated a resource seems like it would be a common use case for Moodle, and I'm surprised it's not a setting. Am I missing something here, is there a way to do it without modifying the function that generates it? If you've done this modification, can you please provide the code snippet for it?

Here is what it says right now.
Last modified: Friday, 17 October 2008, 03:56 PM

I want it to say something like:
Last modified: Friday, 17 October 2008, 03:56 PM -  John Smith

I suspect this file "root\moodle\mod\resource\lib.php" should have something to do with it unless these are just the functions that facilitate the update.

Here is how the css identifies that part of the output. I would think that the function that generates this information should probably contain "mod-resource" somewhere.


.mod-resource .modified  {
/*CSS line 1*/
/*CSS line 2*/
}

Average of ratings: -
In reply to Naomi Gonzales

Re: Who modified the resource?

by Ann Adamcik -
You can get this information from the course logs (Administration->Reports). Select the resource you're interested in, and the Update action, and you should see who updated it, and when.

If you want the name to appear on the resource page itself, you'd have to modify the display() function for each resource type - e.g. for text pages, look in mod/resource/type/text/resource.class.php. Also, the modification date/time is stored in the mdl_resource table, but the user who made the mods is not - you'd have pull the user info. out of the mdl_log table.