LessonResource Position
I have a lesson resource, in the form one field called position which determinate the lesson position in the course, how to make the position field calculated automatically and the user can reorder the lesson in the table?
6 Replies
So you want to automate the ordering but have the ordering manually overridable?
Yes
And how would automatical calcualte the ordering?
This is what I need to know
Well we can't tell you the logic without knowing the parameters. You are wanting to automate something without giving any information of what should dictate automated ordering
But if you are automating it from some logic, this will likely trump the manual order when adding a new part for example
I can only think you would have an obserser and when changing if order has not changed, automate the order othwise use the set order.
Maybe have a column 'manual_order' if the observer sees the change to order it means it was done manually, else use the observer to directly change the order where manual is not != 1
Maybe I asked the question in a wrong way.
I have a lesson resource which belongs to course resource, one field of the lesson resource called position, I need to auto fill the position for each lesson depending on the last lesson position in the same course. I hope this clearly the misunderstanding