Course duplication with activity deletion restriction for Teacher participants

Course duplication with activity deletion restriction for Teacher participants

by Ashef Shahrior -
Number of replies: 2

Here's the scenario that I want to generate-

1. An admin person will create a moodle course, suppose- COURSE_X

2. Some activities will be configured inside that COURSE_X, such as - quizzes, files, etc.

3. That COURSE_X will be duplicated and a new course COURSE_X_1 be created along with all those activities and resources via webservice_api- core_course_duplicate_course

4. The admin will enroll some teacher role and student role participants in that COURSE_X_1

5. Now when TEACHER_1_COURSE_X_1 accesses that course he will be able to add or remove new activities. But he shouldn't be able to delete the preconfigured activities duplicated from COURSE_X.

How can this be accomplished via webservice api call?

Average of ratings: -
In reply to Ashef Shahrior

Re: Course duplication with activity deletion restriction for Teacher participants

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You could set up permissions on the course to support this. Have a role called something like "duplicate course teacher" that uses the "editingteacher" archetype, so will by default have all the normal teacher's permissions. After you duplicate a course, set the delete_instance capability to PROHIBIT for that role, on each existing course module. Assign this role to your teachers on the duplicate course. They will still have permission at the course level to create new activities, but on the specific course modules you have set, their permissions will be limited.

It doesn't appear that setting permissions on individual course modules is currently supported by any existing web service function, so you would have to create one to do this.

Average of ratings: Useful (1)
In reply to Mark Johnson

Re: Course duplication with activity deletion restriction for Teacher participants

by Ashef Shahrior -
Thank you for your response.