How to create a copy of a page for user editing? – Database


I have a page called course. This page has data like name, course code, etc and the data type is course

I want to create a copy of this page called course user. This page data type is course user, and one of the fields is course = course.

in the course user page, I want to be able to edit the items such as name, course code, etc. but not edit the original course. Basically, just edit a copy of the course. How can I achieve this?

Why would you need a separate page to edit the course?

Each user would have their own copy of the course. So there would be one master course, and each user would have their own version of that course that they can edit

@alex.esposito.1108

Sure but you don’t need different pages for that. Just one page and then show data dynamically. Unless the user course page varies considerably from the course page

I’d say it does vary considerably. Basically, the user page would be just have the data from the course page, but then be able to change all the content within that course.

My main concern is that currently, if I do an edit on the user page, it reflects on the master course as well. My current idea is to duplicate the course, and have a field called “Duplicated?” ticked to yes, so that I can know that this is a duplicated copy course that the user is editing. Do you think that’s a good way to go about this?

@alex.esposito.1108

Let me clarify my previous statement. If the pages vary significantly in structure/UI elements then it may make sense to have two separate pages. It doesn’t matter that they differ in content.

I can’t say for sure because I’m not familiar with the app and it’s requirements. As far as DB structure goes, you can have these as the same data type with some kind of field to signify original and copies; for example, the duplicate boolean you mention or a parent course field. You could also split them up into two datatypes. Just depends on your use case.



Source link

Leave a Comment