I am trying to track the attendance of my learners.
Basically, each woocommerce product (course) will be assigned 12 course sessions. Each Order of a product (course) will be assigned the same 12 course sessions.
For each of the 12 course sessions, I will need to take attendance for each order (learner).
I am trying to display a view on the front end showing the following:
Under each Product to display:
1. Each course session with list of orders with an attendance form.
Eg.
Product(course): Basic Course - 3 March
Session 1:
#123 Billing First Name & Last Name - ☐ (with a checkbox to mark the attendance for the learner)
#223 Billing First Name & Last Name - ☐
#333 Billing First Name & Last Name - ☐
Session 2:
#123 Billing First Name & Last Name - ☐
#223 Billing First Name & Last Name - ☐
#333 Billing First Name & Last Name - ☐
Session 3:
#123 Billing First Name & Last Name - ☐
#223 Billing First Name & Last Name - ☐
#333 Billing First Name & Last Name - ☐
... all the way to session 12
I was following a few of the documentations on creating relationships and related posts
https://toolset.com/course-lesson/displaying-related-posts/#displaying-information-from-intermediary-post-types
https://toolset.com/course-lesson/displaying-related-posts/
https://toolset.com/course-lesson/many-to-many-post-relationships/
However, I realized that when I created a view via blocks, there was no prompt to select the related view in the block wizard as seen in the 4th image (speakers that are related to the current event) here https://toolset.com/course-lesson/many-to-many-post-relationships/.
The website link is as indicated above. Thank you appreciate your help with this matter.
Hi there,
Would you please give us the post types that you have created for the issue?
One thing that I see is that you expect to have the sub-item as an example of the speakers in the documentation, but showing a view for the related items work only if you have many to many relationship type. For the One to many relation, you simply can use the post Reference Field.
For more information:
https://toolset.com/course-lesson/using-post-reference-field-to-set-up-one-to-many-relationships/
Thank you.
Thanks for the reply.
Orders & Course Sessions is many to many
Orders [*] << Orders Course Sessions >> Course Sessions [*]
Attendance is the intermediary post of order-course-session
should Attendance be done as a CPT instead of the intermediary post of order and course sessions?
Hi there,
Ok if while you created the Many to Many relationships you selected the checkbox that I annotated in the attached screenshot then you already have the attendance post type.
If not, please recreate the relationship to have the post type. Then add a view to show the courses,
Inside that view add another view to show the sessions,
and inside that add a view to show the attendance, this time, because you selected the checkbox in the relationship you will have the intermediary post type (attendance) to select from in the content section of the view.
Finally, inside the attendance view add whatever info that you need.
Thank.
Thanks for this. Could you help break down the steps here:
and inside that add a view to show the attendance, this time, because you selected the checkbox in the relationship you will have the intermediary post type (attendance) to select from in the content section of the view.
Hi there,
The bottom line is that you need to have the attendance post type in the many-to-many relationship.
Then when you add the page you will do as follows:
- Add a view and select it to show the orders.
- Inside the items that need to be added, for example, add a Single Field to show the title of the order.
- Below the title add another view.
- In this child view select the sessions post type.
- In the items of the post type add a single field and show the title of the post type for example.
- Below the single field add another view.
- In the grandchild view select the attendance post type.
- In the single field of the attendance post type view add the address and the title of the attendant to show something like:
#123 Billing First Name & Last Name
Please kindly consider that this needs to be done in a classic view and the block view does not support such a thing.
To enable the classic view please go to Toolset > Settings > General and under the Editing Experience section select the
Show both the legacy and Blocks interface and let me choose which to use for each item I build
option. After that, if you reload your browser you will see a new menu added under Toolset called Views where you can add classic views which support nested views functionality.
Thank you.