Open swinster opened 3 years ago
It uses mustache templating so this page is probably a good place to look for ideas - I wonder if userdate might work: https://docs.moodle.org/dev/Templates#.7B.7B.23_userdate_.7D.7D_.28Moodle_3.3_onwards.29
I don't think we've tried anything like this before so let us know if you figure it out!
Well, I used this pattern in the Main Template section, but nothing happened:
{{#userdate}} {{ timecreated }}, %B %Y {{/userdate}}
so I then tried adding spaces:
{{ #userdate }} {{ timecreated }}, %B %Y {{ /userdate }}
Which resulted in a cohort:
1605290540, %B %Y
Obviously, the epoch time and string literals, so the helper syntax must be incorrect.
Just as a look/see (as per the other helper documentation) I also tried:
{{# userdate }} {{ timecreated }}, %B %Y {{/ userdate }}
But again, nothing.
I looked at the "Replace array" but it simply looks to use a static text pattern.
Does it look as if the plugin ignores helpers?
sounds like it - you might need to look to see how Moodle adds those helpers to the templates and see if you can hack that into the way the plugin manages templates.
I suspect this is beyond what I would be able to achieve :(.
Just for a giggle, I might look at the code, but this is not really my area.
Yep - not giggling... Unfortunately, I don't really know where to start.
Hi,
I guess the field to reference is
{{ timecreated }}
, but then I'm not entirely sure how.What is required is to create cohorts based on Month or bi-min they were created e.g.:
etc
Some pointesr would be awsome