Quick_template and smarty issues.
Closed this issue · 6 comments
quick_template included here differs from Moodle's
This is why I don't like the idea of shared libraries.
Smarty errors
I get no query builder and the following notice:
Notice: Undefined variable: criterion in /var/www/rrusso/2x/lib/smarty3/sysplugins/smarty_internal_data.php on line 291
We recently open sourced quick_template, thus changing the library. What you may have to do here in this is remove the "compiled" template data in the template data folder. That is stored in {Moodle_data}/templates_c
.
I would not like it if any of our block that use quick_template would ship with smarty3. quick_template is also going to be a shared library in our installation, but I can see how users wanting to the install a stand alone block would get frustrated at manually finding the correct dependency.
@adamzap, this may actually be a great use case for git modules. A reference to the tagged quick_template module will be at the base of the module. What do you think?
It seems like if we're going to use git submodules in one place, we should use them everywhere, but this seems like a different and more appropriate use case than when we tried earlier.
Let's definitely investigate it
It seems like if we're going to use git submodules in one place, we should use them everywhere
I absolutely agree. I was getting excited about the possibility of git managing our shared libraries, and keeping track of our dependent versions for us.
Issues remaining
Fatal error: Call to undefined function quick_render() in /var/www/rrusso/2x/blocks/backadel/index.php on line 33
Steps I have followed already.
- I checked out the latest Quick Template from
https://github.com/lsuits/quick_template
- I copied smarty3 into
lib/
overwriting the old one - I copied
quick_template.php
intolib/
overwriting the old one - I deleted everything in
{Moodle_data}/templates_c
Anyone have any ideas?
That's a big whoops: it should be using quick_template::render
instead of quick_render