Code Monkey home page Code Monkey logo

Comments (6)

danmarsden avatar danmarsden commented on August 14, 2024

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!

from moodle-local_cohortauto.

swinster avatar swinster commented on August 14, 2024

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.

from moodle-local_cohortauto.

swinster avatar swinster commented on August 14, 2024

Does it look as if the plugin ignores helpers?

from moodle-local_cohortauto.

danmarsden avatar danmarsden commented on August 14, 2024

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.

from moodle-local_cohortauto.

swinster avatar swinster commented on August 14, 2024

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.

from moodle-local_cohortauto.

swinster avatar swinster commented on August 14, 2024

Yep - not giggling... Unfortunately, I don't really know where to start.

from moodle-local_cohortauto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.