Questionnaire (add-on)

 
 
Picture of reg phenna
bar chart is massive, i mean MASSIVE!
 

I have recently installed questionnaire on moodle 2.4 which went fine but when I create a survey the answers in bar charts are massive. The bars are taller than the browser window and probably a third of the width!

Has anyonoe any idea what went wrong?

 

Thanks


 
Average of ratings: -
Picture of Joseph Rézeau
Re: bar chart is massive, i mean MASSIVE!
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Hi reg,

Something has obviously gone wrong there. Which browser and which Moodle theme are you using? If you are not using the Standard theme, try switching to Standard and see if this solves the problem.

Also try the following. Using the Firefox browser, right-click on the red bar, in the context menu, click on "Image properties" (or similar in other browser). In the popup window, what kind of size do you see for the thbar.gif image? See attached screenshot.

Joseph

screenshot #1

 
Average of ratings: -
Picture of reg phenna
Re: bar chart is massive, i mean MASSIVE!
 

Hi Joseph,

have aardvark as the default theme. I switched it to afterburner and that fixed it!

Dimensions were either 200px x 9px or 400px x 9px with both themes!

Thanks

 
Average of ratings: -
Picture of Joseph Rézeau
Re: bar chart is massive, i mean MASSIVE!
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

@reg,

Which exact version of the aardvark theme were you using? There are so many available:

https://moodle.org/plugins/pluginversions.php?plugin=theme_aardvark

EDIT.- Got it. There is indeed a CSS rule in the aarvark theme which ruins the display of responses graph in Questionnaire. It is located here in file aardvark/style/core.css line 1166:

.region-content img {
max-width:540px;
height:auto;
}

If you still want to use the aardvark theme and avoid the bug, just comment out (or remove) that CSS rule from the theme. I have written to the theme author to give notice of this bug.

 
Average of ratings:Useful (1)
Picture of llywelyn morgan
Re: bar chart is massive, i mean MASSIVE!
 

I'm having the same problem with the Clean theme (moodle 2.5).

I have checked similar folder to your solution to the aardvark theme, but the same custom code doesn't exist in the clean folder.

Please could you let me know if there is alternative css that needs to be altered.

Thanks.

Llyw

 
Average of ratings: -
Picture of Joseph Rézeau
Re: bar chart is massive, i mean MASSIVE!
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

@Llyw: Please try the workaround I suggested in this discussion (and report here if it works).

Joseph

 
Average of ratings: -
Picture of llywelyn morgan
Re: bar chart is massive, i mean MASSIVE!
 

Hi Joseph

Unfortunately adding the code did not work. sad

 
Average of ratings: -
Picture of Joseph Rézeau
Re: bar chart is massive, i mean MASSIVE!
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Did you clear ALL your browser and moodle caches after you changed the styles code?

Joseph

 
Average of ratings: -
Picture of llywelyn morgan
Re: bar chart is massive, i mean MASSIVE!
 

oops. haven't made code changes for quite a while so forgot to purge cache.

it now works.  thanks. smile

 
Average of ratings: -
This is me.  Deal with it!
Re: bar chart is massive, i mean MASSIVE!
 

I have a theme based on bootstrapbase which had the same problem but also effected a lot of images.

It appears that there is a css rule

img{

width:auto/9;
height:auto;
/*More styles below

}

that is causing the problem.  Its in bootstrapbase/styles/moodle.css

see this discussion: https://moodle.org/mod/forum/discuss.php?d=229894

I just commented out the styles in this file and it fixed it.

Thanks

Kieran

 
Average of ratings: -