Learn icon indicating copy to clipboard operation
Learn copied to clipboard

Added course duration per request from #3226

Open rjekic opened this issue 5 months ago • 2 comments

I've added a course duration field and made it part of the sidebar meta fields block. I am aware that there is a Learning Duration block already created (I used part of the code from that block), but if we add that block to the single course template, it will be displayed even if the duration meta field in the course settings sidebar is not populated.

@jonathanbossenger @devmuhib009

rjekic avatar Jul 11 '25 07:07 rjekic

if we add that block to the single course template, it will be displayed even if the duration meta field in the course settings sidebar is not populated.

I hope you don't mind my asking, but I'm interested in understanding the use case for having a fallback. Why would we not just use the Duration in hours field?

jonathanbossenger avatar Jul 13 '25 17:07 jonathanbossenger

@jonathanbossenger

In my previous comment, I was comparing the difference between using the Learning Duration block (which we are currently using) and the code I added in this PR. Both of them are using data from the Duration in hours field; however, if the field is not populated, the block will still be visible on the frontend, and the code I added in the PR will not be visible in that specific case.

rjekic avatar Jul 14 '25 06:07 rjekic