Page 1 of 1
[FIXED] Docebo Test Time Left (Time Format Change)
Posted: Thu Oct 24, 2013 6:21 pm
by murat
Hi,
I want to docebo 4.05 test time left format change.
Example:
Language English when test question time is 1h 34m 34s
But language is Turkish or other when test question time is 1h 34m 34 s
normally turkish time format must be 1s 34dk 34s
How to change time format for test
Solution:
You must found do.test.php file (/doceboLms/modules/test/do.test.php)
After change ,
# 568 rows (this file)
Code: Select all
.elem.innerHTML = minute + ' m ' + second + ' s';
Write what you want instead (m and s)
Example,
Turkish version:
Code: Select all
.elem.innerHTML = minute + ' dk ' + second + ' saniye '; // Change on the language
Re: [FIXED] Docebo Test Time Left (Time Format Change)
Posted: Fri Oct 25, 2013 6:06 pm
by max
Thank you Murat for looking into this issue, I think it will be very useful for all the users with the same language needs as you have.
Re: [FIXED] Docebo Test Time Left (Time Format Change)
Posted: Fri Oct 25, 2013 8:42 pm
by murat
The new update for code
Change the old code with this new code
Code: Select all
.elem.innerHTML = minute + ' ".$lang->def('_MINUTE')." ' + second + ' ".$lang->def('_SECOND')."';
After, save to your own language. (_MINUTE' and _SECOND)
With this change, the "time left (for test)" was translated into all languages​​.
Re: [FIXED] Docebo Test Time Left (Time Format Change)
Posted: Fri Nov 22, 2013 1:10 am
by nangi
well how can we modfy/change the total time to other languages it shown as 2h 20m and want this shown as 2 sa. 20 dk.
I've attached the screenshot of the total time on the left collobration section.
Re: [FIXED] Docebo Test Time Left (Time Format Change)
Posted: Wed Nov 27, 2013 1:46 am
by murat
nangi wrote:well how can we modfy/change the total time to other languages it shown as 2h 20m and want this shown as 2 sa. 20 dk.
I've attached the screenshot of the total time on the left collobration section.
Hi,
You must open "doceboLms/menu/menu_lat.php' file.
After change this codes:
(line 150)
Code: Select all
$partial_time = ( $hours != 0 ? $hours.'h ' : '' ).$minutes.'m ';//.$seconds.'s ';
(line 157)
Code: Select all
$tot_time = ( $hours != 0 ? $hours.'h ' : '' ).$minutes.'m ';//.$seconds.'s ';
with codes;
For one language
(line 150)
Code: Select all
$partial_time = ( $hours != 0 ? $hours.'s ' : '' ).$minutes.'dk ';//.$seconds.'sn ';
(line 157)
Code: Select all
$tot_time = ( $hours != 0 ? $hours.'s ' : '' ).$minutes.'dk ';//.$seconds.'sn ';
or
You can want to multi languages;
(line 150)
Code: Select all
$partial_time = ( $hours != 0 ? $hours.''.Lang::t('_HOURS', 'time').'' : '' ).$minutes.''.Lang::t('_MINUTE', 'time').' ';//.$seconds.''.Lang::t('_SECOND', 'time').' ';
(line 157)
Code: Select all
$tot_time = ( $hours != 0 ? $hours.''.Lang::t('_HOURS', 'time').' ' : '' ).$minutes.''.Lang::t('_MINUTE', 'time').' ';//.$seconds.''.Lang::t('_SECOND', 'time').' ';
Do not forget to add it to the language settings
Code: Select all
example add , language setting.
Modul: time
LANG_KEY: _MINUTE
DESCRIPTION: dk
if you want to "second" time
You delete this code
example;
Code: Select all
(line 157) [code] $tot_time = ( $hours != 0 ? $hours.'s ' : '' ).$minutes.'dk '.$seconds.'sn ';