Overriding Course Format Pix Moodle 2.6.1

Overriding Course Format Pix Moodle 2.6.1

Dave Emsley -
回帖数:8

Hi There,

I've read http://docs.moodle.org/dev/Using_images_in_a_theme#Overriding_plugin_images and it all makes sense... up to a point.

I understand the format

/theme/themename/area/plugintype/pluginname/filename.gif

I'm trying to replace the close icon in the grid format so I used..

/theme/themename/pix_plugin/course/format/grid/close.gif

but that's a level too many and doesn't work.

 

Could anyone clarify please?

Cheers


Dave

回复Dave Emsley

Re: Overriding Course Format Pix Moodle 2.6.1

Mary Evans -

Hi

My first thoughts about this is that course/formats/ don't usually carry a pix directory so perhaps the initial idea of overriding icons at a lower level is perhaps a design fault either in Moodle or in the Grid format.

I know Gareth J. Barnard who made the Grid format is known for pushing the boundaries, with respect to Course Formats, so the best person to answer this is Gareth himself. It may well be that the pix needs to be in format directory.

I'll need to test this out.

Cheers

Mary

回复Mary Evans

Re: Overriding Course Format Pix Moodle 2.6.1

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Acknowledged, please give me some time to find out.

回复Gareth J Barnard

Re: Overriding Course Format Pix Moodle 2.6.1

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Two immediate things that stand out:

  1. You have a folder name of 'pix_plugin' and not 'pix_plugins' as stated in the docs.
  2. Try the path without 'course' in the path.  Because your example breaks '/theme/themename/area/plugintype/pluginname/filename.gif' so you should have '/theme/themename/pix_plugins/format/grid/close.gif'.
回复Gareth J Barnard

Re: Overriding Course Format Pix Moodle 2.6.1

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

And its 'close.png' not 'close.gif'.  What exact version of the Grid format are you using?

回复Gareth J Barnard

Re: Overriding Course Format Pix Moodle 2.6.1

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Ok, just done a quick test and you need ''/theme/themename/pix_plugins/format/grid/close.png'.

回复Gareth J Barnard

Re: Overriding Course Format Pix Moodle 2.6.1

Mary Evans -

Tested and yes this works...as you can see this needs to be moodle/theme/themename/pix_plugins/format/grid/close.png

pix_plugins

回复Mary Evans

Re: Overriding Course Format Pix Moodle 2.6.1

Gareth J Barnard -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

I've just updated http://docs.moodle.org/dev/Themes_overview#Files_and_folders as it was wrong for the folder paths.

回复Gareth J Barnard

Re: Overriding Course Format Pix Moodle 2.6.1

Dave Emsley -

Fantastic support and advices, as always, from this community.

 

Many Thanks

 

Dave Emsley