× Joomdle 1.0 Installation

Joomla Sync Timezone

1 month 2 weeks ago
dhusband
Posts: 23
More
Topic Author
Joomla Sync Timezone #1
Joomla 3.9.24
Moodle 3.9.3

The sync of 'default' user time zone from Joomla sets the time zone in Moodle to 'Invalid timezone ""'.

If I set the users Joomla time zone to London, it updates Moodle to London. If I change it back to default it creates an error in Moodle again.

The default time zone of Joomla is set to London.

How do we get the sync to translate the 'default' time zone to Moodle as the system setting so it does not error?

Thank you
David

Please Log in or Create an account to join the conversation.

1 month 1 week ago
Antonio Durán
Posts: 7255
More
Joomla Sync Timezone #2
Hi. Thanks for the bug report.
We'll add a fix in next Joomdle release.

You can fix it now by editing file administrator/components/com_joomdle/helpers/mappings.php.
In get_user_info () function, change:
            $user_info['timezone'] = $user->getParam( 'timezone' );
By:
        if ($user_info['timezone'])
            $user_info['timezone'] = $user->getParam( 'timezone' );
        else
        {
            // Get default timezone to send to Moodle
            $user_info['timezone'] = JFactory::getConfig()->get('offset');
        }

Please Log in or Create an account to join the conversation.

1 month 1 week ago
dhusband
Posts: 23
More
Topic Author
Joomla Sync Timezone #3
Thank you.

That worked.

David

Please Log in or Create an account to join the conversation.

1 month 1 week ago
Antonio Durán
Posts: 7255
More
Joomla Sync Timezone #4
Great, thanks for the feedback.

Please Log in or Create an account to join the conversation.