Cannot display own image in customized course format

Cannot display own image in customized course format

by Tobias Mai -
Number of replies: 3

Hi,

I have the following problem and wasn't able to find any solution so far.

I have customized the scorm course format and everything went well, except I am not able to display any non-standard images. So far I've learnded it could work with something like

$OUTPUT->pix_url('imagename', 'fromat_name')

and the image ist placed in the course format directory in a subdir "pix".

What did I miss?

 

regards,

Tobias

Average of ratings: -
In reply to Tobias Mai

Re: Cannot display own image in customized course format

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Tobias,

What you have looks sound to me and I'm not sure why it is not working.  Perhaps pose the question on the developer forum?

But I use an inclusion of a css file in my format to use my custom graphics instead, i.e.:

 

<style type="text/css" media="screen">/* <![CDATA[ */    @import url(<?php echo $CFG->wwwroot ?>/course/format/topcoll/topics_collapsed.css);/* ]]> */</style>

And the css file contains:

background: transparent url(arrow_down.png) no-repeat 5px 45%;

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Cannot display own image in customized course format

by Tobias Mai -

What I forgot to mention was: I am using Moodle 2.

I will follow your advice and ask in the developer forum. Thanks for the help!

 

regards

Tobias

In reply to Tobias Mai

Re: Cannot display own image in customized course format

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Tobias,

No problem, I figured as such as pix_url is a Moodle 2 thing.

Cheers,

Gareth