Font size increase in Hot Pot not transferring into Moodle 2.2.2

Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Nancy Friday -
Number of replies: 9

I have tried many times to have increased font sized quizzes created in Hot Potatoes upload to present the increased font in Moodle without success.  Am using the latest version of Hot Potatoes and Moodle 2.2.2+

Have used the standard Moodle Font family options in Hot Potatoes.  The font size increase uploads to Moodle just for the Quiz title but not for the quiz question.

Have tried with JMatch and JQuiz with no success.

I have changed the Font option in Hot Potatoes and then confirmed and saved the Configuration as well, but not getting the Moodle results I want.

What am I doing wrong?

Nancy

Average of ratings: -
In reply to Nancy Friday

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Nancy,
probably the Hot Potatoes font size styles are being overridden by the styles of the Moodle theme.

On the Moodle page for updating the settings of a HotPot activity, try setting the "Navigation" section to "Embed" or "None". Then I think the Hot Potatoes styles will be effective.

regards
Gordon

In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Alan Cherwinski -

I can confirm from my testing that the Font type for the HotPot "Excercise subtitle" and the "Instructions" are not displaying as created in the HotPot activity. Regardless of the navigation settings.

The Font type setting for the activity itself and the "check" type buttons will migrate, but the Font Size for all headings and activity text are reduced, regardless of the 18pt and Large settings used in HotPotato to create an activity.

I've tried multiple themes, browsers and browser setting and cannot get the desired larger font size in a Hot Pot activity.


Thank you,

 

In reply to Alan Cherwinski

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alan,
thank you for investigating the issue of the Hot Potatoes font size setting.

The difficulty here is which styles do we wish to prevail - the Hot Potatoes styles, or the Moodle styles. The Moodle theme developers would probably choose the Moodle styles, but I can see that as Hot Potatoes creators there are times when we want to give precedence to the Hot Potatoes styles. Very well then, try this:

  • install the latest version of the HotPot module for Moodle 2.x on your Moodle server
  • with a text editor, open "mod/hotpot/attempt/renderer.php"
  • locate the "fix_css_definitions" function (around line 973)
  • uncomment (i.e. remove double backslash from) the following line (around line 995)
    • OLD: // $selectors[] = "$container";
    • NEW: $selectors[] = "$container";
  • save the file
  • clear the HotPot cache on your Moodle site
    • Settings -> Site administration -> Plugins -> Activity module -> HotPot
    • click "Clear HotPot cache" link
  • view the quiz

There was a reason why I originally commented out this line - but I must confess I have forgotten what the reason was. I think it may have been that very often you do NOT want the Hot Potatoes styles to be in effect. Rather, you want the Hot Potatoes quiz to appear with the same styles as the Moodle theme.

It may be that we can come up with a flexible solution, whereby we add a setting to the Moodle HotPot settings page. The new setting will allow us to specify which styles we wish to take precedence. We may even make it more granular, so that we can choose any, all or none of ...

  • background-color
  • background-image
  • font-size
  • margin (left and right)

And to really add icing on top of the cake, we could also allow teachers to add their own styles that would override both the Moodle theme and the Hot Potatoes styles.

First though, please could you try the modification to "mod/hotpot/attempt/renderer.php" and let me know not only whether or not it fixes your immediate issue, but also whether it has any knock-on effects on other HotPot activities.

TIA !
Gordon

In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Alan Cherwinski -

Hello Gordon, your suggestion re $selectors[] = "$container"; work perfectly.

 

I just upgraded the site to latest version of Moodle 2.3. and the most recent HotPot Mod. I was going to make the same modification to the latest version but the php code around line 995 looks different. Was the Hot Pot module "attempt/renderer.php" alerted already or do I need to continue to maintain the hack?

 

Thanks

In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Alan Cherwinski -

Hi Gordon,

The font and size issue might appear trivial in most learning context, but we are working in adult literacy and there are often learning or physicial disabilities which make font size and design an important usability and instructional concern.


Any help you can provide will be much appreciated. Outside of Moodle the HotPot activities are perfectly suited to literacy learners. We would hate to give up on the LMS advantages of Moodle.

 

Thanks

In reply to Alan Cherwinski

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alan,
please could you try the modification I suggested to Jim earlier in this thread and let me know if it helps you.

thanks
Gordon

In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Dear Alan,
thanks for confirming that the workaround for applying HP body styles does what you want.

As you have noticed, I have started to implement a more complete solution. I was waiting to hear from you before proceeding with it. Now you have confirmed it works, I am ready to proceed with the full fix.

In the meantime, if you simply want to enable all HP styles, you should insert the following line in "mod/hotpot/attempt/renderer.php" just before the line that reads "if (isset($this->hotpot->bodystyles)) {" (around line 1002):

  • $this->hotpot->bodystyles = 15;

THe above line is actually equivalent to the following line:

  • $this->hotpot->bodystyles = (hotpot::BODYSTYLES_BACKGROUND | hotpot::BODYSTYLES_COLOR | hotpot::BODYSTYLES_FONT | hotpot::BODYSTYLES_MARGIN);

If you decided that you want to keep only a subset of the HP styles (background, color, font, margin), then you can use removed the appropriate part of the above line to get what you want.

For example to just set the font:

  • $this->hotpot->bodystyles = (hotpot::BODYSTYLES_FONT);

Or to set everything except the margins (i.e. just the background, font color and font face):

  • $this->hotpot->bodystyles = (hotpot::BODYSTYLES_BACKGROUND | hotpot::BODYSTYLES_COLOR | hotpot::BODYSTYLES_FONT);

regards
Gordon

In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Alan,
I have added a new admin setting for the HotPot module, so that you can control the precedence of HotPot styles over Moodle theme via the Moodle plugins admin interface (see attached screenshot).

You will need to update your HotPot to get the new functionaliaty:

regards
Gordon

Attachment Screen Shot 2012-11-07 at 12.05.49 PM.png
In reply to Gordon Bateson

Re: Font size increase in Hot Pot not transferring into Moodle 2.2.2

by Bruno Henrique Cury -

Hi

I did what you asked, but still has problems, even using the HTML version of Hot Potatoes.

check attached images

I appreciate the help

Thanks!

Attachment IMAGE_01.jpg
Attachment IMAGE_02.jpg