Posts made by Urs Hunkler

Picture of Core developers

The convenient SCSS compilers are written in C/C++ because the task is demanding. So it's no wonder that a PHP implementation takes very long. I will see if I can develop a »hack« to use a fast SCSS process instead for the work on the design. Iterative work on the theme will not be possible with the Moodle PHP SCSS compiling because each iterative step would take minutes - and there are many steps in the process.

Has anybody developed a way to use SCSS that is compiled fast? My basic idea is to compile the SCSS externally and include the resulting CSS file in the theme.

Picture of Core developers

After a lot of deep core code debugging I discovered that the treepostprocessor called in the function post_process($css) in outputlib.php is the reason for the extreamly slow CSS generation. When I disable the treepostprocessor in the theme config.php the CSS generation is fast again.

$THEME->csstreepostprocessor = null;

What does the treepostprocessor in Moodle do?

Average of ratings: Useful (3)
Picture of Core developers

Thanks for this information Damyon. Do you know where this autocompletion multi-selection is used in Moodle where I can have a look at as a reference?

Picture of Core developers

Thanks a lot for your answer Darko.

How do you deal with such a situation where you expect that you may need a certain functionality or user interface element more than once? Do you implement it several times - just once per case - or do you try to create a more generic solution that can be used in different projects first?