-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings_base.php
82 lines (75 loc) · 2.32 KB
/
settings_base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* *************************************************************************
* * OOHOO - TTS - Text To Speech **
* *************************************************************************
* @package block **
* @subpackage TTS **
* @name TTS **
* @copyright oohoo.biz **
* @link http://oohoo.biz **
* @author Ryan Thomas (Original Author) **
* @author Dustin Durand **
* @author Nicolas Bretin **
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later **
* *************************************************************************
* ************************************************************************ */
//Contains base settings arrays
/**
* Return an array of numbers
* @return array Return an array of numbers
*/
function numSelection()
{
$numSelection = array(1, 2, 3, 4, 5, 6);
return $numSelection;
}
/**
* Return an array of numbers for the volume
* @return array Return an array of numbers
*/
function volumeSelection()
{
for ($i = 100; $i > 0; $i = $i - 5)
{
$volume[] = $i;
}
return $volume;
}
/**
* Return an array of services
* @return array The array of services
*/
function serviceSelection()
{
$services = array('google', 'microsoft');
return $services;
}
/**
* Return the language en function of the differents moodle options
* @global stdClass $CFG
* @global stdClass $SESSION
* @global stdClass $COURSE
* @global stdClass $USER
* @return string Return the language code
*/
function languageSelection()
{
global $CFG, $SESSION, $COURSE, $USER;
$lang = substr(strtolower((isset($COURSE->lang) ? $COURSE->lang : $CFG->lang)), 0, 2);
switch ($lang)
{
case 'en':
$lang = 'en';
break;
case 'fr':
$lang = 'fr';
break;
default:
$lang = 'en';
break;
}
$language = $lang;
return $language;
}
?>