Closed mohamedmohamedatia closed 2 years ago
Hi @mohamedmohamedatia ,
Thank you for taking the time to report this. Using the information you provided, I was able to reproduce the issue. I will look into it when I have a chance. However, in the meantime, please note:
Date formats similar to "%d %B %Y, %I:%M %p" may work but they are unsupported at this time. During development, I noticed these often caused problems with content that followed.
It is not ideal but, if you put the coursestartdate and courseenddate in two separate fields, it seems to work.
Hope this helps for now. I will let you know once this issue has been resolved.
Best regards,
Michael
Thank you, for your reply, I really liked your plugin it is very very useful, I recently knew about it, a couple of months ago and we now use it in all-new courses. and we will try in the main menu as well, but I guess it is not working in the user menu, I will check it again and will report it if it is not working.
you are correct when I use start date alone or end date alone it works perfectly, I will use your advice and will not use this format "%d %B %Y, %I:%M %p" anymore, I will update my template.
Regards
Hi @mohamedmohamedatia
Whether it works in the various menus really depends on the theme. If it doesn't work user menu, I suggest you ask the author do the same to fix it by passing the content through the output API functions. More information is available in the README.md file.
Best regards,
Michael
Hi @mohamedmohamedatia
I think I have the issues with the date/time-related tags fixed. This includes the following tags:
This fix addresses the issues described in #166 , #168 and #191 including cutting off of text and multiple instances of these tags not appearing or not being processed correctly.
The fix has been pushed to the code here on GitHub for now. If you have a chance, I would appreciate it very much if you would try it out and let me know if it works properly for you. If it does, I will include the fix in the upcoming release of FilterCodes on Moodle.org.
Best regards,
Michael
I am closing this issue with the assumption that it is all working now as there has been no feedback for over a month. If there is a problem, please open a new issue and mention issue #166.
Best regards,
Michael
when I tried to put any text after the start date code the text is trimmed for example I tried to enter all below codes in a custom course field and in an activity description I got the result "Held from Wednesday, 8 September 2021" however the correct should be "Held from Wednesday, 8 September 2021 to Thursday, 8 September 2021"
Held from {coursestartdate strftimedaydatetime} to {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate strftimedatemonthabbr} to {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate strftimedaytime} to {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate strftimerecentfull} to {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate strftimedaydate} to {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate %d %B %Y, %I:%M %p} to {courseenddate %d %B %Y, %I:%M %p}
Note this is fr the start date only, the end date is working fine for example I used the below and the result is as expected To {courseenddate %d %B %Y, %I:%M %p} Held from {coursestartdate %d %B %Y, %I:%M %p} and the result is To 9 September 2021, 3:00 PM Held from Wednesday, 8 September 2021 which is correct