Joomdle 1.0 Installation

Joomla Sync Timezone

  • dhusband
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago #1 by dhusband
Joomla Sync Timezone was created by dhusband
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.

More
5 years 3 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Joomla Sync Timezone
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:
Code:
$user_info['timezone'] = $user->getParam( 'timezone' );
By:
Code:
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.

  • dhusband
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago #3 by dhusband
Replied by dhusband on topic Joomla Sync Timezone
Thank you.

That worked.

David

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

More
5 years 3 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Joomla Sync Timezone
Great, thanks for the feedback.

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