Flashcard module add-on: Solution for styles.php Problem

Flashcard module add-on: Solution for styles.php Problem

by Ralf Otto -
Number of replies: 6

 

After installing this module i had the problem that most of the JPGs weren't displayed.
Now, I have figured out the problem: The path to the images was wrong.

I changed the styles.php into this and now it works flawless:


div.frontside {
background-image: url('<?php echo $CFG->wwwroot ?>/mod/flashcard/pix/front.jpg');
height: 201px;
width: 307px
}

div.backside {
background-image: url('<?php echo $CFG->wwwroot ?>/mod/flashcard/pix/back.jpg');
height: 201px;
width: 307px
}

div.finished {
background-image: url('<?php echo $CFG->wwwroot ?>/mod/flashcard/pix/finished.jpg');
height: 201px;
width: 307px
}

.emptyset {
color: red;
}

.graphdeck{
background-image: url('<?php echo $CFG->wwwroot ?>/mod/flashcard/pix/cardslice.png');
background-repeat: repeat-y;
}

.error{
color: red;
}

.bar{
background-image: url('<?php echo $CFG->wwwroot ?>/mod/flashcard/pix/men.png');
background-repeat: repeat-x;
border: solid 1px #0B2386;
}

 

Average of ratings: -
In reply to Ralf Otto

Re: Flashcard module add-on: Solution for styles.php Problem

by David Dunn -

Hi Ralf,

You've identified an important fix here; however, I haven't been able to correct the problem of missing JPGs after adapting your code to my site:

.frontside {
background-image: url('<?php echo $CFG->http://lingualucida.com/moodle ?>/mod/flashcard/pix/front.jpg');
height: 201px;
width: 307px
}

What have I done wrong?

In reply to David Dunn

Re: Flashcard module add-on: Solution for styles.php Problem

by Gautam Saha -

hi David,

you do not need to put http://path

just cut and copy the code exactly that Ralf provided and make it a styles.php file. replace your old file with this file.

Ralf...great work..this was a key issue for me

In reply to Gautam Saha

Re: Flashcard module add-on: Solution for styles.php Problem

by David Dunn -

Thanks, Gautam, for pointing that out. It now works OK.approve

In reply to Ralf Otto

Re: Flashcard module add-on: Solution for styles.php Problem

by chihuei lu -

I still can not see the missing jpgs after I copy and paste these codes into styles.php.

My classroom address is www.myschoolsite/H2/

Is this correct path?

div.frontside {
background-image: url('<?php echo $CFG->wwwroot ?>/H2/mod/flashcard/pix/front.jpg');
height: 201px;
width: 307px
}

 

Please help me!!!

In reply to chihuei lu

Re: Flashcard module add-on: Solution for styles.php Problem

by Joachim Vogelgesang -

... no, without/H2/

just copying all modifications above to styles.php

In reply to Joachim Vogelgesang

Re: Flashcard module add-on: Solution for styles.php Problem

by Raymond Culp -

I copied the code exactly to my styles.php and it still doesn't display the cards images when playing. Is there anything else I could check?

Any help is much appreciated! smile