I'm new to MB and here's my newbie question.
I need to list the courses and for each one add a form for the student to attend the course.
Here is the data structure of the course.
I need to output (ideally also in the admin tables):
* All the courses, each with all their terms (including dates and places)
* All the atendees including their courses' details (course, date, place)
* Filter all the atendees for each course (acrosss all the terms)
* Filter all the atendees for individual course's term (just one term)
How to structure this situation in MB?
<h2>Option 1 - Terms as a CPT</h2>
I can use CPT for each term and then use these relationships:
* connect the term with it's parent course
* connect the term with the place
* connect the attendee with the term
Unfortunatelly it might get too complicated to manage when editing the courses. I would have to create the term separately and THEN connect it to the course via relationship selectbox. As far as I know, there's no possibility to add new CPT's posts inside other CPTs (in this case to add a new term while editing the course).
Atendee would then select the term from CPT list (which I would need to filter for each course).
<h2>Option 2 - Terms as a Cloneable Group</h2>
In this case the terms would be a part of the Course CPT as a custom field. Also I would have to use the post field to select the place, as I cannot place a relationship field to the group repeater.
This solution would be much better to manage for the admin, as he could see and create all the terms right in the course detail.
On the other hand I'm not sure if this wouldn't turn into a nighmare when querying all the views I need. I'm also not sure how could I assign the atendee to the term (now inside the group's repeater).
I also didn't manage to output the terms from the repeater to the admin table - all I can se there is a list of "Array" (but their count is correct, it respondes to the number of the terms).
Concerning the scale - there will be lower tens of courses, each with 1-5 terms, so the number of terms won't be high. On the other hand, the number of the atendees could get higher, as each term can have up to 20 students.
I apologize for quite long and complex question, but could you give me an advice and some deeper insight, especially concerning the performance?
Thank you in advance