moodle 3.6: Adding a "comment" under the course resource

moodle 3.6: Adding a "comment" under the course resource

by hajar zankadi -
Number of replies: 7

Hello everyone

I hope you are doing very well

I am developing a course format plugin that extends the "topics" format and i want to add for each section's resources ( files, url, page ...) the possibility to add a comment.

the scenarios are as follow:

each enrolled student has the ability to add/reply to a comment

each enrolled  student has the ability to delete the comment

so when you check for example the section's 1 resources you will see all the different comments for the enrolled students ( if available)

the comments will be restricted for the users that are not enrolled into the course

My questions are:

1- is that possible to make changing in the code?

2- if yes, from where to start and where to change?

3- any additional information/ advice will be very appreciated 

Thank you for your help

Average of ratings: -
In reply to hajar zankadi

Re: moodle 3.6: Adding a "comment" under the course resource

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

Hello,

How about considering using the Comments block, rather than developing a new plugin? If not, perhaps you could reuse some of the comments block code?

Average of ratings: Useful (1)
In reply to Helen Foster

Re: moodle 3.6: Adding a "comment" under the course resource

by hajar zankadi -
thank you for your reply
in fact, adding a comment is only one of the many features i want to add. I want to have also the possibility to like the comment /like the resources. so is the comment block still responding to this requirements? if no, creating a new course format plugin will allow me to achieve my needs ?
Thank you again for your help
In reply to Helen Foster

Re: moodle 3.6: Adding a "comment" under the course resource

by Melissa Newman -
What does it mean by "add a comment to any page"? Does it mean that if a person says the each topic should be on separate page, that the comments will be for that specific topic? Or does she have to create a book with separate pages?

I was also wanting this feature, and I definitely would want the comments on each individual section.
In reply to Melissa Newman

Re: moodle 3.6: Adding a "comment" under the course resource

by hajar zankadi -
each section will have its own resources, let s presume that for section 1: we have a video file resource with a title and a description, we have also a url resources that have also a title and description, for section 2 : we have a book with the required elements and so on
now if we proceed to section 1 resource 1: i have my enrolled students that i want to give them the possibility to express themselves vis-a vis this resource, so they may leave a comment / like this resource, so i presume that i need to have block right below the resource that will have a comment / like button
hope i make it now very clear
In reply to hajar zankadi

Re: moodle 3.6: Adding a "comment" under the course resource

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
As Helen mentions, consider using the Comments block. You might also consider using the Hot Question plugin. It already is designed to give you most of what you are asking for. I think the oly missing thing is the ability for a user do delete a comment. It can only be done by a teacher. Plus, it allows users to add 'heat' (vote) on other users entries, so they percolate to the top of the list of entries.
Average of ratings: Useful (2)
In reply to AL Rachels

Re: moodle 3.6: Adding a "comment" under the course resource

by hajar zankadi -
Thank you for your reply
I will look and see if it will respond to my needs
Thank you again
In reply to hajar zankadi

Re: moodle 3.6: Adding a "comment" under the course resource

by Melissa Newman -
Check out the "Blocks: Course Discussion". The blocks can be for individual sections, lessons, pages, activities, etc. What is does is just create a forum topic, and then just allows the users to interact with the forum topic at a different location. That looks like it would solve my needs, although I would like the option to place it on the bottom, and I hope it can still be seen in mobile mode.