Configurable reports block (add-on)

 
 
Picture of James Henestofel
Trouble creating custom template
 

I've been trying to create a custom template similar to what it shows in the docs here

http://docs.moodle.org/24/en/Configurable_reports#Templates

The editor keeps changing what I'm putting in for the html and auto formatting it the way it wants.  Is there any way to either turn off tinymce for this or stop it from changing what I'm putting in there.

This could all be solved if it were possible to perform the query here.

http://docs.moodle.org/24/en/ad-hoc_contributed_reports#Courses_that_are_defined_as_using_GROUPs

in the concat function the string contains a ? which produces an error because I'm assuming its thinking I need to provide a parameter for the query.  I've tried escaping it to no avail.  I tried to insert the html entity (hex) for the question mark but it doesn't allow semi-colons.

 
Average of ratings: -
Picture of eric christopher
Re: Trouble creating custom template
 

Same with me

I also has that problem and still not solve

even the example not working

 

 
Average of ratings: -
Picture of James Henestofel
Re: Trouble creating custom template
 

The docs seem to have quite a few things that don't actually work as far as templating example and saying that any of those ad-hoc examples will work.

 
Average of ratings: -
Picture of Valery Fremaux
Re: Trouble creating custom template
Group Particularly helpful Moodlers

no way to pass through !

the faulty function is

public function fix_sql_params($sql, array $params=null){

}

in lib/dml/moodle_database.php

at line §761, query place holders are counted like this :

        $q_count     = substr_count($sql, '?');

Thus without any type of escaping detection for question mark.

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Trouble creating custom template
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Right. You just have to deal with it. Escape the ? as CHR(63) in the query, and use string concatentation.

 
Average of ratings: -