Hi @roico ,
I just tested this and I’m not able to duplicate the problem.
I set up 2 conditional content blocks, one that displays text if user is enrolled, and one that displays text if they are not enrolled.
It seems to be working on both the front-end and in preview, as an admin:
Are you using the most recent version of Sensei?
Is your teacher/admin user enrolled in the course in question?
If you can provide us with more information about how you created the block(s), and what you’re seeing (you can link to a screenshot) that would be super helpful.
Best,
Cena
Thread Starter
roico
(@roico)
Hi @cena,
Thank you for the answer.
I use the latest version of Sensei, yes.
Here are screenshots for the edit mode – one block not enrolled and the other block is enrolled.

The thing is, if I preview it as the teacher which it’s the admin as well, the enrolled block is not shown. I have to enroll the course with the admin user to see the enrolled content. Otherwise, I see only the block that set to not enrolled.

Maybe I am missing something…?
Thank you!
Hi @roico,
The thing is, if I preview it as the teacher which it’s the admin as well, the enrolled block is not shown. I have to enroll the course with the admin user to see the enrolled content.
This is the intended behavior of the Conditional Content block. The content on the block will show up according to the current user’s enrollment status in the course.
For previewing the content during development/testing, you can use a user switching plugin & switch to the account of a user with different enrollment status.
Thread Starter
roico
(@roico)
Hi Gaurav,
Well that’s very tiring.
How come the teacher can’t preview or test the content he added?!
Why there is no function to check if the user is an admin or a teacher?
Maybe this something you should consider adding…
Anyway,
thanks for your answer.
Hi
Thanks for your feedback. I have submitted an enhancement request to our developers for this.
You can check and follow along the development for the enhancement request here.
https://github.com/Automattic/sensei/issues/4339