moodle/course:manageactivities and Folder Activity
Folder Activity upload for students achieved, but how to disable delete option?
Method
Step 1)
New role created with Permissions (inherits student role)
Activity: Folder
Add a new folder
mod/folder:addinstance
Allow
Activity: Folder
Manage files in folder module
mod/folder:managefiles
Allow
View folder content
mod/folder:view
Allow
Block
Edit a block's settings
moodle/block:edit
Prevent
View block
moodle/block:view
Allow
Manage blocks on a page
moodle/site:manageblocks
Allow
Manage activities
moodle/course:manageactivities
Not set
Step 2)
Goto the course, assign the enrolled student this new role - This will give student the capability of working with folder activity and make the "Turn on Editing button" appear.
Goto the Folder activity --> assign roles --> assign the role of teacher to that particular user, This will allow the appearance of "Edit Menu" for the folder activity when the student clicks on turn on editing.
Question:
How to limit the student to only Edit settings option of the folder activity. The student should not be able to delete, hide the activity?
Possible explored solutions on the internet:
1) Hide it the options using CSS, REJECTED, we have well versed students, they can make it visible using browser inspect mode
2) Prohibit the moodle/course:manageactivities for the new role created, REJECTED, we need to edit option so that the required students can upload files to the folder activity
I just want to remove the delete and hide option, any advice? on permissions i am missing?
or any way to catch the delete and hide action on click and give error message using moodle events? (just a guess never used them)
Thankyou for all the help