Quiz Feedback Gone East -> a solution

Quiz Feedback Gone East -> a solution

by Joseph Rézeau -
Number of replies: 16
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Testing Moodle 1.6 beta 3.

In answer to Tim's question. This is a theme-related issue for which I suggest this solution: in your theme's styles_layout.css add the following lines

.que td.text,
.que td.feedback {width:auto;}

See screen shot for visual aspect before and after applying my solution. NOTE.- I have used FF's WebDeveloper to Outline Table Cells (in red).

Joseph

PS In 1.6 beta 3 quiz pages display uses CSS from both \mod\quiz\styles.php and from standard theme CSS files, which I find a bit confusing.

Attachment Image1.jpg
Average of ratings: -
In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -

Thank you Joseph!

First the flash player now styles sheets magic. To are too kind.

I can't test it right now because my database connection has gone down.

There was no layout.css in my theme (standard blue). I am hoping it will be okay to add one, and that the database connection comes back.

Thanks again,

Tim

In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -
Dear Joseph

I tried adding the attached file to my standard blue theme but alas it did not seem to have the desired effect.

Perhaps that has something to do with the fact that there was no styles_layout.css in my theme.

I may be moving the HSU mac compatible theme sometime if they upgrade it to suit 1.6.

Tim
In reply to Timothy Takemoto

Re: Quiz Feedback Gone East -> a solution

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Tim,

Sorry, I had only tested my workaround in question preview, not in quiz preview.blush

In (new) file \moodle\theme\standardblue\styles_layout.css put this:

#mod-quiz-attempt .answer td.text,
#mod-quiz-attempt .answer td.feedback,
#question-preview .answer td.text,
#question-preview .answer td.feedback {width:auto;}

In file \moodle\theme\standardblue\config.php change

$THEME->sheets = array('gradients');

to

$THEME->sheets = array('gradients','styles_layout');

Hope that works now!

Joseph

In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -

Thanks again Joseph

I should have changed the config.php for the style shy.

But alas it still does not work.
my styles_layout.css
is

#mod-quiz-attempt .answer td.text,
#mod-quiz-attempt .answer td.feedback,
#question-preview .answer td.text,
#question-preview .answer td.feedback {width:auto;}

and config.php contains
$THEME->sheets = array('gradients','styles_layout');
but no joy.

I tried adding the previous in the styles_layout.css too
.que td.text,
.que td.feedback {width:auto;}

but it looks the same (using ctrl F5 to make sure that the cache is cleared) here below using FF plugin thing to display the classes, the cells and the image width for good measure. 

Not sure what c0 means.

Attachment class.jpg
In reply to Timothy Takemoto

Re: Quiz Feedback Gone East -> a solution

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Tim,
I'm afraid I can't do much more. It does work for me. Maybe the problem is related to your using Japanese characters in feedback?
Urs, if you read this, can you please help?
Joseph
In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -

Thanks Joseph,
I will try putting some English language feedback on one of the questions.

In reply to Timothy Takemoto

Re: Quiz Feedback Gone East -> a solution

by Urs Hunkler -
Picture of Core developers

Timothy, could you manage to give me or Joseph access to your Moodle course? From what I read here I do not have an idea why Joseph's CSS proposal works for him but not for your page.

Urs

PS. Joseph, thank you very much for your engagement in Moodle theme support. You and the Moodle "theme gang" are giving great support here smile

In reply to Urs Hunkler

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -

Oops. I enrolled you on the wrong one at first but it is now done. I will send you the details and a link. Thank you for your attention.
Tim

In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Urs Hunkler -
Picture of Core developers

Joseph, I added this CSS for multichoice feedback styling to the standard theme. It works on any page with a multichioce question and does not change feddback display of the other question types.

.multichoice .text,
.multichoice .feedback {
  width: auto;
}

Timothy, could you please try with the changed stylesheet. If you can't get the latest Beta you can add the above CSS to the question section of your styles_layout.css file.

Urs

In reply to Urs Hunkler

Re: Quiz Feedback Gone East -> a solution

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Urs,

Just tried your latest suggestion with standard theme (Moodle 1.6 beta 3). In fact, it will only work for me if I add the !important parameter:

.multichoice .text,
.multichoice .feedback {
width: auto!important;
}

No idea why.surprise

Joseph

In reply to Joseph Rézeau

Re: Quiz Feedback Gone East -> a solution

by Urs Hunkler -
Picture of Core developers

Joseph, did you try with the standard theme or with one of your themes? I checked again with standard and Chameleon and the changes work. With "!important" you overwrite another CSS rule for this element. There should be none.

What happens when you use the standard theme?

Urs

In reply to Urs Hunkler

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -

Thanks Urs, Joseph

I found that Urs's css WITH Joseph's last suggestion, i.e. with the "important!" worked for me too.  Now the feedback is right up against the answer!

I am using a standard theme, standardblue, with no changes. The only stylesheet it has is "gradient".

Incidentally, I like the new pale blue backgrounds to the columns. That was not there before, I think.

Tim

In reply to Timothy Takemoto

Re: Quiz Feedback Gone East -> a solution

by Urs Hunkler -
Picture of Core developers

The width for feedback was set in styles.php too and did overwrite the width in attempt view but not in preview. I will have a second closer look at the question CSS in the standard theme and styles.php. I changed it - it's in CVS.

Does the Feedback still "go east"?

Urs

In reply to Urs Hunkler

Re: Quiz Feedback Gone East -> a solution

by Timothy Takemoto -
No, thanks to you and Joseph it is displaying perfectly, as it should.

Is there anything I should do, or is it okay to leave it as it is with Joseph's "Important!"

I would upgrade to the CVS but...I am using a 1.6dev in production and I am scared to upgrade to the latest. I wonder if there are some days that are more stable than others.

Tim
In reply to Timothy Takemoto

Re: Quiz Feedback Gone East -> a solution

by Urs Hunkler -
Picture of Core developers

You can leave your theme as it is for now Timothy. With your next update you will get the actual version.

Urs