Like in moodle forums a if a member posts or reply some topic he/she can modify it within 30 min. Similarly i want to apply this functionality in course' sections. So that a writing teacher could not modify the contents after a week....
Pleas somebody tell how it can be accomplished....
With best wishes
1) You could write a module for Moodle that provides a new configuration setting specifying how long can a teacher edit a section within a course. This would then use a hook to prevent the specific parts of the course to be updated
2) You could create your own course format, and only display the various edit buttons only if the course section is active. This wouldn't prevent them from editing the section of the course, but hiding the buttons may be enough for your users. This could be used along with option 1.
3) Modify the course/edit_form.php and prevent the update_course function from succeeding if the section is not active.
Like I said, I am not very knowledgeable with Moodle programming, and there might be better ways of doing this.
Your suggestions has prepared me to do the changes to achieve my goal. So I have succeeded to hide all editing buttons for those those sections which are not active (Added a filed active in course_sections) by changing a condition in "course\lib.php" "where make_editing_buttons" function is called.
But now I have to check whether the current is user has admin role so that the editing icons can be shown. So again i need help to check whether current role is admin, teacher, student, or other...
Actually, teacher have the ability to to edit the contents but does not have the ability to change contents after the week.
And also when admin switch role to teacher the editing is still available for the teacher role. so i want somehow to check which role is active.
Is there any other way to do it...
I understood your point. I will try that hope this will help...