forked from blindsidenetworks-ps/moodle-mod_bigbluebuttonbn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.js
67 lines (56 loc) · 1.79 KB
/
module.js
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
/**
* @namespace
*/
M.mod_bigbluebuttonbn = M.mod_bigbluebuttonbn || {};
/**
* This function is initialized from PHP
*
* @param {Object}
* Y YUI instance
*/
M.mod_bigbluebuttonbn.init_view = function(Y) {
if (bigbluebuttonbn.joining == 'true') {
if (bigbluebuttonbn.ismoderator == 'true'
|| bigbluebuttonbn.waitformoderator == 'false') {
M.mod_bigbluebuttonbn.joinURL();
} else {
var dataSource = new Y.DataSource.Get({
source : M.cfg.wwwroot + "/mod/bigbluebuttonbn/ping.php?"
});
var request = {
request : "meetingid=" + bigbluebuttonbn.meetingid,
callback : {
success : function(e) {
if (e.data.status == 'true') {
M.mod_bigbluebuttonbn.joinURL();
}
},
failure : function(e) {
console.debug(e.error.message);
}
}
};
var id = dataSource.setInterval(10000, request);
}
}
};
M.mod_bigbluebuttonbn.joinURL = function() {
// console.debug(bigbluebuttonbn.joinurl);
window.location = bigbluebuttonbn.joinurl;
};
M.mod_bigbluebuttonbn.modform_Editting = function() {
var elSel = document.getElementsByName('groupmode')[0];
if (elSel.length > 0) {
elSel.remove(elSel.length - 1);
}
}
M.mod_bigbluebuttonbn.viewend_CloseWindow = function() {
window.close();
}
M.mod_bigbluebuttonbn.setusergroups = function() {
var elSel = document.getElementsByName('group')[0];
if (elSel.length > 0) {
elSel.options[0].text = 'Select group';
elSel.options[0].value = elSel.options[1].value;
}
}